Skip to content

fiq_fsm: Falling out of the state machine isn't fatal #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ int dwc_otg_fiq_unsetup_per_dma(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, dwc_otg_qt
* different from the normal (messy) path. This function and its friends handles
* channel cleanup and transaction completion from a FIQ transaction.
*/
int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
void dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
{
struct fiq_channel_state *st = &hcd->fiq_state->channel[num];
dwc_hc_t *hc = hcd->hc_ptr_array[num];
Expand All @@ -2366,7 +2366,6 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
dwc_otg_hc_regs_t *hc_regs = hcd->core_if->host_if->hc_regs[num];
hcint_data_t hcint = hcd->fiq_state->channel[num].hcint_copy;
int hostchannels = 0;
int ret = 0;
fiq_print(FIQDBG_INT, hcd->fiq_state, "OUT %01d %01d ", num , st->fsm);

hostchannels = hcd->available_host_channels;
Expand All @@ -2380,7 +2379,6 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
* CLEAR_TT_BUFFER hub command if we were in the start-split phase.
*/
release_channel(hcd, hc, NULL, hc->halt_status);
ret = 1;
break;

case FIQ_NP_SPLIT_DONE:
Expand All @@ -2393,7 +2391,6 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
} else if (hcint.b.nak) {
handle_hc_nak_intr(hcd, hc, hc_regs, qtd);
}
ret = 1;
break;

case FIQ_NP_SPLIT_HS_ABORTED:
Expand Down Expand Up @@ -2604,15 +2601,12 @@ int32_t dwc_otg_hcd_handle_hc_fsm(dwc_otg_hcd_t *hcd, uint32_t num)
break;

default:
local_fiq_disable();
DWC_WARN("unexpected state received on hc=%d fsm=%d", hc->hc_num, st->fsm);
BUG();
}
//if (hostchannels != hcd->available_host_channels) {
/* should have incremented by now! */
// BUG();
// }
return ret;
DWC_WARN("Unexpected state received on hc=%d fsm=%d on transfer to device %d ep 0x%x",
hc->hc_num, st->fsm, hc->dev_addr, hc->ep_num);
qtd->error_count++;
release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS);
}
return;
}

/** Handles interrupt for a specific Host Channel */
Expand Down