WORKAROUND: usb: cdns3: Restore onchip memory reservation 88/297788/1 accepted/tizen/unified/riscv/20230828.003411
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 24 Aug 2023 08:02:26 +0000 (17:02 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 24 Aug 2023 08:18:59 +0000 (17:18 +0900)
commit148984e9cee3532fe11331fcab83f729a41e6bf4
treec7c321994a9f53aeaf627639d3dc75eb9be34ebf
parent2328c5c76fccc1d784ba5ed9562e7caa75be08d8
WORKAROUND: usb: cdns3: Restore onchip memory reservation

Restore onchip meory reservation of disable in_ep when hw
configuration is not done as a workaround.
Without restoring, disabling and re-enabling eps causes
check failure of onchip memory reseration size.

This fixes usb communication failure of ffs_func_set_alt()
calling usb_ep_disable() and usb_ep_enable() for all ep.

Note: for non workaround, it should calculate exact reservation
size from ep type and usb speed and should restore out_ep memory
reservation when there is no more enabled out_ep.

Change-Id: Ifca0052f96fd777036e01b9ddb7ae6af54bba911
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/usb/cdns3/cdns3-gadget.c