On Thu, 17 Feb 2005, Sara Fonseca wrote:

> I simulated a block error doing this: when the host tries to read one
> specific logical block, I change some bytes. The I try two things:
> 1) Just returns the number of bytes the host expects and finish with
> no erros. The host just reports I/O error and doesnt take any other
> action.

Do you know why the host reports an I/O error if you finish with no 
errors?  How does the host realize that something went wrong?

> 2) Detect the error, stall bulk-in and report a command failed. As
> sense data i return
> usb-storage: -- code: 0xf0, key: 0x3, ASC: 0x11, ASCQ: 0x0
> usb-storage: Medium Error: Unrecovered read error
> 
> It seems like the host should ignore the damaged logical block, but
> that isnt done.

Why should the host ignore the damaged block?  I would expect the host to
retry the read several times, eventually give up, and put an error message
in the system log.  That's very different from ignoring it.

Of course, what actually happens depends very much on what host you are 
using.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to