mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
UPSTREAM: usb: dwc3: gadget: Skip checking Update Transfer status
If we're not setting CMDACT (from "No Response" Update Transfer
command), then there's no point in checking for the command status. So
skip it. This can reduce a register read delay and improve performance.
Change-Id: I00106aab2965b3c65de8a9ea5e4846e59472c101
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/3dc31cf11581ae3ee82d9202dda3fc17d897d786.1638240306.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit bc27117c7c)
This commit is contained in:
@@ -357,6 +357,12 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd,
|
||||
cmd |= DWC3_DEPCMD_CMDACT;
|
||||
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMD, cmd);
|
||||
|
||||
if (!(cmd & DWC3_DEPCMD_CMDACT)) {
|
||||
ret = 0;
|
||||
goto skip_status;
|
||||
}
|
||||
|
||||
do {
|
||||
reg = dwc3_readl(dep->regs, DWC3_DEPCMD);
|
||||
if (!(reg & DWC3_DEPCMD_CMDACT)) {
|
||||
@@ -398,6 +404,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd,
|
||||
cmd_status = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
skip_status:
|
||||
trace_dwc3_gadget_ep_cmd(dep, cmd, params, cmd_status);
|
||||
|
||||
if (DWC3_DEPCMD_CMD(cmd) == DWC3_DEPCMD_STARTTRANSFER) {
|
||||
|
||||
Reference in New Issue
Block a user