From: Arkadiusz Miskiewicz <arekm@pld-linux.org>
To: linux-kernel@vger.kernel.org
Subject: finding which pci device works as ide controller for root fs
Date: Thu, 14 Aug 2003 18:26:30 +0200 [thread overview]
Message-ID: <200308141826.30735.arekm@pld-linux.org> (raw)
Hi,
I need /dev/hdX -> pci id mapping for geninitrd script - with modular IDE I
need to load some IDE controller driver from initrd to mount root fs.
Now I'm loading all modules for IDE devices found from:
awk ' { print $2 } ' /proc/bus/pci/devices
+ simple file which maps PCI ID to module name like
808684cb piix
How to find controller which is used for root fs (and do not load other
modules)? I suppose that on 2.4 this is impossible from userspace but on 2.6
maybe sysfs will be useful.
[arekm@mobarm arekm]$ ls -l /sys/block/hda/device
lrwxrwxrwx 1 root root 46 2003-08-14 00:49
/sys/block/hda/device -> ../../devices/pci0000:00/0000:00:11.1/ide0/0.0
Is it possible to get PCI ID from sysfs for specified device?
--
Arkadiusz Miśkiewicz CS at FoE, Wroclaw University of Technology
arekm@sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
next reply other threads:[~2003-08-14 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-14 16:26 Arkadiusz Miskiewicz [this message]
2003-08-15 0:15 ` finding which pci device works as ide controller for root fs Greg KH
2003-08-15 0:38 ` Arkadiusz Miskiewicz
2003-08-15 2:39 ` Charles Lepple
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=200308141826.30735.arekm@pld-linux.org \
--to=arekm@pld-linux.org \
--cc=linux-kernel@vger.kernel.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