usb: complete urb when data toggle error occurred

This commit is contained in:
lyz 2012-12-17 16:31:58 +08:00
parent 24f0b2df6d
commit 10e0ddd6b3

View File

@ -1837,10 +1837,11 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t *_hcd,
*/
handle_hc_ack_intr(_hcd, _hc, _hc_regs, _qtd);
} else if(hcint.b.datatglerr){
DWC_PRINT("%s, DATA toggle error, Channel %d\n",__func__, _hc->hc_num);
save_data_toggle(_hc, _hc_regs, _qtd);
halt_channel(_hcd, _hc, _qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS);
clear_hc_int(_hc_regs,chhltd);
DWC_PRINT("%s, DATA toggle error, Channel %d\n",__func__, _hc->hc_num);
_qtd->error_count++;
save_data_toggle(_hc, _hc_regs, _qtd);
halt_channel(_hcd, _hc, _qtd, DWC_OTG_HC_XFER_XACT_ERR);
clear_hc_int(_hc_regs,chhltd);
} else {
if (_hc->ep_type == DWC_OTG_EP_TYPE_INTR ||
_hc->ep_type == DWC_OTG_EP_TYPE_ISOC) {