[lkml]   [2003]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: sysfs
Andries -

On Sat, Jan 11, 2003 at 03:43:27PM +0100, 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

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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:32    [W:0.104 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site