On Mon, 12 Oct 2009, Benjamin Herrenschmidt wrote: > BTW. I noticed that USB storage is supposed to avoid doing the reset if > the device is multifunction. Not "multifunction" but "multitarget" -- which means that the device is attached to a real SCSI bus which may have more than one target. In such a situation it's best to avoid bus resets when possible, since they affect all the targets. > I suppose that flag gets set prior to the > "mode switch" and so the reset happens regardless... maybe we should set > that MF flag from the quirk that sends the mode switch ? You mean, avoid doing a reset after an auto-sense failure if the device has other interfaces? Maybe... I'm not really sure. To tell the truth, that comment about "failure of an auto-sense is perfectly valid" doesn't make much sense to me. In principle, the SCSI core would have to issue its own REQUEST SENSE command and the end result would be the same. (In your case that wouldn't happen, because the device actually did send valid sense data before sending the failure code. The SCSI core would see that data sitting in the buffer and believe it. So things would work out okay, but only by coincidence, not by design -- unless we wipe the buffer before returning.) I don't know. Maybe it really would be best not to reset after an auto-sense failure, ever. I can't recall the issue coming up in any bug reports before. But then what should we do after an auto-sense error? It probably should be treated the same as a normal error, which means doing a reset. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html