mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 07:50:53 +07:00
7c87f4ea3f
commit b1d25e6ee57c2605845595b6c61340d734253eb3 upstream.
According to the datasheet, this controller has a restriction
which "set an endpoint number so that combinations of the DIR bit and
the EPNUM bits do not overlap.". However, since the udc core driver is
possible to assign a bulk pipe as an interrupt endpoint, an endpoint
number may not match the pipe number. After that, when user rebinds
another gadget driver, this driver broke the restriction because
the driver didn't clear any configuration in usb_ep_disable().
Example:
# modprobe g_ncm
Then, EP3 = pipe 3, EP4 = pipe 4, EP5 = pipe 6
# rmmod g_ncm
# modprobe g_hid
Then, EP3 = pipe 6, EP4 = pipe 7.
So, pipe 3 and pipe 6 are set as EP3.
So, clear PIPECFG register in usbhs_pipe_free().
Fixes:
|
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
fifo.c | ||
fifo.h | ||
Kconfig | ||
Makefile | ||
mod_gadget.c | ||
mod_host.c | ||
mod.c | ||
mod.h | ||
pipe.c | ||
pipe.h | ||
rcar2.c | ||
rcar2.h | ||
rcar3.c | ||
rcar3.h | ||
rza2.c | ||
rza.c | ||
rza.h |