Commit 2627335
usb: cdns3: fix incorrect calculation of ep_buf_size when more than one config
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: dce4944 ("usb: cdns3: allocate TX FIFO size according to composite EP number")
Cc: stable <stable@kernel.org>
Reported-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Tested-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Link: https://lore.kernel.org/r/20230707230015.494999-2-Frank.Li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent f4fc01a commit 2627335
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3015 | 3015 | | |
3016 | 3016 | | |
3017 | 3017 | | |
| 3018 | + | |
3018 | 3019 | | |
3019 | 3020 | | |
3020 | 3021 | | |
3021 | 3022 | | |
3022 | 3023 | | |
3023 | | - | |
| 3024 | + | |
| 3025 | + | |
3024 | 3026 | | |
3025 | 3027 | | |
3026 | 3028 | | |
| |||
0 commit comments