Skip to content

Commit 8932442

Browse files
committed
Merge pull request #242 from P33M/rpi-3.6.y
dwc_otg: add handling of SPLIT transaction data toggle errors
2 parents a9b0e8b + f676910 commit 8932442

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,13 +1921,20 @@ static int32_t handle_hc_datatglerr_intr(dwc_otg_hcd_t * hcd,
19211921
dwc_otg_qtd_t * qtd)
19221922
{
19231923
DWC_DEBUGPL(DBG_HCDI, "--Host Channel %d Interrupt: "
1924-
"Data Toggle Error--\n", hc->hc_num);
1924+
"Data Toggle Error on %s transfer--\n",
1925+
hc->hc_num, (hc->ep_is_in ? "IN" : "OUT"));
19251926

1926-
if (hc->ep_is_in) {
1927+
/* Data toggles on split transactions cause the hc to halt.
1928+
* restart transfer */
1929+
if(hc->qh->do_split)
1930+
{
1931+
qtd->error_count++;
1932+
dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
1933+
update_urb_state_xfer_intr(hc, hc_regs,
1934+
qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR);
1935+
halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR);
1936+
} else if (hc->ep_is_in) {
19271937
qtd->error_count = 0;
1928-
} else {
1929-
DWC_ERROR("Data Toggle Error on OUT transfer,"
1930-
"channel %d\n", hc->hc_num);
19311938
}
19321939

19331940
disable_hc_int(hc_regs, datatglerr);
@@ -2080,6 +2087,8 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd,
20802087
handle_hc_babble_intr(hcd, hc, hc_regs, qtd);
20812088
} else if (hcint.b.frmovrun) {
20822089
handle_hc_frmovrun_intr(hcd, hc, hc_regs, qtd);
2090+
} else if (hcint.b.datatglerr) {
2091+
handle_hc_datatglerr_intr(hcd, hc, hc_regs, qtd);
20832092
} else if (!out_nak_enh) {
20842093
if (hcint.b.nyet) {
20852094
/*

0 commit comments

Comments
 (0)