Re: Problem w/ recent scsi_scan changes
Hi Steve, On Mon, 31 Jul 100, Steve Ralston wrote: We're having a problem with recent (linux-2.4.0-test2) scsi_scan.c, centered around this change: /* * We used to do a TEST_UNIT_READY before the INQUIRY but that was * not really necessary. Spec recommends using INQUIRY to scan for * devices (and TEST_UNIT_READY to poll for media change). - Paul G. */ This change has caused additional "ghost" LUNs to be seen by linux. We have a RAID subsystem that happens to return (e.g.): SCSI Error Report =-=-= (ioc0,scsi0:4) SCSI_Status=02h (CHECK CONDITION) Original_CDB[]: 00 80 00 00 00 00 - "TEST UNIT READY" SenseData[A0h]: 70 00 05 00 00 00 00 98 00 00 00 00 25 00 00 00 00 00 ... SenseKey=5h (ILLEGAL REQUEST); FRU=00h ASC/ASCQ=25h/00h "LOGICAL UNIT NOT SUPPORTED" to TEST_UNIT_READY (and READ_CAPACITY, et al), which *used* to cause linux to ignore the LUN. We kindly request that TEST_UNIT_READY *before* INQUIRY be reinstated. The reason for why this has been changed was, that some SCSI-devices, mainly those with changeable media, like tapedrives, CD-ROMs or Syquest drives won't get recognized. The TEST_UNIT_READY may fail on such devices, if no medium is inserted. The INQUIRY command should always work on physically present drives, no matter if a medium is present or not and it therefore offers the safest way to detect some SCSI-device. Maybe, one could think of some TEST_UNIT_READY to be done on unchangeable media, before the INQUIRY test is done. This could be some point of discussion. Greetings Michael - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]
Re: Problem w/ recent scsi_scan changes
On Monday, July 31, 2000, Michael Lang wrote: The reason for why this has been changed was, that some SCSI-devices, mainly those with changeable media, like tapedrives, CD-ROMs or Syquest drives won't get recognized. The TEST_UNIT_READY may fail on such devices, if no medium is inserted. The INQUIRY command should always work on physically present drives, no matter if a medium is present or not and it therefore offers the safest way to detect some SCSI-device. Ok, I can understand the reasoning behind the change then. Maybe, one could think of some TEST_UNIT_READY to be done on unchangeable media, before the INQUIRY test is done. This could be some point of discussion. Hmmm... One has to perform INQUIRY *before* you know whether or not the media is changeable or not, no? Instead of the original TUR then INQUIRY, maybe INQUIRY followed by TUR would be workable. If TUR returns "Logical Unit Not Supported" or somesuch, then nix the scsi device. Thanks, -SteveR - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]
Re: Problem w/ recent scsi_scan changes
We're having a problem with recent (linux-2.4.0-test2) scsi_scan.c, centered around this change: /* * We used to do a TEST_UNIT_READY before the INQUIRY but that was * not really necessary. Spec recommends using INQUIRY to scan for * devices (and TEST_UNIT_READY to poll for media change). - Paul G. This change is correct. We have a RAID subsystem that happens to return (e.g.): SCSI Error Report =-=-= (ioc0,scsi0:4) SCSI_Status=02h (CHECK CONDITION) Original_CDB[]: 00 80 00 00 00 00 - "TEST UNIT READY" SenseData[A0h]: 70 00 05 00 00 00 00 98 00 00 00 00 25 00 00 00 00 00 ... SenseKey=5h (ILLEGAL REQUEST); FRU=00h ASC/ASCQ=25h/00h "LOGICAL UNIT NOT SUPPORTED" to TEST_UNIT_READY (and READ_CAPACITY, et al), which *used* to cause linux to ignore the LUN. We kindly request that TEST_UNIT_READY *before* INQUIRY be reinstated. That breaks some standards compliant subsystems. Probably what needs to be done is to accept logical-unit-not-supported from a TUR as meaning we guessed wrongly Alan - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]
Re: Problem w/ recent scsi_scan changes
The reason for why this has been changed was, that some SCSI-devices, mainly those with changeable media, like tapedrives, CD-ROMs or Syquest drives won't get recognized. The TEST_UNIT_READY may fail on such devices, if no medium is inserted. The INQUIRY command should always work on physically present drives, no matter if a medium is present or not and it therefore offers the safest way to detect some SCSI-device. Does Linux look at the content of the inquiry data to determine if the Lun really is supported before attaching to it? Linux should only attach if the lun qualifier is 0 (top 3 bits in byte 0 of inquiry response). -- Justin - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]
RE: Problem w/ recent scsi_scan changes
I submitted a patch a couple weeks ago that sets the SDpnt-online=FALSE if the peripheral qualifier returned with a value 1 (device not physically connected). This just avoids the READ_CAPACITY inquiry and resulting error. As Justin suggests, the SCSI layer could take it to mean that a device won't be connected on that LUN, so it shouldn't attach to that device, and then later if a physical device IS connected, then use the scsi-add-single-device mechanism to bind it to a device name. int scan_scsis_single() ... if (((scsi_result[0] 5) 7) == 1) SDpnt-online = FALSE; else SDpnt-online = TRUE; ... -Matt -Original Message- From: Justin T. Gibbs [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000 6:10 PM To: Michael Lang A2 Cc: Steve Ralston; linux-scsi Subject: Re: Problem w/ recent scsi_scan changes Does Linux look at the content of the inquiry data to determine if the Lun really is supported before attaching to it? Linux should only attach if the lun qualifier is 0 (top 3 bits in byte 0 of inquiry response). -- Justin - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]