[PATCH] 2.0.35 scsi.c single_lun flag

Edgar Toernig (froese@gmx.de)
Fri, 07 Aug 1998 02:42:53 +0200


Hi,

as I (or better Derrick) noticed, the fix for the single_lun flag never
made it to the 2.0 kernels. It's already present in the 2.1 kernels
since 2.1.75 and in my 2.0 kernel for over a year now.

This patch is required by some CD-changers. Without it, you may get
spurious scsi lockups when accessing multiple LUNs at the same time.

Ciao, ET.

--- /usr/src/linux-2.0.35/drivers/scsi/scsi.c.orig Fri Aug 7 02:21:37 1998
+++ /usr/src/linux-2.0.35/drivers/scsi/scsi.c Fri Aug 7 02:24:12 1998
@@ -750,6 +750,13 @@
SDpnt->borken = 0;

+ /*
+ * If we want to only allow I/O to one of the luns attached to this device
+ * at a time, then we set this flag.
+ */
+ if (bflags & BLIST_SINGLELUN)
+ SDpnt->single_lun = 1;
+
/*
* These devices need this "key" to unlock the devices so we can use it
*/
if ((bflags & BLIST_KEY) != 0) {
@@ -790,13 +797,6 @@
*/
if (bflags & BLIST_NOLUN)
return 0; /* break; */

- /*
- * If we want to only allow I/O to one of the luns attached to this device
- * at a time, then we set this flag.
- */
- if (bflags & BLIST_SINGLELUN)
- SDpnt->single_lun = 1;
-
/*
* If this device is known to support sparse multiple units, override the

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html