Skip to content
Commit e5b5da96 authored by EJ Hsu's avatar EJ Hsu Committed by Felipe Balbi
Browse files

usb: gadget: fix wrong endpoint desc



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: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarEJ Hsu <ejh@nvidia.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 2d7b78f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment