Re: [PATCH] JMicron JM20337 USB-SATA data corruption bugfix - device152d:2338
From: Robert Hancock
Date: Wed Jul 30 2008 - 15:55:51 EST
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.
I suppose in such cases we could simply report that the command failed
completely.
I 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.
It could be that's what Windows is doing, and it's just silently
retrying commands. Though, some people have reported corruption on these
chipsets on Windows too, so maybe it has the same issue.
Is that SCSI/USB underflow fix from
http://bugzilla.kernel.org/show_bug.cgi?id=9638 being pushed forward by
anybody? If not, I can try and cook up a patch to take care of that as
well as the non-underflow failed CSW/no sense data issue.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/