linux-uconsole/drivers/usb/gadget/function
EJ Hsu 9d5b54cfe0 usb: gadget: fix wrong endpoint desc
[ Upstream commit e5b5da96da ]

Gadget driver should always use config_ep_by_speed() to initialize
usb_ep struct according to usb device's operating speed. Otherwise,
usb_ep struct may be wrong if usb devcie's operating speed is changed.

The key point in this patch is that we want to make sure the desc pointer
in usb_ep struct will be set to NULL when gadget is disconnected.
This will force it to call config_ep_by_speed() to correctly initialize
usb_ep struct based on the new operating speed when gadget is
re-connected later.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: EJ Hsu <ejh@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-09 10:18:57 +01:00
..
f_acm.c
f_ecm.c usb: gadget: fix wrong endpoint desc 2020-01-09 10:18:57 +01:00
f_eem.c
f_fs.c
f_hid.c
f_loopback.c
f_mass_storage.c usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt 2019-09-06 10:21:57 +02:00
f_mass_storage.h
f_midi.c
f_ncm.c
f_obex.c
f_phonet.c
f_printer.c
f_rndis.c usb: gadget: fix wrong endpoint desc 2020-01-09 10:18:57 +01:00
f_serial.c
f_sourcesink.c
f_subset.c
f_tcm.c
f_uac1.c
f_uac1_legacy.c
f_uac2.c
f_uvc.c
f_uvc.h
g_zero.h
Makefile
ndis.h
rndis.c
rndis.h
storage_common.c
storage_common.h
tcm.h
u_audio.c
u_audio.h
u_ecm.h
u_eem.h
u_ether.c
u_ether.h
u_ether_configfs.h
u_fs.h
u_gether.h
u_hid.h
u_midi.h
u_ncm.h
u_phonet.h
u_printer.h
u_rndis.h
u_serial.c usb: gadget: u_serial: add missing port entry locking 2019-12-13 08:50:58 +01:00
u_serial.h
u_tcm.h
u_uac1.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac2.h
u_uvc.h
uvc.h
uvc_configfs.c usb: gadget: uvc: configfs: Sort frame intervals upon writing 2019-11-20 18:47:20 +01:00
uvc_configfs.h
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_v4l2.h
uvc_video.c usb: gadget: uvc: Only halt video streaming endpoint in bulk mode 2019-11-20 18:47:25 +01:00
uvc_video.h