Grub needs to check the programming interface for usb controllers

2009-06-07 Thread Oliver Henshaw
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 u

[PATCH 1/4] bus/usb minor cleanups

2009-06-07 Thread Oliver Henshaw
usb-minor-cleanup Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 2/4] Fix inteface definition for ohci

2009-06-07 Thread Oliver Henshaw
usb-fix-interface Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 3/4] Check usb programming interface

2009-06-07 Thread Oliver Henshaw
usb-check-interface Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 4/4] Define fields in terms of the Class Code register

2009-06-07 Thread Oliver Henshaw
usb-change-to-class_code Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH] Link usb controller struct only when initialised

2009-06-07 Thread Oliver Henshaw
When controller initialisation is aborted in grub_uhci_pci_iter (grub_ohci_pci_iter) control jumps to "fail:", where any allocated memory is freed. However, the struct grub_uhci *u (struct grub_ohci *o) for that controller remains linked to the list of UHCI (OHCI) controllers. This causes problems

insmod uhci causes computer to reset

2009-06-07 Thread Oliver Henshaw
Even with the fixes described previously, grub fails with an UHCI controller (VIA uhci chipset on the motherboard). When no devices are attached, module loading completes successfully. When a mouse is attached, module loading completes but listing the device with 'usb' causes the machine to reset.

insmod ohci fails to register usb ports

2009-06-07 Thread Oliver Henshaw
Even with the fixes mentioned previously, grub fails with an OHCI controller (NEC ohci/ehci chipset on a PCI card). It seems to successfully initialise the controller, but fails to enumerate the ports. The same output is seen with a mouse attached as with no devices attached. grub> insmod ohc

Re: insmod uhci causes computer to reset

2009-06-07 Thread Oliver Henshaw
2009/6/7 Pavel Roskin : > Maybe the crash is in usb_keyboard? I don't think that can be it. AFAICS usb_keyboard would only be called if I manually loaded the model. And I've never done that. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gn

Re: insmod ohci fails to register usb ports

2009-06-07 Thread Oliver Henshaw
2009/6/7 Oliver Henshaw : > Even with the fixes mentioned previously, grub fails with an OHCI > controller (NEC ohci/ehci chipset on a PCI card). It seems to successfully > initialise the > controller, but fails to enumerate the ports. The same output is seen with a > mouse > a

[PATCH 0/4] Re: Grub needs to check the programming interface for usb controllers

2009-06-08 Thread oliver . henshaw
Here's a second try. I used quilt to manage the patch series but mailed them by hand instead of exporting to a mailbox, and didn't realise that they weren't named as *.patch (otherwise I think the content type would have been fine). I should probably move on to git, but I was a little intimidate

[PATCH 2/4] Fix inteface definition for ohci

2009-06-08 Thread oliver . henshaw
Changelog: * bus/usb/ohci.c: Set interf with correct field. --- bus/usb/ohci.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: grub2/bus/usb/ohci.c === --- grub2.orig/bus/usb/ohci.c +++ grub2/bus/usb/ohci.c @@

[PATCH 3/4] Check usb programming interface

2009-06-08 Thread oliver . henshaw
Changelog: * bus/usb/ohci.c: Check programming interface is ohci. Add grub_dprintf for symmetry with bus/usb/uhci.c. * bus/usb/uhci.c: Check programming interface is uhci. Add interf variable for Programming Interface. Print in

[PATCH 4/4] Define fields in terms of the Class Code register

2009-06-08 Thread oliver . henshaw
Changelog: * bus/usb/ohci.c: Define the Class, Subclass and Programming Interface fields in terms of the 3 byte Class Code register. * bus/usb/uhci.c: Likewise. --- bus/usb/ohci.c |9 + bus/usb/uhci.c |9 + 2 files changed, 10 ins

[PATCH 1/4] Minor Cleanup

2009-06-08 Thread oliver . henshaw
Changelog: * bus/usb/uhci.c: Remove un-needed doubled lines. * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t. Remove whitespace inside comment. --- bus/usb/ohci.c |7 ++- bus/usb/uhci.c |2 -- 2 files changed, 2 insertions(+), 7 deletions(-) Index: grub2/bu