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: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
To: t.hash425%gmail.com@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/49076: USB 3.0 devices are not attached to xhci hubs
Date: Fri, 05 Sep 2014 21:29:13 +0900 (JST)

 From: Takahiro HAYASHI <t.hash425%gmail.com@localhost>, 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.
 
 Hi,
 
 Your suggestion is correct.
 And correct XHCI_XECP_NEXT handling causes freeze during boot.
 And Intel Lynx Point does not require xhci_pci_takecontroller function.
 It was my misunderstanding.
 
 I withdraw xhci_pci_takecontroller part.
 
 Thank you.
 
 --
 Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
 


Home | Main Index | Thread Index | Old Index