propose: change some sense codes handling

Borja Marcos borjam at sarenet.es
Tue Apr 5 11:53:14 UTC 2011


On Apr 5, 2011, at 1:30 PM, Borja Marcos wrote:

> 
> On Apr 5, 2011, at 1:15 PM, Andriy Gapon wrote:
> 
> As far as I know, this shouldn't be reported by a non-removable media device. It should be used by removable media such as tape units, magneto-optical drives, CDROM drives, WORMs...
> 
> 
> If a card read reports this, I assume that either the reader has crappy firmware _or_ it has an electrical contact problem with the media. But ignoring this error just could lead to data loss. In the case of a user replacing a memory card with a mounted filesystem, it would be certainly a data loss (blocks intended for one card written to a different card?)

To clarify my somewhat fuzzy message. I assume a card reader should report this in the following cases:

- User has replaced the card

- User has extracted and reinserted the card

- Electrical contact problem

- Crappy reader firmware

In either case it shouldn't be ignored causing just a retry.


In the case of a fixed memory pendrive, well, it would indicate either some serious internal error (this message is intended for removable media) or, again, maybe an unplugged and plugged on USB device, at most? Of course there's the option of buggy firmware reporting this for a non-removable media unit.

When you unplug a USB drive from the USB bus you are unplugging both the media and the controller. 






Borja.



More information about the freebsd-scsi mailing list