original_kernel/drivers/usb/gadget
Michael Grzeschik b1b552a69b usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop
This patch fixes an issue introduced by patch:

    72c973d usb: gadget: add usb_endpoint_descriptor to struct usb_ep

Without this patch we see a kworker taking 100% CPU, after this sequence:

- Connect gadget to a windows host
- load g_ether
- ifconfig up <ip>; ifconfig down; ifconfig up
- ping <windows host>

The "ifconfig down" results in calling eth_stop(), which will call
usb_ep_disable() and, if the carrier is still ok, usb_ep_enable():

         usb_ep_disable(link->in_ep);
         usb_ep_disable(link->out_ep);
         if (netif_carrier_ok(net)) {
                 usb_ep_enable(link->in_ep);
                 usb_ep_enable(link->out_ep);
         }

The ep should stay enabled, but will not, as ep_disable set the desc
pointer to NULL, therefore the subsequent ep_enable will fail. This leads
to permanent rescheduling of the eth_work() worker as usb_ep_queue()
(called by the worker) will fail due to the unconfigured endpoint.

We fix this issue by saving the ep descriptors and re-assign them before
usb_ep_enable().

Cc: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-10 11:57:37 -07:00
..
Kconfig
Makefile
acm_ms.c
amd5536udc.c
amd5536udc.h
at91_udc.c
at91_udc.h
atmel_usba_udc.c
atmel_usba_udc.h
audio.c
cdc2.c
composite.c
config.c
dbgp.c
dummy_hcd.c
epautoconf.c
ether.c
f_acm.c
f_ecm.c
f_eem.c
f_fs.c
f_hid.c
f_loopback.c
f_mass_storage.c
f_midi.c
f_ncm.c
f_obex.c
f_phonet.c netvm: propagate page->pfmemalloc from skb_alloc_page to skb 2012-07-31 18:42:46 -07:00
f_rndis.c
f_serial.c
f_sourcesink.c
f_subset.c
f_uac1.c
f_uac2.c
f_uvc.c
f_uvc.h
file_storage.c
fsl_mxc_udc.c
fsl_qe_udc.c
fsl_qe_udc.h
fsl_udc_core.c
fsl_usb2_udc.h
fusb300_udc.c
fusb300_udc.h
g_ffs.c
g_zero.h
gadget_chips.h
gmidi.c
goku_udc.c
goku_udc.h
hid.c
imx_udc.c
imx_udc.h
inode.c
lpc32xx_udc.c
m66592-udc.c gadget/m66592: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
m66592-udc.h gadget/m66592: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
mass_storage.c
multi.c
mv_u3d.h
mv_u3d_core.c
mv_udc.h
mv_udc_core.c
ncm.c
ndis.h
net2272.c
net2272.h
net2280.c
net2280.h
nokia.c
omap_udc.c
omap_udc.h
pch_udc.c
printer.c
pxa25x_udc.c This patch series contains a major revamp of how we collect entropy 2012-07-31 19:07:42 -07:00
pxa25x_udc.h
pxa27x_udc.c
pxa27x_udc.h
r8a66597-udc.c gadget/r8a66597: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
r8a66597-udc.h gadget/r8a66597: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
rndis.c
rndis.h
s3c-hsotg.c
s3c-hsotg.h
s3c-hsudc.c
s3c2410_udc.c
s3c2410_udc.h
serial.c
storage_common.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-08-01 10:26:23 -07:00
tcm_usb_gadget.c
tcm_usb_gadget.h
u_ether.c usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop 2012-08-10 11:57:37 -07:00
u_ether.h
u_phonet.h
u_serial.c
u_serial.h
u_uac1.c
u_uac1.h
udc-core.c
usbstring.c
uvc.h
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_video.c
webcam.c
zero.c