diff options
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index aa4be8a31415..64c8b88a429f 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -341,7 +341,7 @@ MODULE_LICENSE("Dual BSD/GPL"); | |||
341 | MODULE_VERSION(AIC7XXX_DRIVER_VERSION); | 341 | MODULE_VERSION(AIC7XXX_DRIVER_VERSION); |
342 | module_param(aic7xxx, charp, 0444); | 342 | module_param(aic7xxx, charp, 0444); |
343 | MODULE_PARM_DESC(aic7xxx, | 343 | MODULE_PARM_DESC(aic7xxx, |
344 | "period delimited, options string.\n" | 344 | "period-delimited options string:\n" |
345 | " verbose Enable verbose/diagnostic logging\n" | 345 | " verbose Enable verbose/diagnostic logging\n" |
346 | " allow_memio Allow device registers to be memory mapped\n" | 346 | " allow_memio Allow device registers to be memory mapped\n" |
347 | " debug Bitmask of debug values to enable\n" | 347 | " debug Bitmask of debug values to enable\n" |
@@ -2539,15 +2539,28 @@ 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 | unsigned long flags; |
2543 | u8 mode; | ||
2543 | 2544 | ||
2544 | if (mode & ENAB40) | 2545 | if (!(ahc->features & AHC_ULTRA2)) { |
2545 | spi_signalling(shost) = SPI_SIGNAL_LVD; | 2546 | /* non-LVD chipset, may not have SBLKCTL reg */ |
2546 | else if (mode & ENAB20) | ||
2547 | spi_signalling(shost) = | 2547 | spi_signalling(shost) = |
2548 | ahc->features & AHC_HVD ? | 2548 | ahc->features & AHC_HVD ? |
2549 | SPI_SIGNAL_HVD : | 2549 | SPI_SIGNAL_HVD : |
2550 | SPI_SIGNAL_SE; | 2550 | SPI_SIGNAL_SE; |
2551 | return; | ||
2552 | } | ||
2553 | |||
2554 | ahc_lock(ahc, &flags); | ||
2555 | ahc_pause(ahc); | ||
2556 | mode = ahc_inb(ahc, SBLKCTL); | ||
2557 | ahc_unpause(ahc); | ||
2558 | ahc_unlock(ahc, &flags); | ||
2559 | |||
2560 | if (mode & ENAB40) | ||
2561 | spi_signalling(shost) = SPI_SIGNAL_LVD; | ||
2562 | else if (mode & ENAB20) | ||
2563 | spi_signalling(shost) = SPI_SIGNAL_SE; | ||
2551 | else | 2564 | else |
2552 | spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; | 2565 | spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; |
2553 | } | 2566 | } |