traverse active list with TAILQ_FOREACH_SAFE in dwc_otg_interrupt_poll so the process doesnt get restarted whenever a transfer completes
This commit is contained in:
parent
ce55cd64b5
commit
6571302412
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dwc_otg.c,v 1.15 2013/01/12 16:32:16 jmcneill Exp $ */
|
||||
/* $NetBSD: dwc_otg.c,v 1.16 2013/01/12 18:37:09 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
|
||||
|
@ -60,7 +60,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.15 2013/01/12 16:32:16 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.16 2013/01/12 18:37:09 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -3255,7 +3255,7 @@ dwc_otg_interrupt_poll(struct dwc_otg_softc *sc)
|
|||
uint8_t ch;
|
||||
uint32_t temp;
|
||||
uint32_t intrs;
|
||||
struct dwc_otg_xfer *dxfer;
|
||||
struct dwc_otg_xfer *dxfer, *tmp;
|
||||
uint8_t got_rx_status;
|
||||
|
||||
// DPRINTF("\n");
|
||||
|
@ -3344,11 +3344,8 @@ repeat:
|
|||
got_rx_status = 1;
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(dxfer, &sc->sc_active, xnext) {
|
||||
if (!dwc_otg_xfer_do_fifo(&dxfer->xfer)) {
|
||||
/* queue has been modified */
|
||||
goto repeat;
|
||||
}
|
||||
TAILQ_FOREACH_SAFE(dxfer, &sc->sc_active, xnext, tmp) {
|
||||
dwc_otg_xfer_do_fifo(&dxfer->xfer);
|
||||
}
|
||||
|
||||
if (got_rx_status) {
|
||||
|
|
Loading…
Reference in New Issue