[parisc-linux-cvs] Re: DIFF 2.4.20-pa31 qla2xxx v6.0.4

Grant Grundler grundler@dsl2.external.hp.com
Sun, 16 Mar 2003 18:28:36 -0700


On Sun, Mar 16, 2003 at 06:13:22PM -0700, Grant Grundler wrote:
> Log message:
> 2.4.20-pa31 NEW DRIVER: qla2xxx v6.0.4
> 
> I've tested this driver on ia64 with qla2342 HBA.
> Passed 64 hours stress/functional testing in two arbitrated loops.
> 
> On parisc, driver loads (and unloads), but using same HBA complains:
> scsi(4): Cable is unplugged...
> 
> even though the cable is connected to the same hub.
> It's possible something is wrong with the transciever but unlikely.
> 
> I've made one modification to the driver to avoid assembler complaints
> about alignment. Use of be64_to_cpup() to swap the order of an 8 byte
> array (port_entry->name[]) looks wrong to me given that no where in the
> code is the array ever referenced as a pointer *and* the destination
> (device.name[]) is not 8-byte aligned. Using a "for()" loop to copy
> and swap the order now since this doesn't seem endian related to me.
> Change is in qla2x00.c and marked with "#if 0 /* GGG */".


Diff that I started with is still on
	ftp.p-l.o/patches/diff-2.4.20-qla2xxx-6.0.4

The diff of what I actually committed is slightly different:
-rw-r--r--    1 grundler cvsusers  3012857 Mar 10 21:56 diff-2.4.20-qla2xxx-6.0.4
-rw-r--r--    1 grundler cvsusers  3012958 Mar 16 18:20 diff-2.4.20-pa31


AFAICT, the difference is mainly two things:
o differences in the Makefiles and Config.in files
  (same changes but in slightly different locations)
o my change to qla2x00.c (interdiff output appended below)

grant


diff -u drivers/scsi/qla2xxx/qla2x00.c drivers/scsi/qla2xxx/qla2x00.c
--- drivers/scsi/qla2xxx/qla2x00.c	11 Mar 2003 04:46:14 -0000
+++ drivers/scsi/qla2xxx/qla2x00.c	17 Mar 2003 00:59:59 -0000
@@ -14620,7 +14620,13 @@
 				port_name[6], port_name[7]);)
 	
 		/* Now get node name -- big-endian format */
+#if 0	/* GGG */
 		*((u64 *)device.name) = be64_to_cpup((u64 *)port_entry->name);
+#else	/* GGG */
+		index=8;
+		while (index--)
+			device.name[index] = port_entry->name[index^7];
+#endif	/* GGG */
 		DEBUG3(printk("%s(%ld): found nodename -> "
 				"%02x%02x%02x%02x%02x%02x%02x%02x\n",
 				__func__,