]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
authorphcoder <phcoder@localhost>
Mon, 8 Jun 2009 23:56:06 +0000 (23:56 +0000)
committerphcoder <phcoder@localhost>
Mon, 8 Jun 2009 23:56:06 +0000 (23:56 +0000)
        * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
initialising controller.
        * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.

ChangeLog
bus/usb/ohci.c
bus/usb/uhci.c

index bb941500425dfeeda57245de2068bd58fc13c7d0..34c5bc18fe43971a74aadf2c2da18f2420731e03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-09  Oliver Henshaw <oliver.henshaw@gmail.com>
+
+        * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after 
+       initialising controller.
+        * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
+
 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
 
        * util/i386/pc/grub-install.in: Add a parameter --disk-module
index ce7ea6efd8a729be0a0e39b4d67fc53e1a16da43..53356dc6925b28f8f4200dfd7d3e8e5476731365 100644 (file)
@@ -152,9 +152,6 @@ grub_ohci_pci_iter (int bus, int device, int func,
   if (! o)
     return 1;
 
-  /* Link in the OHCI.  */
-  o->next = ohci;
-  ohci = o;
   o->iobase = (grub_uint32_t *) base;
 
   /* Reserve memory for the HCCA.  */
@@ -190,6 +187,10 @@ grub_ohci_pci_iter (int bus, int device, int func,
   grub_dprintf ("ohci", "OHCI enable: 0x%02x\n",
                (grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) >> 6) & 3);
  
+  /* Link to ohci now that initialisation is successful.  */
+  o->next = ohci;
+  ohci = o;
+
   return 0;
 
  fail:
index a0836f805e7e601ab69a65d61f3d8f3ceda7762a..1c7b8d965e7b4d89ee11d28f79aaa0390c2ecfe6 100644 (file)
@@ -174,8 +174,6 @@ grub_uhci_pci_iter (int bus, int device, int func,
   if (! u)
     return 1;
 
-  u->next = uhci;
-  uhci = u;
   u->iobase = base & GRUB_UHCI_IOMASK;
   u->framelist = 0;
   u->qh = 0;
@@ -288,6 +286,10 @@ grub_uhci_pci_iter (int bus, int device, int func,
   }
 #endif
 
+  /* Link to uhci now that initialisation is successful.  */
+  u->next = uhci;
+  uhci = u;
+
   return 0;
 
  fail: