Re: USB storage SCSI EH oops

James Bottomley
2012-04-18T07:53:26Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1519 bytes --]

On Sat, 2012-04-14 at 15:49 -0700, Linus Torvalds wrote:
> On Sat, Apr 14, 2012 at 3:29 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Confirmed.
> >
> > I tested twice: with that patch, the oops is repeatable, and happens
> > something like 30 seconds after plugging in the USB thing into the
> > monitor.
> >
> > With that patch reverted, the thing still doesn't *work*, but I don't
> > get the oops. Instead, I get the appended noise in my dmesg..
>
> .. and the reason that card reader has trouble seems to be that it's
> just too damn old, and doesn't understand SD-HC cards. It works fine
> with old SD cards.
>
> So the reader is fine (well, apart from being too old), USB-storage is
> fine, but the SCSI error handler is broken.
>
> Even with that commit reverted, once the SCSI layer has decided to
> off-line the device, you can't get it back, even if you remove the
> media and insert a non-HC SD card. You have to unplug and re-plug the
> reader. That seems to be a slight misfeature of SCSI error handling,
> but compared to oopsing, it's minor.

OK, will either queue the update or a revert.

Just on the offline device problem; after it's offlined, can you get it
back with

echo running > /sys/block/sd<x>/device/state

?

That would show we're failing to recognise the device as removable media
which is gone.

James

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥