]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Skip ghost USB controllers
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 22 May 2010 22:12:33 +0000 (00:12 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 22 May 2010 22:12:33 +0000 (00:12 +0200)
bus/pci.c
include/grub/mips/yeeloong/pci.h

index 3fec44fc23dda42bd0612546251b273c73cf7edd..d8698ba33b9f6f1ee7766918ecc32d07906e0d67 100644 (file)
--- 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;
 
index 7c816ac8ec008f1ff5ae5a31dc4c37432f631003..199bac048919f9a3c92542f08ac43ce0d632bdb5 100644 (file)
 #include <grub/cpu/io.h>
 #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