linux-stable/drivers/usb/host
Stephen Warren 91a687d8fe USB: EHCI: tegra: fix circular module dependencies
The Tegra EHCI driver directly calls various functions in the Tegra USB
PHY driver. The reverse is also true; the PHY driver calls into the EHCI
driver. This is problematic when the two are built as modules.

The calls from the PHY to EHCI driver were originally added in commit
bbdabdb "usb: add APIs to access host registers from Tegra PHY", for the
following reasons:

1) The register being touched is an EHCI register, so logically only the
   EHCI driver should touch it.
2) (1) implies that some locking may be needed to correctly implement the
   r/m/w access to this shared register.
3) We were expecting to pass only the PHY register space to the Tegra PHY
   driver, and hence it would not have access to touch the shared
   registers.

To solve this, that commit added functions in the EHCI driver to touch the
shared register on behalf of the PHY driver.

In practice, we ended up not having any locking in the implementaiton of
those functions, and I've been led to believe this is safe. Equally, (3)
did not happen either. Hence, it is possible for the PHY driver to touch
the shared register directly.

Given that, this patch moves the code to touch the shared register back
into the PHY driver, to eliminate the module problems. If we actually
need locking or co-ordination in the future, I propose we put the lock
support into some pre-existing core module, or into a third separate
module, in order to avoid the circular dependencies.

I apologize for my contribution to code churn here.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 13:54:48 -07:00
..
whci wusbhc: disable suspend and resume on the root hub. 2013-06-06 12:14:38 -07:00
bcma-hcd.c
ehci-atmel.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ehci-dbg.c USB: EHCI: convert singly-linked lists to list_heads 2013-03-25 13:35:05 -07:00
ehci-fsl.c usb: fsl: add missing platform_driver owner 2013-05-16 17:48:28 -07:00
ehci-fsl.h
ehci-grlib.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
ehci-hcd.c USB: EHCI: export ehci_handshake for ehci-hcd sub-drivers 2013-06-17 13:54:47 -07:00
ehci-hub.c USB: EHCI: export ehci_handshake for ehci-hcd sub-drivers 2013-06-17 13:54:47 -07:00
ehci-mem.c
ehci-msm.c USB: EHCI: make ehci-msm a separate driver 2013-04-08 09:40:20 -07:00
ehci-mv.c USB: ehci-mv: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:14 -07:00
ehci-mxc.c USB: ehci-mxc: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:15 -07:00
ehci-octeon.c USB: ehci-octeon: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:15 -07:00
ehci-omap.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
ehci-orion.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
ehci-pci.c USB: Fix initconst in ehci driver 2013-04-23 10:10:29 -07:00
ehci-platform.c usb: host: ehci-platform: Remove redundant use of of_match_ptr 2013-05-21 11:42:12 -07:00
ehci-pmcmsp.c
ehci-ppc-of.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
ehci-ps3.c usb: PS3 EHCI remove unneeded ehci_shutdown 2013-04-01 12:32:43 -07:00
ehci-q.c usb: ehci: mark unlink_empty_async_suspended() as __maybe_unused 2013-03-28 14:49:53 -07:00
ehci-s5p.c usb: ehci-s5p: skip phy setup for Exynos5440 based platforms 2013-05-30 21:34:29 +09:00
ehci-sched.c USB: EHCI: fix regression related to qh_refresh() 2013-05-30 21:20:04 +09:00
ehci-sead3.c USB: ehci-sead3: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:16 -07:00
ehci-sh.c USB: ehci-sh: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:17 -07:00
ehci-spear.c usb: host: ehci-spear: Remove redundant checks 2013-05-30 21:32:53 +09:00
ehci-sysfs.c
ehci-tegra.c USB: EHCI: tegra: fix circular module dependencies 2013-06-17 13:54:48 -07:00
ehci-tilegx.c usb: host: ehci-tilegx: Remove redundant platform_set_drvdata() 2013-05-17 10:14:52 -07:00
ehci-timer.c USB: EHCI: improve end_unlink_async() 2013-03-25 13:36:32 -07:00
ehci-w90x900.c
ehci-xilinx-of.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
ehci.h USB: EHCI: export ehci_handshake for ehci-hcd sub-drivers 2013-06-17 13:54:47 -07:00
fhci-dbg.c
fhci-hcd.c
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c USB: FHCI: upgrade the isochronous API 2013-05-30 21:34:31 +09:00
fhci-tds.c
fhci.h USB: FHCI: upgrade the isochronous API 2013-05-30 21:34:31 +09:00
fsl-mph-dr-of.c
fusbh200-hcd.c usb: host: fusbh200-hcd: rename two functions 2013-06-03 10:52:40 -07:00
fusbh200.h usb host: Faraday USB2.0 FUSBH200-HCD driver 2013-05-17 10:12:52 -07:00
hwa-hc.c usb: wire adapter: add scatter gather support 2013-06-17 13:41:58 -07:00
imx21-dbg.c
imx21-hcd.c USB: IMX21: upgrade the isochronous API 2013-05-30 21:34:30 +09:00
imx21-hcd.h
isp116x-hcd.c
isp116x.h
isp1362-hcd.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
isp1362.h
isp1760-hcd.c USB: remove remaining instances of USB_SUSPEND 2013-05-15 13:44:44 -04:00
isp1760-hcd.h
isp1760-if.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
Kconfig usb: host: make USB_ARCH_HAS_?HCI obsolete 2013-06-06 11:16:44 -07:00
Makefile USB: OHCI: make ohci-platform a separate driver 2013-06-03 11:02:26 -07:00
octeon2-common.c
ohci-at91.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-da8xx.c usb: host: ohci-da8xx: Remove redundant platform_set_drvdata() 2013-05-17 10:14:52 -07:00
ohci-dbg.c
ohci-ep93xx.c
ohci-exynos.c USB: set device dma_mask without reference to global data 2013-05-16 17:30:52 -07:00
ohci-hcd.c USB: OHCI: remove bogus #error 2013-06-06 11:16:44 -07:00
ohci-hub.c USB: OHCI: prepare to make ohci-hcd a library module 2013-05-30 21:36:03 +09:00
ohci-jz4740.c USB: ohci-jz4740: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:17 -07:00
ohci-mem.c
ohci-nxp.c drivers/usb/host: remove leftover release_mem_region 2013-05-30 21:32:52 +09:00
ohci-octeon.c usb: host: ohci-octeon: Remove redundant platform_set_drvdata() 2013-05-17 10:14:52 -07:00
ohci-omap.c usb: host: ohci-omap: Remove redundant platform_set_drvdata() 2013-05-17 10:14:53 -07:00
ohci-omap3.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
ohci-pci.c USB: OHCI: make ohci-pci a separate driver 2013-05-30 21:36:03 +09:00
ohci-platform.c USB: OHCI: make ohci-platform a separate driver 2013-06-03 11:02:26 -07:00
ohci-ppc-of.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
ohci-ps3.c
ohci-pxa27x.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
ohci-q.c USB: OHCI: Generic changes to make ohci-pci a separate driver 2013-05-30 21:36:03 +09:00
ohci-s3c2410.c
ohci-sa1111.c
ohci-sm501.c USB: ohci-sm501: remove unnecessary platform_set_drvdata() 2013-05-16 17:47:18 -07:00
ohci-spear.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
ohci-tilegx.c usb: host: ohci-tilegx: Remove redundant platform_set_drvdata() 2013-05-17 10:14:53 -07:00
ohci-tmio.c usb: host: ohci-tmio: Remove redundant platform_set_drvdata() 2013-05-17 10:14:53 -07:00
ohci.h USB: OHCI: add a name for the platform-private field 2013-06-03 11:03:18 -07:00
oxu210hp-hcd.c Merge 3.10-rc3 into usb-next 2013-05-27 11:00:52 +09:00
oxu210hp.h
pci-quirks.c USB: OHCI: Generic changes to make ohci-pci a separate driver 2013-05-30 21:36:03 +09:00
pci-quirks.h USB: OHCI: Generic changes to make ohci-pci a separate driver 2013-05-30 21:36:03 +09:00
r8a66597-hcd.c
r8a66597.h
sl811-hcd.c USB: remove remaining instances of USB_SUSPEND 2013-05-15 13:44:44 -04:00
sl811.h
sl811_cs.c drivers/usb: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:38 -07:00
ssb-hcd.c
u132-hcd.c USB: remove CONFIG_USB_SUSPEND option 2013-03-28 11:10:22 -07:00
uhci-debug.c USB: uhci: beautify source code 2013-01-24 13:59:26 -08:00
uhci-grlib.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
uhci-hcd.c Merge 3.8-rc5 into usb-next 2013-01-25 12:41:02 -08:00
uhci-hcd.h USB: UHCI: remove unused definition 2013-01-24 13:42:09 -08:00
uhci-hub.c USB: UHCI: fix for suspend of virtual HP controller 2013-05-15 13:41:40 -04:00
uhci-pci.c
uhci-platform.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
uhci-q.c USB: fix latency in uhci-hcd and ohci-hcd 2013-05-15 13:42:45 -04:00
xhci-dbg.c usb: xhci-dbg: Display endpoint number and direction in context dump 2013-06-05 16:41:47 -07:00
xhci-ext-caps.h usb: xhci: add USB2 Link power management BESL support 2013-06-05 16:48:24 -07:00
xhci-hub.c usb: xhci: define port register names and use them instead of magic numbers 2013-06-05 16:47:21 -07:00
xhci-mem.c Merge 3.10-rc5 into usb-next 2013-06-08 21:27:51 -07:00
xhci-pci.c xhci: Disable D3cold for buggy TI redrivers. 2013-05-24 15:23:59 -07:00
xhci-plat.c USB: host: use platform_{get,set}_drvdata() 2013-05-30 21:32:54 +09:00
xhci-ring.c usb/xhci: unify parameter of xhci_msi_irq 2013-06-05 16:45:33 -07:00
xhci.c Merge 3.10-rc5 into usb-next 2013-06-08 21:27:51 -07:00
xhci.h Merge 3.10-rc5 into usb-next 2013-06-08 21:27:51 -07:00