On Wed, Jul 30, 2008 at 01:55:25PM -0600, Robert Hancock wrote:Alan Stern wrote:On Wed, 23 Jul 2008, Robert Hancock wrote:
It remains an issue, though, that if there's no underflow, if the device reports an error in the CSW but doesn't provide sense data, we assume nothing bad happened and don't retry. That definitely does not seem correct. The device is not supposed to do this, but with how crappily some of these devices are designed we should be more defensive.The problem is, what can you do? The device has said that something was wrong, but it hasn't told you what. Without knowing what went wrong, you can't know how to recover.
Yes and no. If ASC/ASCQ is clear, then it's telling you that nothing is
wrong. The device is contradicting itself. That doesn't really help us
here, but it's a point I like to be clear on.
I suppose in such cases we could simply report that the command failedI think that is what we need to do. The SCSI/block layers should retry the command or report a failure to userspace. Above all else we can't just continue on our merry way and assume success, otherwise data will get silently corrupted.
completely.
The code path to supress the reporting of an error when auto-sense shows no
ASC/ASCQ was added for a reason. That reason has likely been lost to time,
but I worry about devices that are out there that rely on the current
behavior to function properly....