[lkml]   [2003]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectfinding which pci device works as ide controller for root fs

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 AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux

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:47    [W:0.033 / U:6.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site