diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 11:49:07 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 11:49:07 -0400 |
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 eadfefdd8d7a..debf3e2a0798 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) | |||
2537 | } | 2537 | } |
2538 | #endif | 2538 | #endif |
2539 | 2539 | ||
2540 | static void ahc_linux_get_signalling(struct Scsi_Host *shost) | ||
2541 | { | ||
2542 | struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; | ||
2543 | u8 mode = ahc_inb(ahc, SBLKCTL); | ||
2544 | |||
2545 | if (mode & ENAB40) | ||
2546 | spi_signalling(shost) = SPI_SIGNAL_LVD; | ||
2547 | else if (mode & ENAB20) | ||
2548 | spi_signalling(shost) = | ||
2549 | ahc->features & AHC_HVD ? | ||
2550 | SPI_SIGNAL_HVD : | ||
2551 | SPI_SIGNAL_SE; | ||
2552 | else | ||
2553 | spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; | ||
2554 | } | ||
2555 | |||
2540 | static struct spi_function_template ahc_linux_transport_functions = { | 2556 | static struct spi_function_template ahc_linux_transport_functions = { |
2541 | .set_offset = ahc_linux_set_offset, | 2557 | .set_offset = ahc_linux_set_offset, |
2542 | .show_offset = 1, | 2558 | .show_offset = 1, |
@@ -2552,6 +2568,7 @@ static struct spi_function_template ahc_linux_transport_functions = { | |||
2552 | .set_qas = ahc_linux_set_qas, | 2568 | .set_qas = ahc_linux_set_qas, |
2553 | .show_qas = 1, | 2569 | .show_qas = 1, |
2554 | #endif | 2570 | #endif |
2571 | .get_signalling = ahc_linux_get_signalling, | ||
2555 | }; | 2572 | }; |
2556 | 2573 | ||
2557 | 2574 | ||