kernel->when the usb port has a lot of load,the system will be stuck when connect usb touch screen
This commit is contained in:
@ -565,6 +565,18 @@ struct { \
|
||||
(head)->cqh_last = (elm); \
|
||||
} while (0)
|
||||
|
||||
#define DWC_CIRCLEQ_INSERT_COM(head, listelm, elm, field, com) do { \
|
||||
DWC_CIRCLEQ_FOREACH(listelm, head, field) { \
|
||||
if ((elm)->com < (listelm)->com) { \
|
||||
DWC_CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field); \
|
||||
break; \
|
||||
} else \
|
||||
continue; \
|
||||
} \
|
||||
if (DWC_CIRCLEQ_PREV(listelm, field) != elm) \
|
||||
DWC_CIRCLEQ_INSERT_TAIL(head, elm, field); \
|
||||
} while (0)
|
||||
|
||||
#define DWC_CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
if ((elm)->field.cqe_next == DWC_CIRCLEQ_END(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
|
||||
@ -833,6 +833,7 @@ static void release_channel(dwc_otg_hcd_t *hcd,
|
||||
dwc_otg_transaction_type_e tr_type;
|
||||
int free_qtd;
|
||||
int continue_trans = 1;
|
||||
dwc_hc_t *hc_tmp = NULL;
|
||||
|
||||
DWC_DEBUGPL(DBG_HCDV, " %s: channel %d, halt_status %d\n",
|
||||
__func__, hc->hc_num, halt_status);
|
||||
@ -893,7 +894,7 @@ cleanup:
|
||||
* there's no need to clear the Channel Halted interrupt separately.
|
||||
*/
|
||||
dwc_otg_hc_cleanup(hcd->core_if, hc);
|
||||
DWC_CIRCLEQ_INSERT_TAIL(&hcd->free_hc_list, hc, hc_list_entry);
|
||||
DWC_CIRCLEQ_INSERT_COM(&hcd->free_hc_list, hc_tmp, hc, hc_list_entry, hc_num);
|
||||
|
||||
switch (hc->ep_type) {
|
||||
case DWC_OTG_EP_TYPE_CONTROL:
|
||||
|
||||
Reference in New Issue
Block a user