summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2006-09-17 07:38:15 +0200
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-23 17:48:11 -0500
commitcf2b5d3fcab77a9390293920ec5b49e67eced200 (patch)
tree63f85032f1a5a3423997880d3c9033f1928e90e1 /drivers/scsi/aic7xxx/aic7xxx_osm.c
parent3e3c60e3a8c7013d55768aa7256bb5a7f66b0bb4 (diff)
downloadlinux-cf2b5d3fcab77a9390293920ec5b49e67eced200.tar.gz
linux-cf2b5d3fcab77a9390293920ec5b49e67eced200.tar.bz2
linux-cf2b5d3fcab77a9390293920ec5b49e67eced200.zip
[SCSI] aic7xxx: pause sequencer before touching SBLKCTL
Some cards need to pause the sequencer before the SBLKCTL register is touched. This fixes a PCI related oops seen on powerpc macs with this card caused by trying to ascertain the bus signalling before beginning domain validation. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 0b3c01ac4259..64c8b88a429f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2539,6 +2539,7 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
static void ahc_linux_get_signalling(struct Scsi_Host *shost)
{
struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
+ unsigned long flags;
u8 mode;
if (!(ahc->features & AHC_ULTRA2)) {
@@ -2550,7 +2551,11 @@ static void ahc_linux_get_signalling(struct Scsi_Host *shost)
return;
}
+ ahc_lock(ahc, &flags);
+ ahc_pause(ahc);
mode = ahc_inb(ahc, SBLKCTL);
+ ahc_unpause(ahc);
+ ahc_unlock(ahc, &flags);
if (mode & ENAB40)
spi_signalling(shost) = SPI_SIGNAL_LVD;