mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
FROMGIT: usb: dwc3: gadget: Ignore Packet Pending bit
Currently the controller handles single stream only. So, Ignore Packet
Pending bit for stream selection and don't search for another stream if
the host sends Data Packet with PP=0 (for OUT direction) or ACK with
NumP=0 and PP=0 (for IN direction). This slightly improves the stream
performance.
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/097ba9e104c143f7ba0195ebff29390ec3043692.1618282705.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e66bbfb0fb
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifbc02709ac53b1f26b3afc00eae25aba9b9b42e2
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8d92227969
commit
fbb0ff48a7
@@ -404,6 +404,7 @@
|
||||
#define DWC3_DCFG_NUMP(n) (((n) >> DWC3_DCFG_NUMP_SHIFT) & 0x1f)
|
||||
#define DWC3_DCFG_NUMP_MASK (0x1f << DWC3_DCFG_NUMP_SHIFT)
|
||||
#define DWC3_DCFG_LPM_CAP BIT(22)
|
||||
#define DWC3_DCFG_IGNSTRMPP BIT(23)
|
||||
|
||||
/* Device Control Register */
|
||||
#define DWC3_DCTL_RUN_STOP BIT(31)
|
||||
|
||||
@@ -2398,6 +2398,17 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)
|
||||
|
||||
dwc3_gadget_setup_nump(dwc);
|
||||
|
||||
/*
|
||||
* Currently the controller handles single stream only. So, Ignore
|
||||
* Packet Pending bit for stream selection and don't search for another
|
||||
* stream if the host sends Data Packet with PP=0 (for OUT direction) or
|
||||
* ACK with NumP=0 and PP=0 (for IN direction). This slightly improves
|
||||
* the stream performance.
|
||||
*/
|
||||
reg = dwc3_readl(dwc->regs, DWC3_DCFG);
|
||||
reg |= DWC3_DCFG_IGNSTRMPP;
|
||||
dwc3_writel(dwc->regs, DWC3_DCFG, reg);
|
||||
|
||||
/* Start with SuperSpeed Default */
|
||||
dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user