Re: [RFC 2/4] Intel xhci: Support EHCI/xHCI port switching.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 May 2011, Sarah Sharp wrote:

> At least Matthew Wilcox confirmed that the PCI quirks that are
> initialized with the DECLARE_PCI_FIXUP_FINAL will be called for all PCI
> devices before any PCI probe functions are called.  I added some
> debugging to the USB PCI quirks and booted with initcall_debug on, and
> it seems to be true:
> 
> 
> [    5.565870] calling  pci_apply_final_quirks+0x0/0x106 @ 1
> [    5.571269] xHCI PCI quirk
> [    5.574024] EHCI PCI quirk
> [    5.576721] pci 0000:00:1a.0: EHCI: BIOS handoff
> [    5.600912] EHCI PCI quirk
> [    5.603611] pci 0000:00:1d.0: EHCI: BIOS handoff
> [    5.620888] pci 0000:01:00.0: Boot video device
> ...
> [   16.678369] usbcore: registered new interface driver usbfs
> [   16.700312] usbcore: registered new interface driver hub
> [   16.720904] calling  ahci_init+0x0/0x1000 [ahci] @ 210
> [   16.727336] usbcore: registered new device driver usb
> [   16.727344] initcall usb_init+0x0/0x16d [usbcore] returned 0 after 48192 usecs
> [   16.786418] calling  ehci_hcd_init+0x0/0x1000 [ehci_hcd] @ 205
> [   16.808746] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [   16.831011] ehci_hcd: block sizes: qh 104 qtd 96 itd 192 sitd 96

The code that controls all this is probably hidden away somewhere in 
init/, but I'm not familiar with it.

> So I'll rework this patchset to move the PCI ID to the correctly ordered
> spot and then move the switchover into the xHCI PCI quirk.  I think if I
> want to switchover the ports after the system resumes (because the BIOS
> might be stupid and switch them back under EHCI when it takes control in
> the pre-OS resume path), then I should also define a PCI quirk for that,
> using DECLARE_PCI_FIXUP_RESUME.  Does that sound correct?

I don't know.  Such a fixup would also apply during runtime resume, 
when you wouldn't want it, although it probably wouldn't hurt.

Since you can't be sure which controller will be resumed first, you 
would have to define the PCI quirk for both the EHCI and xHCI 
controllers.  Alternatively, you could put the switchover code in a 
separate exported routine in pci-quirks.c and call it explicitly from 
within the ehci-hcd and xhci-hcd pci_resume routines.

Alan Stern

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux