On Wed, 5 Dec 2007, James Bottomley wrote: > > For one thing, you've using retries to control both an outer loop and > > an inner loop -- meaning the total number of attempts could be on the > > order of retries**2. > > Sort of; however, there should only really be one cc/ua before the TUR > goes through. Also, TUR produces almost no conditions that would be > retryable in scsi_decide_disposition() and the scsi_execute sends it > down with REQ_FAILFAST anyway, so it's really not used much. > > > For another, why do you want to swallow a UNIT_ATTENTION? Shouldn't > > that be up to the code calling scsi_test_unit_ready()? > > No, that's a bug in the old code. UA doesn't necessarily mean there's a > media change. It could be asserted for a whole host of reasons. Until > we get proper UA signalling, we need to resend the TUR so we get the > correct media status and discard the UA (Even if the device is asserting > UA for media change reasons, it will still give the correct sense code > response to the following TUR).
Well then, the patch appears good. I haven't been able to test it because it's based against a source tree I haven't got. Can you provide an equivalent patch against 2.6.24-rc4? Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html