Skip to content

Commit

Permalink
fiq_fsm: Use correct states when starting isoc OUT transfers
Browse files Browse the repository at this point in the history
In fiq_fsm_start_next_periodic() if an isochronous OUT transfer
was selected, no regard was given as to whether this was a single-packet
transfer or a multi-packet staged transfer.

For single-packet transfers, this had the effect of repeatedly sending
OUT packets with bogus data and lengths.

Eventually if the channel was repeatedly enabled enough times, this
would lock up the OTG core and no further bus transfers would happen.

Set the FSM state up properly if we select a single-packet transfer.

Fixes raspberrypi#1842
  • Loading branch information
P33M committed May 4, 2017
1 parent e096c44 commit 6e805d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ static void notrace noinline fiq_fsm_start_next_periodic(struct fiq_state *st, i
if (st->channel[n].fsm == FIQ_PER_ISO_OUT_PENDING) {
if (!fiq_fsm_tt_in_use(st, num_channels, n)) {
fiq_print(FIQDBG_INT, st, "NEXTISO ");
st->channel[n].fsm = FIQ_PER_ISO_OUT_ACTIVE;
if (st->channel[n].nrpackets == 1) {
st->channel[n].fsm = FIQ_PER_ISO_OUT_LAST;
} else {
st->channel[n].fsm = FIQ_PER_ISO_OUT_ACTIVE;
}
fiq_fsm_restart_channel(st, n, 0);
break;
}
Expand Down

0 comments on commit 6e805d5

Please sign in to comment.