Re: [RFC PATCH] consolidate SCSI-2 command lun setting

James Bottomley
2002-10-15T20:30:02Z

This all looks OK, except here:

+++ b/drivers/scsi/scsi_lib.c Tue Oct 15 09:46:06 2002
@@ -972,6 +972,14 @@
continue;
}
}
+ /*
+ * If SCSI-2 or lower, store the LUN value in cmnd.
+ */
+ if (SDpnt->scsi_level <= SCSI_2)
+ SCpnt->cmnd[1] = (SCpnt->cmnd[1] & 0x1f) |
+ (SCpnt->lun << 5 & 0xe0);
+
+
/*
* Finally, initialize any error handling parameters, and set up
* the timers for timeouts.

Shouldn't this code go early in scsi_dispatch_io instead? (with something
similar in scsi_send_eh_cmnd)

James