]> err.no Git - linux-2.6/commitdiff
[SCSI] aic7xxx: avoid checking SBLKCTL register for certain cards
authorJames Bottomley <James.Bottomley@steeleye.com>
Wed, 6 Sep 2006 14:04:40 +0000 (09:04 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 23 Sep 2006 22:39:34 +0000 (17:39 -0500)
For cards that don't support LVD, checking the SBLKCTL register to
determine the bus singalling doesn't work.  So, check that the card
supports LVD first (AHC_ULTRA2) before checking the register.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic7xxx_osm.c

index e5bb4d87b3073f3ef13bf18747b2dc569b017c3b..0b3c01ac42596fd605725346e9ce954ffcd49fb8 100644 (file)
@@ -2539,15 +2539,23 @@ 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;
-       u8 mode = ahc_inb(ahc, SBLKCTL);
+       u8 mode;
 
-       if (mode & ENAB40)
-               spi_signalling(shost) = SPI_SIGNAL_LVD;
-       else if (mode & ENAB20)
+       if (!(ahc->features & AHC_ULTRA2)) {
+               /* non-LVD chipset, may not have SBLKCTL reg */
                spi_signalling(shost) = 
                        ahc->features & AHC_HVD ?
                        SPI_SIGNAL_HVD :
                        SPI_SIGNAL_SE;
+               return;
+       }
+
+       mode = ahc_inb(ahc, SBLKCTL);
+
+       if (mode & ENAB40)
+               spi_signalling(shost) = SPI_SIGNAL_LVD;
+       else if (mode & ENAB20)
+               spi_signalling(shost) = SPI_SIGNAL_SE;
        else
                spi_signalling(shost) = SPI_SIGNAL_UNKNOWN;
 }