mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: mochel@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: sysfs
Date: Sat, 11 Jan 2003 15:43:27 +0100 (MET)	[thread overview]
Message-ID: <UTC200301111443.h0BEhRZ06262.aeb@smtp.cwi.nl> (raw)

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

             reply	other threads:[~2003-01-11 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11 14:43 Andries.Brouwer [this message]
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
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=UTC200301111443.h0BEhRZ06262.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    /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®