WORKAROUND: usb: cdns3: Restore onchip memory reservation
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 24 Aug 2023 08:02:26 +0000 (17:02 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Feb 2024 00:13:55 +0000 (09:13 +0900)
commitd2de06818aa7e28387c3a236c775d4b5041fcc7e
treef5f420360e0d5ce3595e505c95e8963a9da69cef
parent4d0d434dbe960244c9354bbfb5a64705ddd0f400
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