[6050] in linux-scsi channel archive
scsi.c fix for REGAL CDC-4X Changer
daemon@ATHENA.MIT.EDU (Heinrich Langos)
Wed Mar 10 07:44:39 1999
Date: Wed, 10 Mar 1999 11:53:39 +0100
From: Heinrich Langos <heinrich@zaphod.wh9.tu-dresden.de>
To: linux-scsi@vger.rutgers.edu
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
hi,
some time ago a fix for the REGAL CD Changer showed up in the kernel but
disapeared again some versions later.
The device holds 5 CDs (LUN 0-4) and locks up when probed for a LUN > 4.
Sure, entering "max_scsi_luns=5" at the lilo prompt works but that
would also block higher LUNs on other devices (if I had any other
multi-LUN device that is :-) ).
I hope the author of that fix is still on this list and will include
that fix again in the next kernel. In case the original author is not
around I'll attach a "diff -u" that showes the changes that have to be
made to stop that thing from locking up at reboot. I am not the author
of the patch but since it was in the kernel once there should be no
license problem with including it again.
best regards
-heinrich
--
Heinrich Langos <heinrich@null.net>
pgp: "finger -l hl6@irz.inf.tu-dresden.de"
______________________________________________________________________
|o| The reason we come up with new versions is not to fix bugs. |o|
|o| It's absolutely not. It's the stupidest reason to buy a new |o|
|o| version I ever heard. -- Bill Gates, CEO, Microsoft Corporation |o|
|o| BOYCOTT MICROSOFT: <http://www.vcnet.com/bms/> |o|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="scsi.c_regal.patch"
--- scsi.c Mon Jan 18 03:29:54 1999
+++ /usr/src/kernel-source-2.2.1/drivers/scsi/scsi.c Tue Feb 9 19:59:11 1999
@@ -109,6 +109,7 @@
#define BLIST_SINGLELUN 0x10
#define BLIST_NOTQ 0x20
#define BLIST_SPARSELUN 0x40
+#define BLIST_MAX5LUN 0x80
/*
* Data declarations.
@@ -268,6 +269,7 @@
{"INSITE","I325VM","*", BLIST_KEY},
{"NRC","MBR-7","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"NRC","MBR-7.4","*", BLIST_FORCELUN | BLIST_SINGLELUN},
+{"REGAL","CDC-4X","*", BLIST_MAX5LUN | BLIST_SINGLELUN},
{"NAKAMICH","MJ-4.8S","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"NAKAMICH","MJ-5.16S","*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"PIONEER","CD-ROM DRM-600","*", BLIST_FORCELUN | BLIST_SINGLELUN},
@@ -927,6 +929,13 @@
*max_dev_lun = 8;
return 1;
}
+ /*
+ * REGAL CDC-4X: avoid hang after LUN 4
+ */
+ if (bflags & BLIST_MAX5LUN) {
+ *max_dev_lun = 5;
+ return 1;
+ }
/*
* We assume the device can't handle lun!=0 if: - it reports scsi-0 (ANSI
* SCSI Revision 0) (old drives like MAXTOR XT-3280) or - it reports scsi-1
--gBBFr7Ir9EOA20Yy--
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu