]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
xhci-hcd: support soft retry on SS transfer error
authorTW Chiu <twchiu@nvidia.com>
Wed, 12 Jul 2017 03:48:25 +0000 (11:48 +0800)
committerWinnie Hsu <whsu@nvidia.com>
Wed, 12 Jul 2017 21:44:52 +0000 (14:44 -0700)
Handle the case where Stop EP Command is issued during
soft retry.

Bug 200217649
Bug 200235489
Bug 200326615

Change-Id: I785696833e5ce36a846efec8a4240e2b5d4c20aa
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Signed-off-by: Hans Yang <hansy@nvidia.com>
(cherry picked from commit 71c69da3dfaeb9911c144af410a14253538d0d7f)
Reviewed-on: https://git-master.nvidia.com/r/1517708
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/usb/host/xhci-ring.c

index edc038f77338b2fb38a77f50be35987a4fc32530..ee24bc0117902a161e4848127bd757d6d1ff4b5b 100644 (file)
@@ -2405,6 +2405,12 @@ static int handle_tx_event(struct xhci_hcd *xhci,
                        xhci_warn_ratelimited(xhci,
                                        "WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?\n");
        case COMP_SHORT_TX:
+               goto check_soft_try;
+       case COMP_STOP:
+               xhci_dbg(xhci, "Stopped on Transfer TRB\n");
+               goto check_soft_try;
+       case COMP_STOP_INVAL:
+               xhci_dbg(xhci, "Stopped on No-op or Link TRB\n");
 check_soft_try:
                if (disable_u0_ts1_detect && ep_ring->soft_try) {
                        xhci_dbg(xhci, "soft retry completed successfully\n");
@@ -2413,12 +2419,6 @@ check_soft_try:
                                                slot_id, ep_index + 1, false);
                }
                break;
-       case COMP_STOP:
-               xhci_dbg(xhci, "Stopped on Transfer TRB\n");
-               break;
-       case COMP_STOP_INVAL:
-               xhci_dbg(xhci, "Stopped on No-op or Link TRB\n");
-               break;
        case COMP_STOP_SHORT:
                xhci_dbg(xhci, "Stopped with short packet transfer detected\n");
                break;