Re: [usb-storage] mode sense blacklist how

Pat LaVarre
2003-11-14T19:42:25Z

// Everyone:

I think I'm seeing hints that possibly we've carried this reply-to-all
convention a little too far by now. Not sure how to fix that.

// Dmitri K:

> > To accomodate this device are we asking Dmitri K to give one last shot
> > to telling us if kernel crash, boot fs crash, or other is the result of
> > each of the twelve ...
> > ?
>
> I'll be away for the next 4 days. I'll try to test it now,
> if not I'll report when I come back ...
> What exactly do you want me to do?

Step-by-step instructions follow, in case you choose to try them.

I see we have committed to teaching usb-storage to blacklist mode sense,
despite thereby breaking sd devices that write-protect disks by
implementing mode sense as described in the fiction authored by t10.

Therefore I cannot know who among "we" besides me still cares that the
sample Sony stick you're sharing with us chokes over how we used to try
mode sense.

As for me, yes I remain curious. I'd like you (and all the world's
engineers) to learn to explore such matters.

> What exactly do you want me to do?

First step in learning to explore this way is to install some tool for
trying SG_IO from the command line, such as the download/ patch/ make
instructions of:

http://groups.google.com/groups?q=plscsi+sed+make

Newsgroups: mlist.linux.scsi
Subject: Re: [PATCH/RFT] mode sense madness always use page 8
Date: 2003-10-30 16:20:20 PST

You know you've finished decrypting that post when you get as far as:

sudo ./plscsi -w

Next you can proceed to try the twelve Sony stick experiments suggested
by that Win XP SP1 trace of an Iomega Zip with disk absent. I think I
remember translating from those experiments as posted to bash and plscsi
syntax requires just substituting -x for -y, thus yielding:

export PLSCSI=/dev/sda

sudo plscsi -i xC0 -x "1A 00:1C:00 C0 00" // Mode Sense (6)
sudo plscsi -i xC0 -x "1A 00:3F:00 C0 00" // Mode Sense (6)
sudo plscsi -i x0C -x "1A 00:00:00 0C 00" // Mode Sense (6)
sudo plscsi -i x0C -x "1A 00:3F:00 0C 00" // Mode Sense (6)

sudo plscsi -p -i xC0 -x "5A 00 1C:00:00:00 00 00:C0 00 00:00" // Mode Sense (10)
sudo plscsi -p -i xC0 -x "5A 00 3F:00:00:00 00 00:C0 00 00:00" // Mode Sense (10)
sudo plscsi -p -i x0C -x "5A 00 00:00:00:00 00 00:0C 00 00:00" // Mode Sense (10)
sudo plscsi -p -i x0C -x "5A 00 3F:00:00:00 00 00:0C 00 00:00" // Mode Sense (10)

sudo plscsi -p -i xC4 -x "5A 00 1C:00:00:00 00 00:C4 00 00:00" // Mode Sense (10)
sudo plscsi -p -i xC4 -x "5A 00 3F:00:00:00 00 00:C4 00 00:00" // Mode Sense (10)
sudo plscsi -p -i x10 -x "5A 00 00:00:00:00 00 00:10 00 00:00" // Mode Sense (10)
sudo plscsi -p -i x10 -x "5A 00 3F:00:00:00 00 00:10 00 00:00" // Mode Sense (10)

I trust already you understand, running plscsi with root or even just
device-write privilege by design can and does crash your kernel on
occasion, thus smashing automounted or manually mounted fs.

plscsi in effect gives you a way of typing out some of the code of a
module at the command line. Entering a mistyped or misconceived line of
plscsi can hurt you as deeply as loading an untested .ko.

I wonder if already you understand, you might like the results better if
you only try talking while you device has no disk inserted, or at least
while disk not mounted, and preferably while you have no automounter
talking to your device.

> From: Dmitri Katchalov ...
> I'll be away for the next 4 days.

Soon I will discover if I replied quickly enough to catch you. :)

Pat LaVarre