Hi,

I think I see what is going on there. I believe this commit is a regression after r365239, that the XHCI driver only resets the data toggle when a STALL PID or USB error is received! But that is not the case for the BULK OUT endpoint, in your traces, because USB mass storage has two endpoints.

https://svnweb.freebsd.org/changeset/base/365239

Can you try the attached patch instead of reverting that commit and see if the XHCI now sends a DATA0, as expected?

Bjoern and Kristof, can you also test this patch?

--HPS
diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c
index f95996b7ab3..eb88140cf55 100644
--- a/sys/dev/usb/controller/xhci.c
+++ b/sys/dev/usb/controller/xhci.c
@@ -3825,6 +3825,13 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer)
 		err = xhci_cmd_stop_ep(sc, 0, epno, index);
 		if (err != 0)
 			DPRINTF("Could not stop endpoint %u\n", epno);
+		/*
+		 * Need to reset the data toggle, because stop
+		 * endpoint doesn't do that:
+		 */
+		err = xhci_cmd_reset_ep(sc, 0, epno, index);
+		if (err != 0)
+			DPRINTF("Could not reset endpoint %u\n", epno);
 		break;
 	}
 

Reply via email to