aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-05-19 22:30:13 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 17:43:51 -0400
commit2bf2c568c878b9c0bbacac5c3210a6bd81856d21 (patch)
treed9be308337b4cca0f0829b0bd62f1d5b830954e1 /drivers/scsi/aic7xxx
parentfb3089dfb58bf07992252b42e77c6f35d45dff5e (diff)
[SCSI] aic7xxx: fix U160 mode
The new period/dt setting routines don't get the coupling of these parameters correct. This means that Domain Validation never gets DT set, and thus the drive gets restricted to U80. Fix this by restoring the couplings in the set routines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index b216de41bff4..f90efa265ba2 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2679,6 +2679,11 @@ static void ahc_linux_set_period(struct scsi_target *starget, int period)
2679 if (offset == 0) 2679 if (offset == 0)
2680 offset = MAX_OFFSET; 2680 offset = MAX_OFFSET;
2681 2681
2682 if (period < 9)
2683 period = 9; /* 12.5ns is our minimum */
2684 if (period == 9)
2685 ppr_options |= MSG_EXT_PPR_DT_REQ;
2686
2682 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2687 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2683 starget->channel + 'A', ROLE_INITIATOR); 2688 starget->channel + 'A', ROLE_INITIATOR);
2684 2689
@@ -2764,6 +2769,12 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
2764 unsigned long flags; 2769 unsigned long flags;
2765 struct ahc_syncrate *syncrate; 2770 struct ahc_syncrate *syncrate;
2766 2771
2772 if (dt) {
2773 period = 9; /* 12.5ns is the only period valid for DT */
2774 ppr_options |= MSG_EXT_PPR_DT_REQ;
2775 } else if (period == 9)
2776 period = 10; /* if resetting DT, period must be >= 25ns */
2777
2767 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, 2778 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2768 starget->channel + 'A', ROLE_INITIATOR); 2779 starget->channel + 'A', ROLE_INITIATOR);
2769 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT); 2780 syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);