2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>

* bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
	interface is OHCI.  Add grub_dprintf for symmetry with
	bus/usb/uhci.c.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
	interface is UHCI.  Add interf variable for programming
	interface.  Print interface with class/subclass.
This commit is contained in:
proski 2009-06-08 20:20:13 +00:00
parent c0947beba6
commit fa5db0b120
3 changed files with 16 additions and 4 deletions

View file

@ -133,7 +133,7 @@ grub_ohci_pci_iter (int bus, int device, int func,
class >>= 24;
/* If this is not an OHCI controller, just return. */
if (class != 0x0c || subclass != 0x03)
if (class != 0x0c || subclass != 0x03 || interf != 0x10)
return 0;
/* Determine IO base address. */
@ -159,6 +159,9 @@ grub_ohci_pci_iter (int bus, int device, int func,
/* Reserve memory for the HCCA. */
o->hcca = (struct grub_ohci_hcca *) grub_memalign (256, 256);
grub_dprintf ("ohci", "class=0x%02x 0x%02x interface 0x%02x base=%p\n",
class, subclass, interf, o->iobase);
/* Check if the OHCI revision is actually 1.0 as supported. */
revision = grub_ohci_readreg32 (o, GRUB_OHCI_REG_REVISION);
grub_dprintf ("ohci", "OHCI revision=0x%02x\n", revision & 0xFF);