From: wlf Date: Fri, 14 Mar 2014 09:42:25 +0000 (+0800) Subject: USB: fix qtd->qh poison overwritten. X-Git-Tag: firefly_0821_release~6083 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1564221002713a6070da291ad7664ac938c526fb;p=firefly-linux-kernel-4.4.55.git USB: fix qtd->qh poison overwritten. --- diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c index e51753af6d4a..9fa1312c63d9 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c @@ -507,8 +507,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, DWC_ERROR("DWC OTG HCD URB Enqueue failed adding QTD. " "Error status %d\n", retval); dwc_otg_hcd_qtd_free(qtd); - } else { - qtd->qh = *ep_handle; } intr_mask.d32 = DWC_READ_REG32(&hcd->core_if->core_global_regs->gintmsk); if (!intr_mask.b.sofintr && retval == 0) { diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_queue.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_queue.c index b2a729ee8c93..83b4c34a4f12 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_queue.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_queue.c @@ -711,6 +711,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, goto done; } } + qtd->qh = *qh; DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); retval = dwc_otg_hcd_qh_add(hcd, *qh); if (retval == 0) {