aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_osm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index e7a32f8e1a5c..9bfcca5ede08 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2694,7 +2694,25 @@ static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
2694 ahd_unlock(ahd, &flags); 2694 ahd_unlock(ahd, &flags);
2695} 2695}
2696 2696
2697static void ahd_linux_get_signalling(struct Scsi_Host *shost)
2698{
2699 struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata;
2700 unsigned long flags;
2701 u8 mode;
2697 2702
2703 ahd_lock(ahd, &flags);
2704 ahd_pause(ahd);
2705 mode = ahd_inb(ahd, SBLKCTL);
2706 ahd_unpause(ahd);
2707 ahd_unlock(ahd, &flags);
2708
2709 if (mode & ENAB40)
2710 spi_signalling(shost) = SPI_SIGNAL_LVD;
2711 else if (mode & ENAB20)
2712 spi_signalling(shost) = SPI_SIGNAL_SE;
2713 else
2714 spi_signalling(shost) = SPI_SIGNAL_UNKNOWN;
2715}
2698 2716
2699static struct spi_function_template ahd_linux_transport_functions = { 2717static struct spi_function_template ahd_linux_transport_functions = {
2700 .set_offset = ahd_linux_set_offset, 2718 .set_offset = ahd_linux_set_offset,
@@ -2719,6 +2737,7 @@ static struct spi_function_template ahd_linux_transport_functions = {
2719 .show_pcomp_en = 1, 2737 .show_pcomp_en = 1,
2720 .set_hold_mcs = ahd_linux_set_hold_mcs, 2738 .set_hold_mcs = ahd_linux_set_hold_mcs,
2721 .show_hold_mcs = 1, 2739 .show_hold_mcs = 1,
2740 .get_signalling = ahd_linux_get_signalling,
2722}; 2741};
2723 2742
2724static int __init 2743static int __init