From 980d936688f2308a8db23639201320ccb7d09493 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 23 May 2010 00:12:33 +0200 Subject: [PATCH] Skip ghost USB controllers --- bus/pci.c | 8 ++++++++ include/grub/mips/yeeloong/pci.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/bus/pci.c b/bus/pci.c index 3fec44fc2..d8698ba33 100644 --- a/bus/pci.c +++ b/bus/pci.c @@ -91,6 +91,14 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook) if (id >> 16 == 0xFFFF) continue; + /* Skip ghosts. */ + if (id == GRUB_YEELOONG_OHCI_PCIID + && dev.function == GRUB_YEELOONG_OHCI_GHOST_FUNCTION) + continue; + if (id == GRUB_YEELOONG_EHCI_PCIID + && dev.function == GRUB_YEELOONG_EHCI_GHOST_FUNCTION) + continue; + if (hook (dev, id)) return; diff --git a/include/grub/mips/yeeloong/pci.h b/include/grub/mips/yeeloong/pci.h index 7c816ac8e..199bac048 100644 --- a/include/grub/mips/yeeloong/pci.h +++ b/include/grub/mips/yeeloong/pci.h @@ -24,6 +24,11 @@ #include #endif +#define GRUB_YEELOONG_OHCI_PCIID 0x00351033 +#define GRUB_YEELOONG_EHCI_PCIID 0x00e01033 +#define GRUB_YEELOONG_OHCI_GHOST_FUNCTION 4 +#define GRUB_YEELOONG_EHCI_GHOST_FUNCTION 5 + #define GRUB_PCI_NUM_BUS 1 #define GRUB_PCI_NUM_DEVICES 16