NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/52493: NetBSD boot freezes on xhci_init on Mac Mini (MGEN2AE/A)

The following reply was made to PR port-amd64/52493; it has been noted by GNATS.

From: Andrius V <>
Subject: Re: port-amd64/52493: NetBSD boot freezes on xhci_init on Mac Mini (MGEN2AE/A)
Date: Fri, 1 Sep 2017 15:52:22 +0300

 Hello NetBSD team,
 I performed additional testing the get more information regarding this
 issue. I tried to boot different BSDs and compare drivers
 (unfortunately all BSDs seem to have their own take on xhci driver).
 OpenBSD shares exactly the same issue with the freezing system on
 their counterpart of xhci_op_write_4(sc, XHCI_USBCMD,
 XHCI_CMD_INTE|XHCI_CMD_RS);). FreeBSD boots and identifies USB devices
 properly on the other hand. So it can be some kind of reference to
 investigate the cause (but I am not sure yet where to look). They
 execute it a bit differently (XWRITE4(sc, oper, XHCI_USBCMD,
 XHCI_CMD_RS | XHCI_CMD_INTE | XHCI_CMD_HSEE);) but it's not the cause
 of the problem. Coincidentally I have same usb3 controller on one
 lenovo laptop (or at least identification message is the same up to
 revision) but it boots NetBSD and identifies USB devices properly. So
 in the end it seems the problem is caused by something before
 initialization of the controller (device information/memory?). Any
 clues where can I look or what information can I provide? Thank you.
 Andrius V
 On Sun, Aug 20, 2017 at 9:35 PM,  <> wrote:
 >>Number:         52493
 >>Category:       port-amd64
 >>Synopsis:       NetBSD boot freezes on xhci_init on Mac Mini (MGEN2AE/A)
 >>Confidential:   no
 >>Severity:       serious
 >>Priority:       medium
 >>Responsible:    port-amd64-maintainer
 >>State:          open
 >>Class:          sw-bug
 >>Submitter-Id:   net
 >>Arrival-Date:   Sun Aug 20 18:35:00 +0000 2017
 >>Originator:     Andrius V
 >>Release:        NetBSD 8.0_BETA
 > Recently I performed some NetBSD 8 testing on various hardware including =
 Mac Mini (MGEN2AE/A). The problem I encountered in booting it on this syste=
 m was that it just freezes without any error message. After some trial and =
 error I found that the freeze occurs on xhci_init, specifically on this lin=
 e (xhci.c line 1180):
 > xhci_op_write_4(sc, XHCI_USBCMD, XHCI_CMD_INTE|XHCI_CMD_RS); /* Go! */
 > Commenting out the line and rebuilding the kernel actually allows system =
 to boot (of course, USB3 fails to work but at least system boot doesn't fre=
 eze). Unfortunately my knowledge stops here though I can try to get more in=
 fo if needed.
 > Ideally it would be nice to make USB3 work (as mac mini is quite useless =
 without USB) but I believe at least the freeze shouldn't occur on the boot.
 > Debug messages from boot for xhci (with commented out line above):
 > ...
 > xhci0 at pci0 dev 20 function 0: vendor 8086 product 9c31 (rev. 0x04)
 > xhci0: interrupting at msi2 vec 0
 > xhci0: xHCI version 1.0
 > xhci0: hcs1=3Dd000820 hcs2=3D84000054 hcs3=3D200000a
 > xhci0: hcc=3D0x200077c1<XECP=3D0x2000,MAXPSA=3D0x7,SEC,SPC,PAE,NSS,LTC,AC=
 > xhci0: xECP 8000
 > xhci0: ECR: 0x02000802
 > xhci0:  SP: 02000802 20425355 30180901 00000000
 > xhci0:  hs ports 1 - 9
 > xhci0: ECR: 0x03000802
 > xhci0:  SP: 03000802 20425355 1000040a 00000000
 > xhci0:  ss ports 10 - 13
 > xhci0: ECR: 0x00010cc1
 > xhci0: ECR: 0x0000fcc0
 > xhci0: ECR: 0x00000801
 > xhci0: ECR: 0x0005000a
 > xhci0: PAGESIZE 0x00000001
 > xhci0: sc_pgsz 0x00001000
 > xhci0: sc_maxslots 0x00000020
 > xhci0: sc_maxports 13
 > xhci0: sc_maxspbuf 16
 > xhci0: eventst: 000000010f414fc0 0xffff80008e5c7fc0 1000
 > xhci0: dcbaa: 000000010f415000 0xffff80008e5c8000 1000
 > xhci0: current IMOD 1000
 > xhci0: USBCMD 00000000
 > xhci0: USB3PRM / USB3.0 configurable ports: 0x0000000f
 > xhci0: USB3_PSSEN / Enabled USB3.0 ports under xHCI: 0x0000000f
 > xhci0: XUSB2PRM / USB2.0 ports can switch from EHCI to xHCI:0x000001ff
 > xhci0: XUSB2PR / USB2.0 ports under xHCI: 0x000001ff
 > usb0 at xhci0: USB revision 3.0
 > usb0: WARNING: power management not supported
 > usb1 at xhci0: USB revision 2.0
 > usb1: WARNING: power management not supported
 > ...
 > uhub0 at usb0: vendor 8086 (0x8086) xHCI Root Hub (0000), class 9/0, rev =
 1.00/1.00, addr 0
 > uhub0: 4 ports with 4 removable, self powered
 > uhub1 at usb1: vendor 8086 (0x8086) xHCI Root Hub (0000), class 9/0, rev =
 2.00/1.00, addr 0
 > uhub1: 9 ports with 9 removable, self powered
 > ...
 > uhub1: device problem, disabling port 1
 > uhub1: device problem, disabling port 2
 > uhub1: device problem, disabling port 3
 > uhub1: device problem, disabling port 4

Home | Main Index | Thread Index | Old Index