propose: change some sense codes handling

Andriy Gapon avg at FreeBSD.org
Tue Apr 5 12:43:50 UTC 2011


on 05/04/2011 14:53 Borja Marcos said the following:
> 
> 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. 

Actually, this sense code is reported by a particular USB thumbdrive that I have.
So the media is definitely non-removable.  And it happens each time I plug the
thumbdrive.  So I'd hazard a guess about its firmware.

-- 
Andriy Gapon


More information about the freebsd-scsi mailing list