usb: complete urb when data toggle error occurred
authorlyz <lyz@rock-chips.com>
Mon, 17 Dec 2012 08:31:58 +0000 (16:31 +0800)
committerlyz <lyz@rock-chips.com>
Mon, 17 Dec 2012 08:31:58 +0000 (16:31 +0800)
drivers/usb/dwc_otg/dwc_otg_hcd_intr.c

index 18ffb15d39e22cebef81a004eef5d6602d8e07ba..684e89164918fd7748d7f96df478bc75a96bbd28 100755 (executable)
@@ -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) {