From: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
To: Patrick Mansfield <patmans@us.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
usb-storage@one-eyed-alien.net,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Time to conclude the Sony USB mass storage thread
Date: Fri, 14 Nov 2003 09:35:03 -0800 [thread overview]
Message-ID: <20031114093503.B19467@one-eyed-alien.net> (raw)
In-Reply-To: <20031114092644.A2794@beaverton.ibm.com>; from patmans@us.ibm.com on Fri, Nov 14, 2003 at 09:26:44AM -0800
[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]
I'm strongly attempted to agree with you guys.... blacklisting looks like
the way to go.
I'm concerned about the names, tho.... BLIST_MS_SKIP_PAGE_08 sounds more
general than it is -- as I understand it, this flag will only affect sd.c,
tho it looks much more general.
I think I'd rather tweak the structure in slave_configure, where it will be
easier to add more logic if people decide we need it in the future.
Matt
On Fri, Nov 14, 2003 at 09:26:44AM -0800, Patrick Mansfield wrote:
> On Fri, Nov 14, 2003 at 09:52:24AM -0600, James Bottomley wrote:
> > Since Patrick has already provided the mechanics for this, I suggest we
> > do this by setting the skip_ms_page_3f and skip_ms_page_8 globally in
> > the usb-storage slave configure routines.
> >
> > If there are known good devices, it would probably be best to add them
> > to the USB special devices list to have these flags reset for the
> > capabilities.
> >
> > The nice thing about this approach is that I don't have to do anything
> > in SCSI, and the control of the USB black/white list is entirely in the
> > USB subsystem.
> >
> > Does this sound like a plan?
>
> It would be best to just use the BLIST flags setting in the host .flags,
> the following simple patch (only compile tested!) will not send any MODE
> SENSE to sd devices (SCSI direct access inquiry type 0, or optical
> memory/optical disks inquiry type 7).
>
> It also allows the setting to be overwritten for specific vendor + model
> via the scsi_devinfo/dev_flags code - so users or distributions can white
> list devices without modifying the kernel (devinfo settings have priority
> over shost->flags, see scsi_devinfo.c).
>
> I did not give the flags very good names, for clarity:
>
> BLIST_MS_SKIP_PAGE_08 means for sd assume write through cache.
>
> BLIST_MS_SKIP_PAGE_3F means for sd assume writable media.
>
> And we don't need any special code in a slave_configure or elsewhere to
> check if it is a direct access device.
>
> diff -uprN -X /home/patman/dontdiff bl-25/drivers/usb/storage/scsiglue.c usb-ms-flags/drivers/usb/storage/scsiglue.c
> --- bl-25/drivers/usb/storage/scsiglue.c Mon Oct 27 14:28:18 2003
> +++ usb-ms-flags/drivers/usb/storage/scsiglue.c Fri Nov 14 09:15:20 2003
> @@ -322,7 +322,8 @@ struct scsi_host_template usb_stor_host_
> .emulated = TRUE,
>
> /* modify scsi_device bits on probe */
> - .flags = (BLIST_MS_SKIP_PAGE_08 | BLIST_USE_10_BYTE_MS),
> + .flags = (BLIST_MS_SKIP_PAGE_08 | BLIST_MS_SKIP_PAGE_3F |
> + BLIST_USE_10_BYTE_MS),
>
> /* module management */
> .module = THIS_MODULE
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
G: Money isn't everything, A.J.
AJ: Who convinced you of that?
G: The Chief, at my last salary review.
-- Mike and Greg
User Friendly, 11/3/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2003-11-14 17:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-14 15:52 Time to conclude the Sony USB mass storage thread James Bottomley
2003-11-14 17:26 ` Patrick Mansfield
2003-11-14 17:35 ` Matthew Dharm [this message]
2003-11-14 17:58 ` Patrick Mansfield
2003-11-14 18:52 ` Matthew Dharm
2003-11-14 20:00 ` Patrick Mansfield
2003-11-14 20:30 ` [usb-storage] " Matthew Dharm
2003-11-14 20:56 ` Patrick Mansfield
2003-11-15 2:13 ` Patrick Mansfield
2003-11-15 20:20 ` Matthew Dharm
2003-11-16 0:02 ` Patrick Mansfield
2003-11-17 5:33 ` Matthew Dharm
2003-11-17 16:57 ` Patrick Mansfield
2003-11-14 17:52 ` 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=20031114093503.B19467@one-eyed-alien.net \
--to=mdharm-scsi@one-eyed-alien.net \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=patmans@us.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox