All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: stern@rowland.harvard.edu
Cc: patmans@us.ibm.com, mdharm-usb@one-eyed-alien.net,
	usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi?
Date: 11 Sep 2003 14:42:33 -0600	[thread overview]
Message-ID: <1063312953.3347.24.camel@patehci2> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0309111551410.2667-100000@ida.rowland.org>

> From: Matthew Dharm <mdharm-scsi () one-eyed-alien ! net>
>
> I think allowing write to read-only media is
> the only way to go.  I don't see another way
> to get write-protect status.

Does write-protect work for dvd-ram?

How?

> From: 	Alan Stern <stern@rowland.harvard.edu>
> ...
> (Apparently the commands don't present a
> problem for sr.c.)

sr.c shows this problem by getting the wrong answer.

sr.c is getting cd->device->writeable wrong for all the seven-or-so mmc
writable profiles except dvd-ram.

Some background from me and patches from Andy Polyakov and Jens Axboe
appear in:
Subject: Re: [PATCH] mount -w of dvd+rw etc. in vanilla 2.6
http://marc.theaimsgroup.com/?t=106123318400007

> From: Matthew Dharm <mdharm-scsi () one-eyed-alien ! net>
> ... I'm going to have some code that will not
> apply the filters (any filters) if the request
> comes from sg,

More old good sense!

Following are relevant posts from me that some archives before now have
not included in this thread.

Pat LaVarre

---

Subject: Re: PATCH: exclude certain commands from emulated SCSI hosts 
Date: 2003-04-23 14:45:31 PST 
From: Pat LaVarre (ppaatt@aol.com)

> http://groups.google.com/groups?group=mlist.linux.scsi
> Subject: Re: PATCH: exclude certain commands from emulated SCSI hosts 
>
> > From: Patrick Mansfield (patmans@us.ibm.com)
> > Date: 2003-04-07 15:42:13 PST 
> >
> > Would a user ever want to send a MODE SENSE
> > to USB storage device?)
>
> From: Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
> Date: 2003-04-21 17:04:05 PST  
>
> a very large number of USB devices of TYPE DISK do
> not  support MODE SENSE in any form.  Apparently,
> the 'popular' OSes don't use it.

I have some reason to believe Windows often passes thru something like:
-x "1A 00 08 00 18 00" -i x18
i.e. a ModeSense6 of Cacheing page x08 for the whole 4 byte header plus
one whole 8 byte block descriptor plus the whole xC byte standard page.

But I haven't studied this closely enough to know if that's precisely
correct, nor do I know when it gets translated to op x5A ModeSense10,
nor do I know when it is faked out in the host entirely, never reaching
the bus.

> From: Alan Stern (stern@rowland.harvard.edu)
> Date: 2003-04-22 11:21:36 PST ...
>
> a comment in drivers/storage/usb/protocol.c
> indicating that 8 is the minimum size for a
> MODE-SENSE (line 257).

Perhaps we mean:
http://lxr.linux.no/source/drivers/usb/storage/protocol.c?v=2.5.56#L274
/* again, for MODE_SENSE_10, we get the minimum (8) */

I don't know of any merely public standard that admits 8 (i.e. the whole
standard header) is a minimum.

I do know Win 2K kernel dies if a root-privileged app is so rude as to
express an x5A ModeSense10 ModeSense for less than 8 as op x1A
ModeSense6:
http://support.microsoft.com/?kbid=813908
SCSI Pass-Through Mode Sense Command May Crash the Computer

> > From: Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
> > Date: 2003-04-05 11:40:24 PST 
> >
> > (1) can't filter TEST UNIT READY (opcode 0).
> > Not a big deal, but a theoretical problem.
> >
> From: James Bottomley (James.Bottomley@steeleye.com)
> Date: 2003-04-05 12:00:18 PST 
>
> TUR has been mandatory since SCSI-1, ...

A zeroed six byte CDB has been mandatory.  Other forms of TUR are less
widely supported.
...

-----Forwarded Message-----

From: p.lavarre@ieee.org
To: patmans@us.ibm.com
Cc: stern@rowland.harvard.edu, mdharm-usb@one-eyed-alien.net,
usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [usb-storage] Re: [linux-usb-devel] [2.6-test] Bug in
usb-storage or scsi?
Date: 11 Sep 2003 14:04:54 -0600

> http://marc.theaimsgroup.com/?t=104839042700001&r=1&w=2

Thanks, there I find 44 posts dated since 2003-03 with Subject's like:
"PATCH: exclude certain commands from emulated SCSI hosts".

By the way, Google yields [an interestingly] different set of 44 posts:
http://groups.google.com/groups?threadm=linux.scsi.20030322193705.C17056%40one-eyed-alien.net

In both archives I think I see much sense:

> > From: Matthew Dharm <mdharm-usb () one-eyed-alien ! net> ...
> >
> > (a) don't ask for EVPD data, ...
> > (b) assume ... only 36-bytes of INQUIRY data, ...
> > (c) ... assume write-enabled for all disk-like media.
>
> From: Linus Torvalds <torvalds () transmeta ! com>
>
> suggest ... make the Linux SCSI layer
> ... use the sequences of commands that "that other OS" uses ...
> "don't use commands that haven't gotten much testing" ...
...




  parent reply	other threads:[~2003-09-11 20:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 19:49 [2.6-test] Bug in usb-storage or scsi? Georgi Chorbadzhiyski
2003-09-09 20:51 ` [linux-usb-devel] " Alan Stern
2003-09-09 21:17   ` Georgi Chorbadzhiyski
2003-09-10 16:23     ` Alan Stern
2003-09-10 18:16       ` [usb-storage] " Pat LaVarre
2003-09-10 18:49         ` sg MiB writes scheduling while atomic Pat LaVarre
2003-09-10 19:30           ` Pat LaVarre
2003-09-16  6:35             ` Douglas Gilbert
2003-09-16 11:42               ` Matthew Wilcox
2003-09-16 12:58                 ` Christoph Hellwig
2003-10-14 23:36                 ` Pat LaVarre
2003-09-10 20:08           ` [PATCH] mount -w of dvd+rw etc. in vanilla 2.6 Pat LaVarre
2003-09-10 22:49             ` Patrick Mansfield
2003-09-22 14:52           ` max GiB written per boot Pat LaVarre
2003-09-10 20:51         ` unsolicited sense in 2.6.0-test5 usb-storage.ko Pat LaVarre
2003-09-10 21:03           ` [usb-storage] " Alan Stern
2003-09-10 21:24             ` Pat LaVarre
2003-09-10 21:52               ` Matthew Dharm
2003-09-10 22:08                 ` Pat LaVarre
2003-09-12  0:21                   ` Pat LaVarre
2003-09-12  0:29                     ` Pat LaVarre
2003-09-16 11:28                 ` Douglas Gilbert
2003-09-11  0:02       ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Patrick Mansfield
2003-09-11 20:04         ` [usb-storage] " Pat LaVarre
2003-09-11 20:05         ` Alan Stern
2003-09-11 20:19           ` James Bottomley
2003-09-12 21:17             ` Alan Stern
2003-09-11 20:42           ` Pat LaVarre [this message]
2003-09-11 23:18             ` [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course Pat LaVarre
2003-09-12 19:59             ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
2003-09-12 19:18           ` Pat LaVarre
2003-09-12 18:43         ` Pat LaVarre
2003-09-12 20:56           ` Patrick Mansfield
2003-09-12 21:53             ` Pat LaVarre
2003-09-10 21:07 Pat LaVarre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1063312953.3347.24.camel@patehci2 \
    --to=p.lavarre@ieee.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=patmans@us.ibm.com \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.