diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 10:49:07 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 10:49:07 -0500 |
commit | b2d8bfe18578c4e50e8ba52011c9b260a1b51dac (patch) | |
tree | ab949e11e1e6d4e46ccb2bd5f8c9401cf46052a7 /drivers/scsi/aic7xxx/aic7xxx_osm.c | |
parent | b9f051eb6cc013b90cb6062a1e2502e9c0adf0f4 (diff) |
[SCSI] aic7xxx: expose the bus setting to sysfs
Read the transciever register and display in the host transport
properties. I'm still not entirely sure what this does for multiple
transciever adapters (like some 160 ones) however, I suspect it
displays the transciever state of the switchable bus segment.
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 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index eadfefdd8d7..debf3e2a079 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -2537,6 +2537,22 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu) } #endif +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); + + if (mode & ENAB40) + spi_signalling(shost) = SPI_SIGNAL_LVD; + else if (mode & ENAB20) + spi_signalling(shost) = + ahc->features & AHC_HVD ? + SPI_SIGNAL_HVD : + SPI_SIGNAL_SE; + else + spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; +} + static struct spi_function_template ahc_linux_transport_functions = { .set_offset = ahc_linux_set_offset, .show_offset = 1, @@ -2552,6 +2568,7 @@ static struct spi_function_template ahc_linux_transport_functions = { .set_qas = ahc_linux_set_qas, .show_qas = 1, #endif + .get_signalling = ahc_linux_get_signalling, }; |