Re: What breaks aic7xxx in post 2.6.12-rc2 ?

From: James Bottomley
Date: Thu May 19 2005 - 21:32:19 EST


On Thu, 2005-05-19 at 20:54 -0500, K.R. Foley wrote:
> the dt setting is 0. can't set it to 1, at least not so that you can see
> it stay that way. tried setting period to 12.5, stays at 25. min_period
> is set to 12.5 but doesn't seem to matter. what's next :)

Well, I think it's my fault. I naively assumed the aic7xxx core setting
code would do the right thing with coupled parameters, which, as I read
through it, apparently it doesn't do.

My excuse is that I can't test any of this because my fastest aic7xxx
card is only a U2 ...

Could you try this, I think it does the correct thing with the coupled
parameters.

Thanks,

James

--- 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
if (offset == 0)
offset = MAX_OFFSET;

+ if (period < 9)
+ period = 9; /* 12.5ns is our minimum */
+ if (period == 9)
+ ppr_options |= MSG_EXT_PPR_DT_REQ;
+
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);

@@ -2764,6 +2769,12 @@ static void ahc_linux_set_dt(struct scsi
unsigned long flags;
struct ahc_syncrate *syncrate;

+ if (dt) {
+ period = 9; /* 12.5ns is the only period valid for DT */
+ ppr_options |= MSG_EXT_PPR_DT_REQ;
+ } else if (period == 9)
+ period = 10; /* if resetting DT, period must be >= 25ns */
+
ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
syncrate = ahc_find_syncrate(ahc, &period, &ppr_options,AHC_SYNCRATE_DT);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/