summaryrefslogtreecommitdiffstats
path: root/pci.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-07-31 13:36:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-07-31 13:36:49 +0000
commita9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc (patch)
tree2f077b51257a87c3139eb94a71a46fba08defd05 /pci.c
parentddf404afa8a0ccd0694cc5e60d9ace07d712b68b (diff)
downloadldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.gz
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.bz2
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.xz
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.zip
- detect ohci1394 & ehci-hcd based on the pci class
(as done in RedHat's kudzu)
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/pci.c b/pci.c
index ff5020f..558b9d6 100644
--- a/pci.c
+++ b/pci.c
@@ -65,8 +65,19 @@ extern struct pciusb_entries pci_probe(int probe_type) {
e->subdevice = 0xffff;
}
class_prog = buf[0x9];
- if (e->class_ == PCI_CLASS_SERIAL_USB) /* taken from kudzu's pci.c */
- e->module = strdup(class_prog == 0 ? "usb-uhci" : "usb-ohci");
+ if (e->class_ == PCI_CLASS_SERIAL_USB) {
+ /* taken from kudzu's pci.c */
+ char *module =
+ class_prog == 0 ? "usb-uhci" :
+ class_prog == 0x10 ? "usb-ohci" :
+ class_prog == 0x20 ? "ehci-hcd" : NULL;
+ if (module) e->module = strdup(module);
+ }
+ if (e->class_ == PCI_CLASS_SERIAL_FIREWIRE) {
+ /* taken from kudzu's pci.c */
+ if (class_prog == 0x10) e->module = strdup("ohci1394");
+ }
+
close(devf);
}
fclose(f);