All of lore.kernel.org
 help / color / mirror / Atom feed
* sysfs
@ 2003-01-11 14:43 Andries.Brouwer
  2003-01-14  0:27 ` sysfs Patrick Mansfield
  0 siblings, 1 reply; 7+ messages in thread
From: Andries.Brouwer @ 2003-01-11 14:43 UTC (permalink / raw)
  To: mochel; +Cc: linux-kernel

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.

There are links back and forth between block and bus, so that
/sysfs/block/sda/device points at devices/1:0:6:0 and
/sysfs/devices/1:0:6:0/block points at block/sda. Good.
In the case my device is a USB device I tend to first look
at VendorID and ProductID. But it seems there are no pointers
from /sysfs/block or /sysfs/devices to the usb device hierachy.

Now /sysfs/devices/pci0/00:07.2/usb1/1-2/1-2.4/1-2.4.4
is the fourth device on some USB hub, a card reader with
idVendor=057b, and it is the scsi host scsi2. But it does not
refer to scsi2, perhaps because the category scsi host is missing
in the hierarchy?

Andries

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: sysfs
@ 2003-01-14  1:09 Andries.Brouwer
  2003-01-14  1:30 ` sysfs Patrick Mansfield
  0 siblings, 1 reply; 7+ messages in thread
From: Andries.Brouwer @ 2003-01-14  1:09 UTC (permalink / raw)
  To: Andries.Brouwer, greg, mdharm-usb, patmans; +Cc: linux-kernel, mochel

> It looks like there is a missing scsi_set_device() call in scsiglue.c,

OK, added. Now rmmod usb-storage followed by insmod usb-storage
resulted in an oops, as usual, but after a fresh reboot:
Yes indeed, just like desired:

% ls -l /sysfs/block/sdb/device
... -> ../../devices/pci0/00:07.2/usb1/1-2/1-2.4/1-2.4.1/2:0:0:0

Good.
Now that you removed this scsi device from /sysfs/devices, I suppose
you'll also want to remove

/sysfs/devices/1:0:6:0

which is an Iomega ZIP drive on the parallel port, driver imm.c,
device sda.
(I can also do it but have no time now. Friday.)

All the best - Andries

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

end of thread, other threads:[~2003-01-14  1:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-11 14:43 sysfs Andries.Brouwer
2003-01-14  0:27 ` sysfs Patrick Mansfield
2003-01-14  0:51   ` sysfs Matthew Dharm
2003-01-14  0:57     ` sysfs Greg KH
2003-01-14  0:56   ` sysfs Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2003-01-14  1:09 sysfs Andries.Brouwer
2003-01-14  1:30 ` sysfs Patrick Mansfield

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.