From cdfac2ac67ecc267f2dd9455e632f3582f9841f9 Mon Sep 17 00:00:00 2001 From: Feng Mingli Date: Tue, 30 Jan 2018 17:14:22 +0800 Subject: [PATCH] usb: dwc_otg_310: hcd: Giveback URB in tasklet context In commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context") support was added to give back the URB in tasklet context. Let's take advantage of this in dwc_otg_310. This speeds up the dwc_otg_310 interrupt handler considerably, it means we've got a better chance of not missing SOF interrupts. TEST=Unable to preview yuyv format usb camera on rk3288 board when use dwc usb controller because of missing SOF interrupts. Change-Id: I52194d7fbddaf684c601d328e2a3c0f28fcb83b8 Signed-off-by: Feng Mingli --- drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c index d6fc10a818f3..fb642935956f 100644 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c @@ -115,7 +115,7 @@ static struct hc_driver dwc_otg_hc_driver = { .irq = dwc_otg_hcd_irq, - .flags = HCD_MEMORY | HCD_USB2, + .flags = HCD_MEMORY | HCD_USB2 | HCD_BH, /* .reset = */ .start = hcd_start, @@ -330,13 +330,11 @@ static int _complete(dwc_otg_hcd_t *hcd, void *urb_handle, usb_hcd_unlink_urb_from_ep(dwc_otg_hcd_to_hcd(hcd), urb); - DWC_SPINUNLOCK(hcd->lock); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb); #else usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb, status); #endif - DWC_SPINLOCK(hcd->lock); return 0; }