patch-2.1.126 linux/drivers/scsi/scsi.h

Next file: linux/drivers/scsi/scsi_debug.c
Previous file: linux/drivers/scsi/scsi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/drivers/scsi/scsi.h linux/drivers/scsi/scsi.h
@@ -690,16 +690,22 @@
  * that an interrupt may start another request, so we run this with interrupts
  * turned off 
  */
-#define INIT_SCSI_REQUEST       \
-    if (!CURRENT) {             \
-	CLEAR_INTR;             \
-	return;                 \
-    }                           \
-    if (MAJOR(CURRENT->rq_dev) != MAJOR_NR)           \
-	panic(DEVICE_NAME ": request list destroyed");\
-    if (CURRENT->bh) {                                \
-	if (!buffer_locked(CURRENT->bh))              \
-	    panic(DEVICE_NAME ": block not locked");  \
+#if MAJOR_NR == SCSI_DISK0_MAJOR
+#define CHECK_INITREQ_SD_MAJOR(major) SCSI_DISK_MAJOR(major)
+#else
+#define CHECK_INITREQ_SD_MAJOR(major) ((major) == MAJOR_NR)
+#endif
+
+#define INIT_SCSI_REQUEST       			\
+    if (!CURRENT) {             			\
+	CLEAR_INTR;             			\
+	return;                 			\
+    }                           			\
+    if (!CHECK_INITREQ_SD_MAJOR(MAJOR(CURRENT->rq_dev)))\
+	panic(DEVICE_NAME ": request list destroyed");	\
+    if (CURRENT->bh) {                                	\
+	if (!buffer_locked(CURRENT->bh))              	\
+	    panic(DEVICE_NAME ": block not locked");  	\
     }
 #endif
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov