On 09/22/14 06:58, Kohji Okuno wrote:
Hi,

I encountered a issue for USB mic.

In fist time, my host controller (xHCI) sends single IN-tokens every
8-SOFs. This is expected action. But, after I open, close and open, my
host controller sends plural IN-tokens between SOF and SOF.

In Intel Lynx Point, I could not reproduce this issue.
I'm sorry. Unfortunately, I can't explain details about my proprietary
host controler.

I found the following explanation in the xHCI 1.1 specification
http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf

In 4.8.3 Endpoint Context State,
   6. The Configure Endpoint Command (Add (A) = `1' and Drop (D) =`1')
      shall transition an endpoint, except the Default Control
      Endpoint, from the Stopped to the Running state.'


So, I modify as the following, then I can run expectedly.
What do you think about this change?

Hi,

I think we should issue the context drop separately. Are we certain that if both drop and add bits are set at the same time, that the drop bit will be processed before the add?

This might be a bug in your hardware, which apparently doesn't check if the context has already been added or not. I'll be glad to make a workaround for it once we have settled on a solution.

Can you test the attached patch using both your hardware and the Lynx Point.

Thank you!

--HPS


Best regards,
  Kohji Okuno

=== ./xhci.c
==================================================================
--- ./xhci.c	(revision 271878)
+++ ./xhci.c	(local)
@@ -3805,7 +3805,17 @@
 	 * Get the endpoint into the running state according to the
 	 * endpoint context state diagram in the XHCI specification:
 	 */
+	if (epno > 1) {
+		/* need to disable endpoint context first */
 
+		xhci_configure_mask(udev, (1U << epno), 1);
+
+		err = xhci_cmd_evaluate_ctx(sc, buf_inp.physaddr, index);
+
+		if (err != 0)
+			DPRINTF("Could not configure endpoint %u\n", epno);
+	}
+
 	xhci_configure_mask(udev, (1U << epno) | 1U, 0);
 
 	err = xhci_cmd_evaluate_ctx(sc, buf_inp.physaddr, index);
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to