| From stable-bounces@linux.kernel.org Tue Oct 17 22:49:31 2006 |
| Date: Sun, 24 Sep 2006 04:01:16 GMT |
| Message-Id: <200609240401.k8O41GAH026953@hera.kernel.org> |
| From: James Bottomley <James.Bottomley@steeleye.com> |
| MIME-Version: 1.0 |
| Subject: SCSI: aic7xxx: avoid checking SBLKCTL register for certain cards |
| Content-Type: text/plain; charset="us-ascii" |
| |
| From: James Bottomley <James.Bottomley@steeleye.com> |
| |
| [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> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| Signed-off-by: Chris Wright <chrisw@sous-sol.org> |
| |
| --- |
| drivers/scsi/aic7xxx/aic7xxx_osm.c | 16 ++++++++++++---- |
| 1 file changed, 12 insertions(+), 4 deletions(-) |
| |
| --- linux-2.6.18.1.orig/drivers/scsi/aic7xxx/aic7xxx_osm.c |
| +++ linux-2.6.18.1/drivers/scsi/aic7xxx/aic7xxx_osm.c |
| @@ -2539,15 +2539,23 @@ static void ahc_linux_set_iu(struct scsi |
| 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; |
| } |