NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/49076: USB 3.0 devices are not attached to xhci hubs
The following reply was made to PR kern/49076; it has been noted by GNATS.
From: Takahiro HAYASHI <t.hash425%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
ryoon%NetBSD.org@localhost
Cc:
Subject: Re: kern/49076: USB 3.0 devices are not attached to xhci hubs
Date: Thu, 04 Sep 2014 08:59:58 +0900
On 08/31/14 20:40, Ryo ONODERA wrote:
[snip]
> +static void
> +xhci_pci_takecontroller(struct xhci_pci_softc *psc, int silent)
> +{
> + uint32_t cparams, xecp, eec;
> + uint8_t bios_sem;
> + int i;
> +
> + cparams = xhci_read_4(&psc->sc_xhci, XHCI_HCCPARAMS);
> + eec = -1;
> +
> + /* Synchronise with the BIOS if it owns the controller. */
> + for (xecp = XHCI_HCC_XECP(cparams) << 2; xecp != 0;
> + xecp = XHCI_XECP_NEXT(eec) << 2) {
> + eec = xhci_read_4(&psc->sc_xhci, xecp);
This may not advance xecp correctly.
According to xHCI spec 1.1 section 7, XHCI_XECP_NEXT(eec)
indicates a relative offset in dword, "from this dword
to the beginning of the next extended capability".
That is, it should be:
xecp += XHCI_XECP_NEXT(eec) << 2;
unless XHCI_XECP_NEXT(eec) == 0.
Please see around ID_PROTOCOL in xhci_init() for detail.
--
t-hash
Home |
Main Index |
Thread Index |
Old Index