From b05d65e8c3c317f652959011675fdc659f0fb714 Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Wed, 8 Jun 2016 10:17:57 +0800 Subject: [PATCH] usb: dwc_otg_310: Fixed that otg-host cannot transport LS device data. Decreasing the use_count of urb is pended since core usb have put it into the tasklet after HC dequeued, so we add a condition which check urb in HC queue is NULL or not to enhance exception conditions here. BUG=Redmine: Defect#95115 TEST=RK3366-SDK, LS mouse device works. Change-Id: I8b6d8ae2a866817b0c638e0b43811d108962b591 Signed-off-by: Frank Wang --- drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c old mode 100755 new mode 100644 index 02e7c1220c3b..d5451f09e4b5 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c @@ -993,7 +993,7 @@ static int urb_enqueue(struct usb_hcd *hcd, } #endif - if (unlikely(atomic_read(&urb->use_count) > 1)) { + if (unlikely(atomic_read(&urb->use_count) > 1) && urb->hcpriv) { retval = -EPERM; printk("%s urb %p already in queue, qtd %p, use_count %d\n", __func__, urb, urb->hcpriv, -- 2.34.1