]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: dwc3: gadget: Add missing check for single port RAM in TxFIFO resizing logic
authorSelvarasu Ganesan <selvarasu.g@samsung.com>
Tue, 12 Nov 2024 04:48:02 +0000 (10:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Nov 2024 06:12:57 +0000 (07:12 +0100)
commit61eb055cd3048ee01ca43d1be924167d33e16fdc
tree4f5c04c98dddbdb39beb05bec027d5888f623b5b
parentfa518772fb63e201207bcdab7ea108198dc15f3c
usb: dwc3: gadget: Add missing check for single port RAM in TxFIFO resizing logic

The existing implementation of the TxFIFO resizing logic only supports
scenarios where more than one port RAM is used. However, there is a need
to resize the TxFIFO in USB2.0-only mode where only a single port RAM is
available. This commit introduces the necessary changes to support
TxFIFO resizing in such scenarios by adding a missing check for single
port RAM.

This fix addresses certain platform configurations where the existing
TxFIFO resizing logic does not work properly due to the absence of
support for single port RAM. By adding this missing check, we ensure
that the TxFIFO resizing logic works correctly in all scenarios,
including those with a single port RAM.

Fixes: 9f607a309fbe ("usb: dwc3: Resize TX FIFOs to meet EP bursting requirements")
Cc: stable@vger.kernel.org # 6.12.x: fad16c82: usb: dwc3: gadget: Refine the logic for resizing Tx FIFOs
Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20241112044807.623-1-selvarasu.g@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c