summaryrefslogtreecommitdiff
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2016-12-09 20:37:53 -0800
committerHemant Kumar <hemantk@codeaurora.org>2016-12-12 14:00:42 -0800
commit5994569c2cd268ded484e39da5c55fc6d9ede58e (patch)
tree42cf4c7ec97859023d528d52ae5d8909c99867c8 /drivers/usb/core
parent13931636c5ce6c6b748a3338593ea8531898a87f (diff)
usb: core: Allow secondary event ring clean upon disconnect
If device is disconnected in the middle of data transfer there is a possibility of pending events in the secondary event ring. As a result when xHC is halted as part of device disconnect, device is not getting detected upon re-connect. Fix the issue by acknowledging the pending events upon device disconnect. Also this allows to finish the clean up of event ring otherwise this results into a memory leak. Change-Id: I2ec3d74867e0129dad395d1dbe920b468ac5949d Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/usb.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index b43d542e3bd4..062677f8e91d 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -682,9 +682,6 @@ EXPORT_SYMBOL(usb_sec_event_ring_setup);
int usb_sec_event_ring_cleanup(struct usb_device *dev,
unsigned intr_num)
{
- if (dev->state == USB_STATE_NOTATTACHED)
- return 0;
-
return usb_hcd_sec_event_ring_cleanup(dev, intr_num);
}
EXPORT_SYMBOL(usb_sec_event_ring_cleanup);