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.
This commit is contained in:
phcoder 2009-06-08 23:56:06 +00:00
parent 255a27d434
commit e23721e8af
3 changed files with 14 additions and 5 deletions

View file

@ -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> 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
* util/i386/pc/grub-install.in: Add a parameter --disk-module * util/i386/pc/grub-install.in: Add a parameter --disk-module

View file

@ -152,9 +152,6 @@ grub_ohci_pci_iter (int bus, int device, int func,
if (! o) if (! o)
return 1; return 1;
/* Link in the OHCI. */
o->next = ohci;
ohci = o;
o->iobase = (grub_uint32_t *) base; o->iobase = (grub_uint32_t *) base;
/* Reserve memory for the HCCA. */ /* 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_dprintf ("ohci", "OHCI enable: 0x%02x\n",
(grub_ohci_readreg32 (o, GRUB_OHCI_REG_CONTROL) >> 6) & 3); (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; return 0;
fail: fail:

View file

@ -174,8 +174,6 @@ grub_uhci_pci_iter (int bus, int device, int func,
if (! u) if (! u)
return 1; return 1;
u->next = uhci;
uhci = u;
u->iobase = base & GRUB_UHCI_IOMASK; u->iobase = base & GRUB_UHCI_IOMASK;
u->framelist = 0; u->framelist = 0;
u->qh = 0; u->qh = 0;
@ -288,6 +286,10 @@ grub_uhci_pci_iter (int bus, int device, int func,
} }
#endif #endif
/* Link to uhci now that initialisation is successful. */
u->next = uhci;
uhci = u;
return 0; return 0;
fail: fail: