Opened 17 years ago
Closed 16 years ago
#1767 closed bug (fixed)
UHCI legacy support
Reported by: | marcusoverhagen | Owned by: | mmlr |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers/USB | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
The following code is from the UHCI driver. Is it save to reset the controller a) immediatelly b) at all after disabling bios legacy support?
Is that sequence correct?
// make sure we gain control of the UHCI controller instead of the BIOS sPCIModule->write_pci_config(fPCIInfo->bus, fPCIInfo->device, fPCIInfo->function, PCI_LEGSUP, 2, PCI_LEGSUP_USBPIRQDEN); // disable interrupts WriteReg16(UHCI_USBINTR, 0); // do a global and host reset GlobalReset(); if (ControllerReset() < B_OK) { TRACE_ERROR(("usb_uhci: host failed to reset\n")); return; }
Change History (5)
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
Summary: | UCHI legacy support → UHCI legacy support |
---|
comment:3 by , 17 years ago
I have changed some of that code now to first disable interrupts and then do the routing. Also the pending SMIs are now cleared when disabling legacy support. The ordering of host controller initialization has been made explicit so that the UHCI/OHCI companion host controllers are initialized before EHCI. This might have fixed some legacy support issues (at least for me it did). Do you have a specific test case that fails with the current setup? If so it'd be helpful if you could get some sort of debug output (maybe enable TRACE_USB in usb_p.h) so that we can further investigate that. Otherwise I'd like to close this ticket as the process looks perfectly fine to me from a UHCI standpoint of view.
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I'm closing this one now. The initialization process has been refined somewhat and I haven't heared of legacy support issues in quite some time. Please reopen if there is a specific test case.
As far as I can tell it is ok. Linux does disable PIRQ before resetting and only enables it after resetting the controller. But resetting is generally needed as it will generate a de- and re-attach event so we get notified of already present devices. If we didn't do that we could not detect devices that are present on boot. I will try playing around with the PCI writing though.