Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2014 13:58:00 +0900 (JST)
From:      Kohji Okuno <okuno.kohji@jp.panasonic.com>
To:        freebsd-current@freebsd.org
Cc:        okuno.kohji@jp.panasonic.com, freebsd-usb@freebsd.org
Subject:   Does the xHCI driver has a spec violation?
Message-ID:  <20140922.135800.1954695532570247771.okuno.kohji@jp.panasonic.com>

next in thread | raw e-mail | index | archive | help
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?

Best regards,
 Kohji Okuno


static usb_error_t
xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop)
{
	struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
	struct usb_page_search buf_inp;
	struct xhci_input_dev_ctx *pinp;
	uint32_t temp;
	uint8_t index;
	uint8_t x;

	index = udev->controller_slot_id;

	usbd_get_page(&sc->sc_hw.devs[index].input_pc, 0, &buf_inp);

	pinp = buf_inp.buffer;

	if (drop) {
		mask &= XHCI_INCTX_NON_CTRL_MASK;
		xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask);
		xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, 0);
	} else {
-		xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, 0);
+		xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask);
		xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, mask);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140922.135800.1954695532570247771.okuno.kohji>