From 0fbfc8e0859aa62dfd5d28b18cb5eab28c480ca7 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Wed, 6 Sep 2006 09:04:40 -0500 Subject: [PATCH] --- yaml --- r: 35055 b: refs/heads/master c: 3e3c60e3a8c7013d55768aa7256bb5a7f66b0bb4 h: refs/heads/master i: 35053: 1b39a132032715d79704e994dce09c23601163f8 35051: 8acb0924be2fc610888c936d180915cafec0478c 35047: f5949b8f07f297f23b30e41f43b65e6f3fd43329 35039: db61f26f95accf6b71c6e210d7ca50bbe8e72ecd v: v3 --- [refs] | 2 +- trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index ce710aeda7bc..e8fa18f6463f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 231839102b54512ced7d3ee7fc9b8bcf5e3b583b +refs/heads/master: 3e3c60e3a8c7013d55768aa7256bb5a7f66b0bb4 diff --git a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c index e5bb4d87b307..0b3c01ac4259 100644 --- a/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -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; }