mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Patrick Mansfield <patmans@us.ibm.com>
Cc: Andries.Brouwer@cwi.nl, Greg KH <greg@kroah.com>,
	mochel@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: sysfs
Date: Mon, 13 Jan 2003 16:51:02 -0800	[thread overview]
Message-ID: <20030113165102.A26346@one-eyed-alien.net> (raw)
In-Reply-To: <20030113162741.A18396@beaverton.ibm.com>; from patmans@us.ibm.com on Mon, Jan 13, 2003 at 04:27:41PM -0800

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

Really, we don't want to hang the device under USB... it's really an
emulated SCSI device.  Or, at least I think so.

Matt

On Mon, Jan 13, 2003 at 04:27:41PM -0800, Patrick Mansfield wrote:
> Andries -
> 
> On Sat, Jan 11, 2003 at 03:43:27PM +0100, Andries.Brouwer@cwi.nl wrote:
> > Yesterday evening I wrote a trivial utility fd ("find device")
> > that gives the contents of sysfs. Mostly in order to see what
> > name the memory stick card reader has today.
> > 
> > I wondered about several things.
> > Is there a description of the intended hierachy, so that one can
> > compare present facts with intention?
> > 
> > In /sysfs/devices I see
> > 1:0:6:0  2:0:0:1  2:0:0:3  3:0:0:1  4:0:0:0  4:0:0:2   ide0  legacy  sys
> > 2:0:0:0  2:0:0:2  3:0:0:0  3:0:0:2  4:0:0:1  ide-scsi  ide1  pci0
> > many SCSI devices and some subdirectories.
> > Would it not be better to have subdirectories scsiN just like ideN?
> > One can have SCSI hosts, even when presently no devices are connected.
> 
> It looks like there is a missing scsi_set_device() call in scsiglue.c,
> (similiar to what happens if we handled NULL dev pointer in scis_add_host)
> so all the usb scsi devices end up under /sysfs/devices.
> 
> I don't have any usb mass storage devices, this patch against 2.5 bk
> compiles but otherwise is not tested. It should put the usb-scsi mass
> storage devices below the usb sysfs dev (I assume in your case under
> /sysfs/devices/pci0/00:07.2/usb1/1-2/1-2.4/1-2.4.4).
> 
> Maybe Matthew or Greg can comment.
> 
> --- 1.33/drivers/usb/storage/scsiglue.c	Sun Nov 10 09:49:52 2002
> +++ edited/drivers/usb/storage/scsiglue.c	Mon Jan 13 15:33:49 2003
> @@ -90,6 +90,7 @@
>  	if (us->host) {
>  		us->host->hostdata[0] = (unsigned long)us;
>  		us->host_no = us->host->host_no;
> +		scsi_set_device(us->host, &us->pusb_dev->dev);
>  		return 1;
>  	}
>  
> -- Patrick Mansfield

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

It was a new hope.
					-- Dust Puppy
User Friendly, 12/25/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2003-01-14  0:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11 14:43 sysfs Andries.Brouwer
2003-01-14  0:27 ` sysfs Patrick Mansfield
2003-01-14  0:51   ` Matthew Dharm [this message]
2003-01-14  0:57     ` sysfs Greg KH
2003-01-14  0:56   ` sysfs Greg KH
2003-01-14  1:09 sysfs Andries.Brouwer
2003-01-14  1:30 ` sysfs Patrick Mansfield

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=20030113165102.A26346@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    --cc=patmans@us.ibm.com \
    /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

all inboxes | Powered by JetHome®