Commit a8e5177583e975fc1f7c621c93956f494df9b979
Committed by
Greg Kroah-Hartman
1 parent
217a9081d8
Exists in
master
and in
7 other branches
USB: EHCI: fix up root-hub TT mess
This patch (as1095) cleans up the HCD glue and several of the EHCI bus-glue files. The ehci->is_tdi_rh_tt flag is redundant, since it means the same thing as the hcd->has_tt flag, so it is removed and the other flag used in its place. Some of the bus-glue files didn't get the relinquish_port method added to their hc_driver structures. Although that routine currently doesn't do anything for controllers with an integrated TT, in the future it might. So the patch adds it where it is missing. Lastly, some of the bus-glue files have erroneous entries for their hc_driver's suspend and resume methods. These method pointers are specific to PCI and shouldn't be used otherwise. (The patch also includes an invisible whitespace fix.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Showing 6 changed files with 8 additions and 15 deletions Side-by-side Diff
drivers/usb/host/ehci-fsl.c
... | ... | @@ -269,7 +269,7 @@ |
269 | 269 | if (retval) |
270 | 270 | return retval; |
271 | 271 | |
272 | - ehci->is_tdi_rh_tt = 1; | |
272 | + hcd->has_tt = 1; | |
273 | 273 | |
274 | 274 | ehci->sbrn = 0x20; |
275 | 275 | |
... | ... | @@ -295,10 +295,6 @@ |
295 | 295 | */ |
296 | 296 | .reset = ehci_fsl_setup, |
297 | 297 | .start = ehci_run, |
298 | -#ifdef CONFIG_PM | |
299 | - .suspend = ehci_bus_suspend, | |
300 | - .resume = ehci_bus_resume, | |
301 | -#endif | |
302 | 298 | .stop = ehci_stop, |
303 | 299 | .shutdown = ehci_shutdown, |
304 | 300 |
drivers/usb/host/ehci-ixp4xx.c
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
27 | 27 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
28 | 28 | |
29 | - ehci->is_tdi_rh_tt = 1; | |
29 | + hcd->has_tt = 1; | |
30 | 30 | ehci_reset(ehci); |
31 | 31 | |
32 | 32 | retval = ehci_init(hcd); |
... | ... | @@ -58,6 +58,7 @@ |
58 | 58 | .bus_suspend = ehci_bus_suspend, |
59 | 59 | .bus_resume = ehci_bus_resume, |
60 | 60 | #endif |
61 | + .relinquish_port = ehci_relinquish_port, | |
61 | 62 | }; |
62 | 63 | |
63 | 64 | static int ixp4xx_ehci_probe(struct platform_device *pdev) |
drivers/usb/host/ehci-orion.c
... | ... | @@ -139,10 +139,6 @@ |
139 | 139 | */ |
140 | 140 | .reset = ehci_orion_setup, |
141 | 141 | .start = ehci_run, |
142 | -#ifdef CONFIG_PM | |
143 | - .suspend = ehci_bus_suspend, | |
144 | - .resume = ehci_bus_resume, | |
145 | -#endif | |
146 | 142 | .stop = ehci_stop, |
147 | 143 | .shutdown = ehci_shutdown, |
148 | 144 | |
... | ... | @@ -165,6 +161,7 @@ |
165 | 161 | .hub_control = ehci_hub_control, |
166 | 162 | .bus_suspend = ehci_bus_suspend, |
167 | 163 | .bus_resume = ehci_bus_resume, |
164 | + .relinquish_port = ehci_relinquish_port, | |
168 | 165 | }; |
169 | 166 | |
170 | 167 | static void __init |
... | ... | @@ -250,7 +247,7 @@ |
250 | 247 | ehci->regs = hcd->regs + 0x100 + |
251 | 248 | HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
252 | 249 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
253 | - ehci->is_tdi_rh_tt = 1; | |
250 | + hcd->has_tt = 1; | |
254 | 251 | ehci->sbrn = 0x20; |
255 | 252 | |
256 | 253 | /* |
drivers/usb/host/ehci-pci.c
... | ... | @@ -129,7 +129,6 @@ |
129 | 129 | switch (pdev->vendor) { |
130 | 130 | case PCI_VENDOR_ID_TDI: |
131 | 131 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { |
132 | - ehci->is_tdi_rh_tt = 1; | |
133 | 132 | hcd->has_tt = 1; |
134 | 133 | tdi_reset(ehci); |
135 | 134 | } |
... | ... | @@ -379,7 +378,7 @@ |
379 | 378 | .hub_control = ehci_hub_control, |
380 | 379 | .bus_suspend = ehci_bus_suspend, |
381 | 380 | .bus_resume = ehci_bus_resume, |
382 | - .relinquish_port = ehci_relinquish_port, | |
381 | + .relinquish_port = ehci_relinquish_port, | |
383 | 382 | }; |
384 | 383 | |
385 | 384 | /*-------------------------------------------------------------------------*/ |
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci.h
... | ... | @@ -112,7 +112,6 @@ |
112 | 112 | u32 command; |
113 | 113 | |
114 | 114 | /* SILICON QUIRKS */ |
115 | - unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ | |
116 | 115 | unsigned no_selective_suspend:1; |
117 | 116 | unsigned has_fsl_port_bug:1; /* FreeScale */ |
118 | 117 | unsigned big_endian_mmio:1; |
... | ... | @@ -678,7 +677,7 @@ |
678 | 677 | * needed (mostly in root hub code). |
679 | 678 | */ |
680 | 679 | |
681 | -#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) | |
680 | +#define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt) | |
682 | 681 | |
683 | 682 | /* Returns the speed of a device attached to a port on the root hub. */ |
684 | 683 | static inline unsigned int |