]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/bus/pci.c (grub_pci_iterate): Skip remaining functions
authorColin Watson <cjwatson@ubuntu.com>
Mon, 3 Jan 2011 23:56:45 +0000 (23:56 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Mon, 3 Jan 2011 23:56:45 +0000 (23:56 +0000)
on devices that do not implement function 0.

ChangeLog
grub-core/bus/pci.c

index d89cb861806133e4951531886729d5e3d209d3b4..a4692b5a7de51af5a81312cd26541bf2514dd038 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-03  Colin Watson  <cjwatson@ubuntu.com>
+
+       * grub-core/bus/pci.c (grub_pci_iterate): Skip remaining functions
+       on devices that do not implement function 0.
+
 2011-01-03  Dave Vasilevsky <dave@vasilevsky.ca>
 
        * grub-core/fs/hfsplus.c: Make parent unsigned.
index bf14a8653ed6d09d025ffdea1ae9ce4f67b31f73..11101d42b77bf316f91f351fa46fd57b505306e7 100644 (file)
@@ -90,7 +90,14 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook)
 
              /* Check if there is a device present.  */
              if (id >> 16 == 0xFFFF)
-               continue;
+               {
+                 if (dev.function == 0)
+                   /* Devices are required to implement function 0, so if
+                      it's missing then there is no device here.  */
+                   break;
+                 else
+                   continue;
+               }
 
 #ifdef GRUB_MACHINE_MIPS_YEELOONG
              /* Skip ghosts.  */