linux_dsm_epyc7002/drivers/usb/chipidea
Michael Grzeschik db89960e50 usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low
When attaching an imx28 or imx53 in USB gadget mode to a Windows host and
starting a rndis connection we see this message every 4-10 seconds:

    g_ether gadget: high speed config #2: RNDIS

Analysis shows that each time this message is printed, the rndis connection is
re-establish due to a reset because of a stalled endpoint (ep 0, dir 1). The
endpoint is stalled because the reqeust complete bit on that endpoint is set,
but in isr_tr_complete_low() the endpoint request list (mEp->qh.queue) is
empty.

This patch removed this check, because the code doesn't take the following
situation into account:

The loop over all endpoints in isr_tr_complete_handler() will call ep_nuke() on
both ep0/dir0 and ep/dir1 in the first loop. Pending reqeusts will be flushed
and completed here. There seems to be a race condition, the request is nuked,
but the request complete bit will be set, too. The subsequent check (in
ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will
fail.

Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't
have this check.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-12 10:58:38 -07:00
..
bits.h usb: chipidea: add host role 2012-05-11 16:56:15 -07:00
ci13xxx_imx.c usb: chipidea: add imx platform driver 2012-07-09 10:01:09 -07:00
ci13xxx_msm.c USB: Chipidea: add unified ci13xxx_{add,remove}_device for platform drivers 2012-07-09 09:53:44 -07:00
ci13xxx_pci.c USB: Chipidea: add unified ci13xxx_{add,remove}_device for platform drivers 2012-07-09 09:53:44 -07:00
ci.h usb: chipidea: permit driver bindings pass phy pointer 2012-07-09 09:59:23 -07:00
core.c usb: chipidea: permit driver bindings pass phy pointer 2012-07-09 09:59:23 -07:00
debug.c USB: Chipidea: rename struct ci13xxx variables from udc to ci 2012-07-09 09:52:15 -07:00
debug.h usb: chipidea: split the driver code into units 2012-05-11 16:49:51 -07:00
host.c usb: chipidea: permit driver bindings pass phy pointer 2012-07-09 09:59:23 -07:00
host.h usb: chipidea: add host role 2012-05-11 16:56:15 -07:00
Kconfig usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module 2012-08-10 11:46:04 -07:00
Makefile usb: chipidea: add imx platform driver 2012-07-09 10:01:09 -07:00
udc.c usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low 2012-09-12 10:58:38 -07:00
udc.h usb: chipidea: use generic map/unmap routines 2012-05-11 16:59:35 -07:00