usb: dwc_otg_310: hcd: assign reg address to hc_regs

In dwc_otg_hcd_endpoint_disable(), the hc_regs is initialized
to NULL, but never assign a host channel reg address to it,
so the chdis operation can't be handled for ever.

This patch gets a host channenl reg address for hc_regs via
qh->channel->hc_num.

Change-Id: I5917df1975000876d28868ed51e218489ed3d209
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu
2018-04-13 17:22:54 +08:00
committed by Tao Huang
parent fbd5567d33
commit b33c8e4b63

View File

@@ -658,6 +658,9 @@ int dwc_otg_hcd_endpoint_disable(dwc_otg_hcd_t *hcd, void *ep_handle,
DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags);
}
if (qh->channel)
hc_regs = hcd->core_if->host_if->hc_regs[qh->channel->hc_num];
if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list) && hc_regs) {
hcchar.d32 = DWC_READ_REG32(&hc_regs->hcchar);
if (hcchar.b.chen) {