diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2006-09-06 10:04:40 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-23 18:39:34 -0400 |
commit | 3e3c60e3a8c7013d55768aa7256bb5a7f66b0bb4 (patch) | |
tree | fdb4539ec39d15434f74e63e139fb8de3a27e4dc /drivers/scsi/aic7xxx/aic7xxx_osm.c | |
parent | 231839102b54512ced7d3ee7fc9b8bcf5e3b583b (diff) |
[SCSI] aic7xxx: avoid checking SBLKCTL register for certain cards
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>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index e5bb4d87b307..0b3c01ac4259 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -2539,15 +2539,23 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu) | |||
2539 | static void ahc_linux_get_signalling(struct Scsi_Host *shost) | 2539 | static void ahc_linux_get_signalling(struct Scsi_Host *shost) |
2540 | { | 2540 | { |
2541 | struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; | 2541 | struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; |
2542 | u8 mode = ahc_inb(ahc, SBLKCTL); | 2542 | u8 mode; |
2543 | 2543 | ||
2544 | if (mode & ENAB40) | 2544 | if (!(ahc->features & AHC_ULTRA2)) { |
2545 | spi_signalling(shost) = SPI_SIGNAL_LVD; | 2545 | /* non-LVD chipset, may not have SBLKCTL reg */ |
2546 | else if (mode & ENAB20) | ||
2547 | spi_signalling(shost) = | 2546 | spi_signalling(shost) = |
2548 | ahc->features & AHC_HVD ? | 2547 | ahc->features & AHC_HVD ? |
2549 | SPI_SIGNAL_HVD : | 2548 | SPI_SIGNAL_HVD : |
2550 | SPI_SIGNAL_SE; | 2549 | SPI_SIGNAL_SE; |
2550 | return; | ||
2551 | } | ||
2552 | |||
2553 | mode = ahc_inb(ahc, SBLKCTL); | ||
2554 | |||
2555 | if (mode & ENAB40) | ||
2556 | spi_signalling(shost) = SPI_SIGNAL_LVD; | ||
2557 | else if (mode & ENAB20) | ||
2558 | spi_signalling(shost) = SPI_SIGNAL_SE; | ||
2551 | else | 2559 | else |
2552 | spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; | 2560 | spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; |
2553 | } | 2561 | } |