Grub needs to check that the usb programming interface is of the correct type. Otherwise, hilarity ensues when e.g. bus/usb/ohci.c attempts to initialise an uhci controller. This can easily be reproduced by typing 'insmod ohci' in the grub rescue disk in qemu, with usb enabled.
Additionally, the usb interface (which was defined but not used in bus/usb/ohci.c) was set to the wrong value. I've split this into a patch series bookended by more cosmetic patches. The first patch consists of minor fixes: removing some doubled lines (which look like a pasto, but I could be wrong), changing an int to a grub_uint32_t (to match the types of all other similar variables) and I've added some whitespace fixes. The final patch is purely cosmetic: it defines the pci Class, Subclass and Programming Interface fields in terms of the Class Code register, so that the code better reflects the spec. This last patch may seem minor, but the (previously unused) usb interface was set to the wrong value in bus/usb/ohci.c up to now - this means that the code now better reflects the structure of the Class Code register, and better documents the specification. The patch series has been tested on on real hardware, and each patch has been tested with qemu and a grub rescue image. Both ohci and uhci cases have been tested (qemu has a virtual ohci controller, but the option to enable it must be patched in). Thanks, Oliver _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel