On 05/05/2011 04:04 PM, Alan Stern wrote: > On Thu, 5 May 2011, Jan Andersson wrote: > >>> Something else to think about... The uhci_grlib_reset_hc() and >>> uhci_grlib_check_and_reset_hc() routines are all generic -- there's >>> nothing specific to the GRUSBHC about them. They could go into >>> uhci-hcd.c. >>> >>> The reason they aren't there now is because they are part of the BIOS >>> handoff needed by the early PCI code, even before uhci-hcd might be >>> loaded. Therefore a copy had to go into pci-quirks.c, and there was >>> no reason to duplicate it in uhci-hcd.c. >>> >>> Since you don't have to worry about taking control from the firmware, >>> the routines don't need to be coded separately for each platform. You >>> can put a generic version in uhci-hcd.c, and if the build is PCI-only >>> then the generic routine can simply call the pci-quirks code. >>> >> >> Thank you. I will create generic functions in uhci-hcd.c instead. >> >> I assumed that the pci_write_config_word()s in uhci_*reset_hc would be >> needed in the case where GRUSBHC was used and there also was another >> UCHI controller connected via PCI in the system. After looking at the >> spec I suppose that it will work, as you say, without the writes to the >> legacy support register. > > Unless somebody decides to run a non-PCI-UHCI-enabled kernel in an x86 > PC. Maybe to be safe it would be best to rule out that combination in > the Kconfig: make USB_UHCI_SUPPORT_NON_PCI_HC depend on (USB_UHCI_HCD > && !X86). Would this be acceptable? > I am fine with that. Too bad that I managed to send V2 before seeing this message :-). I will wait for other comments on V2 before adding this in V3. Best regards, Jan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html