summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/probing.c
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2009-09-15 19:46:32 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2009-09-15 19:46:32 +0000
commit09cc6f2f89744463ecb7baba1bbf2c3bed308154 (patch)
tree0c64e7f309a9aef667a6600ebe2bd8e7159f7c7b /mdk-stage1/probing.c
parent49e18ba98be2b202e197231635549e85e3e7244f (diff)
downloaddrakx-09cc6f2f89744463ecb7baba1bbf2c3bed308154.tar
drakx-09cc6f2f89744463ecb7baba1bbf2c3bed308154.tar.gz
drakx-09cc6f2f89744463ecb7baba1bbf2c3bed308154.tar.bz2
drakx-09cc6f2f89744463ecb7baba1bbf2c3bed308154.tar.xz
drakx-09cc6f2f89744463ecb7baba1bbf2c3bed308154.zip
oops, virtio devices should be matched against subdevice id, as per
drivers/virtio/virtio_pci.c
Diffstat (limited to 'mdk-stage1/probing.c')
-rw-r--r--mdk-stage1/probing.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 4ca30fbe4..3052b2823 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -329,18 +329,22 @@ void probe_virtio_modules(void)
int i;
char *name;
char *options;
+ int loaded_pci = 0;
entries = pci_probe();
for (i = 0; i < entries.nb; i++) {
struct pciusb_entry *e = &entries.entries[i];
if (e->vendor == VIRTIO_PCI_VENDOR) {
+ if (!loaded_pci) {
+ log_message("loading virtio-pci");
+ my_insmod("virtio_pci", ANY_DRIVER_TYPE, NULL, 0);
+ loaded_pci = 1;
+ }
+
name = NULL;
options = NULL;
- switch (e->device) {
- case VIRTIO_ID_PCI:
- name = "virtio_pci";
- break;
+ switch (e->subdevice) {
case VIRTIO_ID_NET:
name = "virtio_net";
options = "csum=0";