From 1564221002713a6070da291ad7664ac938c526fb Mon Sep 17 00:00:00 2001 From: wlf Date: Fri, 14 Mar 2014 17:42:25 +0800 Subject: [PATCH] USB: fix qtd->qh poison overwritten. --- drivers/usb/dwc_otg_310/dwc_otg_hcd.c | 2 -- drivers/usb/dwc_otg_310/dwc_otg_hcd_queue.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.34.1