Skip to contentSkip to conversation

usb: host: xhci: do not return error status for URB

PATCH New Peter Chen 1 participant 1 message Mar 6, 2018

Subsystems (2)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH 1/1 usb: host: xhci: do not return error status for URB

Current XHCI implementation does not consider completion interrupt for SETUP packet standalone, so it will show warning message and return error status for URB. In fact, it can support it. In this commit, we change warning message as debug message and set status as zero for URB.

Support completion interrupt for SETUP packet is needed for USB EH2.0 SINGLE_STEP_SET_FEATURE Test.

---
 drivers/usb/host/xhci-ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/usb/host/xhci-ring.c +2 -5
index daa94c3..0729e46 100644
@@ -2010,12 +2010,9 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
 
 	switch (trb_comp_code) {
 	case COMP_SUCCESS:
-		if (trb_type != TRB_STATUS) {
-			xhci_warn(xhci, "WARN: Success on ctrl %s TRB without IOC set?\n",
+		if (trb_type != TRB_STATUS)
+			xhci_dbg(xhci, "Success on ctrl %s TRB without IOC set?\n",
 				  (trb_type == TRB_DATA) ? "data" : "setup");
-			*status = -ESHUTDOWN;
-			break;
-		}
 		*status = 0;
 		break;
 	case COMP_SHORT_PACKET: