aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-05-24 02:29:20 -0400
committerFelipe Balbi <balbi@ti.com>2013-05-28 15:16:49 -0400
commitf28c42c576b293b3a1daaed8ca2775ebc2fe5398 (patch)
tree4735365243e6c9b4e7317a83a90e5d1ee4168bf9
parente4aa937ec75df0eea0bee03bffa3303ad36c986b (diff)
usb: dwc3: pci: PHY should be deleted later than dwc3 core
If the glue layer is removed first (core layer later), it deletes the phy device first, then the core device. But at core's removal, it still uses PHY's resources, it may cause kernel's oops. It is much like the problem Paul Zimmerman reported at: http://marc.info/?l=linux-usb&m=136547502011472&w=2. Besides, it is reasonable the PHY is deleted at last as the controller is the PHY's user. Signed-off-by: Peter Chen <peter.chen@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/dwc3/dwc3-pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 227d4a7acad7..eba9e2baf32b 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -196,9 +196,9 @@ static void dwc3_pci_remove(struct pci_dev *pci)
196{ 196{
197 struct dwc3_pci *glue = pci_get_drvdata(pci); 197 struct dwc3_pci *glue = pci_get_drvdata(pci);
198 198
199 platform_device_unregister(glue->dwc3);
199 platform_device_unregister(glue->usb2_phy); 200 platform_device_unregister(glue->usb2_phy);
200 platform_device_unregister(glue->usb3_phy); 201 platform_device_unregister(glue->usb3_phy);
201 platform_device_unregister(glue->dwc3);
202 pci_set_drvdata(pci, NULL); 202 pci_set_drvdata(pci, NULL);
203 pci_disable_device(pci); 203 pci_disable_device(pci);
204} 204}