Skip to content
Commit d88c69c9 authored by Frank Li's avatar Frank Li Committed by Greg Kroah-Hartman
Browse files

usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config

commit 2627335a upstream.

Previously, the cdns3_gadget_check_config() function in the cdns3 driver
mistakenly calculated the ep_buf_size by considering only one
configuration's endpoint information because "claimed" will be clear after
call usb_gadget_check_config().

The fix involves checking the private flags EP_CLAIMED instead of relying
on the "claimed" flag.

Fixes: dce49449

 ("usb: cdns3: allocate TX FIFO size according to composite EP number")
Cc: stable <stable@kernel.org>
Reported-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
Acked-by: default avatarPeter Chen <peter.chen@kernel.org>
Tested-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
Link: https://lore.kernel.org/r/20230707230015.494999-2-Frank.Li@nxp.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15cea334
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment