Date: Fri, 30 Aug 2013 11:35:12 +0200 From: "Lundberg, Johannes" <johannes@brilliantservice.co.jp> To: Hans Petter Selasky <hps@bitfrost.no> Cc: FreeBSD Current <freebsd-current@freebsd.org>, "freebsd-usb@freebsd.org" <freebsd-usb@freebsd.org> Subject: Re: xhci broken on 10-CURRENT and 2013 MacBook Air? Message-ID: <CAASDrVnwKOwqAVAu19gExpNvPYcwXo1V%2Bg=kVbnZWq5ic4NDvA@mail.gmail.com> In-Reply-To: <52203EC9.4060808@bitfrost.no> References: <CAASDrV=_8XDFZqcVP7aHdgEwxtMEDyNDQAyM5dgPmJ6=toOpow@mail.gmail.com> <CAASDrVmyduRKwsp5oURYuHX8G4hoODn0TftbC5MfV=3XhhocrA@mail.gmail.com> <521B9CD7.8010902@bitfrost.no> <CAASDrVk5xjptRPttbQA6b7Tg_Pgf005EqMQpUhv-jNje%2B352%2BA@mail.gmail.com> <521C6C26.7050207@bitfrost.no> <CAASDrVnJj4%2BkhHB-StW3JpVuCqZx7MBcmqA59_Ay-06Jgu5PnQ@mail.gmail.com> <CAASDrVk4eWVLj0=VHygKk5iG9Zd0tSwNkqLX%2BLJjP=mD_LRrUw@mail.gmail.com> <52203EC9.4060808@bitfrost.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hans
I tried the patch and the result is the same. However, I found the command
that causes the freeze. Also, it is not always it freezes but maybe 9/10
reboots or more frequently.
At the end of the function xhci_start_controller(..) there is a for loop:
487 for (i = 0; i != 100; i++) {
488 usb_pause_mtx(NULL, hz / 100);
489 temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH;
490 if (!temp)
491 break;
492 }
and it freezes at usb_pause_mtx(...)
value of i is 0
value of hz is 1000
Johannes Lundberg
BRILLIANTSERVICE CO., LTD. <http://www.brilliantservice.co.jp>
On Fri, Aug 30, 2013 at 8:42 AM, Hans Petter Selasky <hps@bitfrost.no>wrote:
> On 08/30/13 08:09, Lundberg, Johannes wrote:
>
>> What I got so far is this;
>>
>> USB driver from current stops after
>> xhci0: 32 byte context size
>>
>> While driver from 9.1 continues to the next step which is
>> usbus0 on xhci0
>> xhci0: usbpf: Attached
>> ...
>>
>> I can try adding some printf's in the code and see if I get some more..
>>
>>
> Hi,
>
> There are only a few commits to the xhci driver since 9.1 was releases, so
> this should be easy to figure out.
>
> I'm doing a wild guess. Can you try the attached patch. It will ensure
> that any BIOS generated interrupts get cleared before we reset the
> controller.
>
> --HPS
>
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAASDrVnwKOwqAVAu19gExpNvPYcwXo1V%2Bg=kVbnZWq5ic4NDvA>
