public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Re: USB storage problems on OHCI..
@ 2003-09-22 18:55 Andries.Brouwer
  0 siblings, 0 replies; 39+ messages in thread
From: Andries.Brouwer @ 2003-09-22 18:55 UTC (permalink / raw)
  To: patmans, torvalds
  Cc: Andries.Brouwer, david-b, greg, hch, linux-scsi, linux-usb-devel,
	mdharm-usb, stern

> Basically, Andries Brouwer's strategy of making sd.c more conservative has
> been a very successful one in the past. Why not continue on that?

% I would be interested in hearing what Andries has to say. ...
% The variety of ways in which these things fail is truly amazing.

Yes.

We have just seen this for keyboards: keypresses work, modifier key
releases work, and as soon as one assumes anything more there turn
out to be keyboards that fail.

Similarly, USB storage devices tend to fail whatever one tries,
and only systematically work if one does precisely what Windows
does. For SCSI disks things are not nearly as bad - there are
only a few manufacturers and they mostly produce quality stuff.

This means that carefully reading the SCSI standard is a useful
activity if one writes for SCSI disks. But for USB storage it
is more productive to trace the commands the various flavours
of Windows send.

(Yes, I am willing to collect whatever people send me, and put up
a web page describing the Windows way of addressing USB storage.)

So, I agree with Linus (and with myself :-)) - in the absence of
precise knowledge about the device and about its Windows drivers
all that is left is being as conservative as possible.
And I agree with Alan - even though being careful is a very good idea,
it does not help in all cases.

There are some general things we can do - for CF cards and the like
we probably do not want to read the cache type - USB is hot pluggable,
so it should not be necessary to send a flush cache command at shutdown.
Today I see

        if (sdkp->media_present) {
                sd_read_capacity(sdkp, disk->disk_name, sreq, buffer);
                if (sdp->removable)
                        sd_read_write_protect_flag(sdkp, disk->disk_name,
                                        sreq, buffer);
                sd_read_cache_type(sdkp, disk->disk_name, sreq, buffer);
        }

and I suppose we could skip sd_read_cache_type() in the
hot-pluggable case - a flag that USB storage could set.

Andries


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: [linux-usb-devel] Re: USB storage problems on OHCI..
@ 2003-09-23 14:51 James Bottomley
  2003-09-23 15:23 ` Alan Stern
  0 siblings, 1 reply; 39+ messages in thread
From: James Bottomley @ 2003-09-23 14:51 UTC (permalink / raw)
  To: Andries.Brouwer
  Cc: david-b, greg, hch, SCSI Mailing List, linux-usb-devel,
	mdharm-usb, Patrick Mansfield, stern, Linus Torvalds

On Tue, 2003-09-23 at 09:37, Andries.Brouwer@cwi.nl wrote:
> No, the design goal of "hot-pluggable" is that it indicates that
> the device can disappear any moment. Nothing at all about SCSI
> compliance.

Actually, then, these are two issues...hotplug is being worked on
separately at the moment.

I thought the problem under discussion was devices which lacked SCSI
standards compliance.

> Pulling out a device while it is actively reading or writing
> will probably break something. But if a device is hot-pluggable
> it should be OK to pull it out when it has been inactive for
> a second or so.
> 
> But if that is really true, then it should not be necessary
> to send the device any "synchronise cache" commands when we
> shut down.

For a FC array, suprise unplug would be caveat emptor (possibly because
fibre connection transience is going to cause it to come back), but
notified unplug would still want to flush the cache on the assumption
the next action might be to power down the array.

James



^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2003-10-03 21:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030922004943.E32009@one-eyed-alien.net>
2003-09-22 14:25 ` [linux-usb-devel] Re: USB storage problems on OHCI Alan Stern
2003-09-22 14:31   ` Christoph Hellwig
2003-09-22 15:11     ` Christoph Hellwig
2003-09-22 15:49       ` Patrick Mansfield
2003-09-22 16:09         ` [linux-usb-devel] " Linus Torvalds
2003-09-22 16:42           ` Alan Stern
2003-09-22 17:23           ` Patrick Mansfield
2003-09-22 17:41             ` [linux-usb-devel] " Linus Torvalds
2003-09-22 17:55               ` James Bottomley
2003-09-22 19:55                 ` [linux-usb-devel] " Linus Torvalds
2003-09-23 17:47                   ` Ruud Linders
2003-09-23 18:16                     ` Linus Torvalds
2003-09-24 16:40                       ` Ruud Linders
2003-09-24 16:53                         ` Linus Torvalds
2003-09-26 18:43                           ` Alan Stern
2003-10-03 14:18                             ` Alan Stern
2003-10-03 15:05                               ` James Bottomley
2003-10-03 21:35                                 ` Patrick Mansfield
2003-09-22 18:46           ` Alan Cox
2003-09-22 16:37         ` [linux-usb-devel] " Christoph Hellwig
2003-09-22 16:44           ` Patrick Mansfield
2003-09-22 17:21             ` Christoph Hellwig
2003-09-22 19:01               ` Alan Stern
2003-09-22 15:50       ` Alan Stern
2003-09-22 15:58         ` Patrick Mansfield
2003-09-22 16:36           ` [linux-usb-devel] " Alan Stern
2003-09-22 16:38         ` Christoph Hellwig
2003-09-22 15:29   ` [linux-usb-devel] " Linus Torvalds
2003-09-22 16:22     ` David Brownell
2003-09-22 16:31       ` [linux-usb-devel] " Linus Torvalds
2003-09-22 17:13         ` David Brownell
2003-09-22 17:29           ` Linus Torvalds
2003-09-22 17:49             ` [linux-usb-devel] " David Brownell
2003-09-22 18:40               ` Linus Torvalds
2003-09-22 19:14                 ` Alan Stern
2003-09-22 16:58       ` [linux-usb-devel] " Martin Diehl
2003-09-22 17:19         ` David Brownell
2003-09-22 18:55 Andries.Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2003-09-23 14:51 [linux-usb-devel] " James Bottomley
2003-09-23 15:23 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox