Re: What breaks aic7xxx in post 2.6.12-rc2 ?

James Bottomley
2005-05-19T04:25:04Z

On Wed, 2005-05-18 at 22:07 -0500, K.R. Foley wrote:
> This also solves my problem that I reported in this thread
> http://marc.theaimsgroup.com/?l=linux-scsi&m=111422854418964&w=2

OK, I think the patch below is the extract of this. Could you see if it
works by simply patching vanilla 2.6.12-rc4 with no other SCSI patches
(if it does, I'll push it for 2.6.12 final).

James

--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -2300,6 +2300,30 @@ ahc_linux_alloc_target(struct ahc_softc
targ->target = target;
targ->ahc = ahc;
ahc->platform_data->targets[target_offset] = targ;
+
+ /* FIXME: This code is just for a bug workaround in 2.6.12
+ * The correct fix will be in 2.6.13 */
+ {
+ struct ahc_devinfo devinfo;
+ struct ahc_initiator_tinfo *tinfo;
+ struct ahc_tmode_tstate *tstate;
+ char my_channel = channel + 'A';
+ unsigned int our_id = ahc->our_id;
+
+ if (channel)
+ our_id = ahc->our_id_b;
+
+ tinfo = ahc_fetch_transinfo(ahc, my_channel, ahc->our_id,
+ targ->target, &tstate);
+ ahc_compile_devinfo(&devinfo, our_id, targ->target,
+ CAM_LUN_WILDCARD, my_channel,
+ ROLE_INITIATOR);
+ ahc_set_syncrate(ahc, &devinfo, NULL, 0, 0, 0,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ ahc_set_width(ahc, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
+ AHC_TRANS_GOAL, /*paused*/FALSE);
+ }
+
return (targ);
}