From: peterc@suite.sw.oz.au (Peter Chubb) Subject: Ultrastor driver fix. Date: Thu, 22 Apr 1993 05:27:38 GMT
If you've got a fast system, and an Ultrastor scsi driver you may have
been having some problems. Certainly, I have been unable to make a
full backup since the scatter-gather patches were put into the kernel.
Here is a patch that improved the stability of the system a great deal
on my system: It causes the high-order bytes of the length in the
scatter-gather element to be set correctly.
--- linux-99p8/kernel/blk_drv/scsi/ultrastor.c Tue Apr 20 16:06:13 1993
+++ linux/kernel/blk_drv/scsi/ultrastor.c Thu Apr 22 14:51:31 1993
@@ -123,8 +123,13 @@
/* The 14F uses an array of unaligned 4-byte ints for its scatter/gather list.
*/
typedef struct {
+#if 0
Longword address;
Longword num_bytes;
+#else
+ unsigned long address;
+ unsigned long num_bytes;
+#endif
} ultrastor_sg_list;
/* This is our semaphore for mscp block availability */
@@ -348,8 +353,13 @@
/* Save ourselves some casts; can eliminate when we don't have to look a
t it anymore! */
sglist = (ultrastor_sg_list *) SCpnt->host_scribble;
for (i = 0; i < SCpnt->use_sg; i++) {
+#if 0
sglist[i].address = *(Longword *)&(sl[i].address);
sglist[i].num_bytes = *(Longword *)&(sl[i].length);
+#else
+ sglist[i].address = (unsigned long)sl[i].address;
+ sglist[i].num_bytes = (unsigned long)sl[i].length;
+#endif
transfer_length += sl[i].length;
}
mscp.number_of_sg_list = (char) SCpnt->use_sg;