Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 2014 21:38:31 +0800
From:      Huang Wen Hui <huanghwh@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        "freebsd-usb@freebsd.org" <freebsd-usb@freebsd.org>
Subject:   Re: xhci controller problem on MBPr2013
Message-ID:  <CAB8uncbKu-hhsgYEdqc7jBzUwzt63aUQ_j26m-e6ejsstQMYbg@mail.gmail.com>
In-Reply-To: <535CEC27.2030702@selasky.org>
References:  <CAB8uncZxftBZ8O6vhpyBBkMJABummPqBUieN3P3xruYL-tcukQ@mail.gmail.com> <CAB8uncZCTNk5XzFQ38KXJ1-DAvrpCF0ZR023UUn0Cu%2BCDhyFgA@mail.gmail.com> <535CA9FF.4090601@selasky.org> <CAB8uncbE_scWdMF2srL06Q5ty_mCxfBuX99fNKDEud6B7Ca6iw@mail.gmail.com> <535CEC27.2030702@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
In both case, same result:
1. without  any external usb device, it stop after xchi message, the last
two lines are:

xhci0: <Intel Lynx Point USB 3.0 controller> mem 0xc1e00000-0xc1e0ffff at
device 20.0 on pci0
xhci0: 32 byte context size.

2. If I plug my iphone,  it pass xchi message, stop after:

Timecounter "TSC-low" frequency 1297022873 Hz quality 1000
Root mount waiting for: usbus0
uhub0: 21 ports with 21 removable, self powered
Root mount waiting for: usbus0
ugen0.2: <Apple Inc.> at usbus0
uhub1: <Apple Inc. BRCM20702 Hub, class 9/0, rev 2.00/1.00, addr 1> on
usbus0

MBr2013 also have SD card in USB hub:

ugen0.7: <Apple> at usbus0
umass0: <Apple Card Reader, class 0/0, rev 3.00/8.20, addr 6> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:1:0:-1: Attached to scbus1
(probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10
00 00
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not
present)
(probe0:umass-sim0:0:0:0): Error 6, Unretryable error
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <APPLE SD Card Reader 3.00> Removable Direct Access SCSI-6 device
da0: Serial Number 000000000820
da0: 400.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>

Both SD card and keyboard not attach in all cases.


# usbconfig
ugen0.1: <XHCI root HUB 0x8086> at usbus0, cfg=0 md=HOST spd=SUPER
(5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <BRCM20702 Hub Apple Inc.> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (94mA)
ugen0.3: <product 0x820a vendor 0x05ac> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON (0mA)
ugen0.4: <product 0x820b vendor 0x05ac> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON (0mA)
ugen0.5: <Bluetooth USB Host Controller Apple Inc.> at usbus0, cfg=0
md=HOST spd=FULL (12Mbps) pwr=ON (0mA)
ugen0.6: <Apple Internal Keyboard  Trackpad Apple Inc.> at usbus0, cfg=0
md=HOST spd=FULL (12Mbps) pwr=ON (40mA)
ugen0.7: <Card Reader Apple> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps)
pwr=ON (224mA)
ugen0.8: <iPhone Apple Inc.> at usbus0, cfg=3 md=HOST spd=HIGH (480Mbps)
pwr=ON (500mA)

Thanks for you help!

Huang Wenhui



2014-04-27 19:38 GMT+08:00 Hans Petter Selasky <hps@selasky.org>:

> On 04/27/14 10:57, Huang Wen Hui wrote:
>
>> Hi,
>> The system hang  at random place after  pass xhci message. Before hangs,
>> no
>> usb device
>> can attach in most time.
>>
>>
> Hi,
>
> If you change IMOD_DEFAULT like shown below, does it make any difference?
>
>  === ./xhcireg.h
>> ==================================================================
>> --- ./xhcireg.h (revision 264804)
>> +++ ./xhcireg.h (local)
>> @@ -166,7 +166,7 @@
>>  #define        XHCI_IMOD_IVAL_SET(x)   (((x) & 0xFFFF) << 0)   /* 250ns
>> unit */
>>  #define        XHCI_IMOD_ICNT_GET(x)   (((x) >> 16) & 0xFFFF)  /* 250ns
>> unit */
>>  #define        XHCI_IMOD_ICNT_SET(x)   (((x) & 0xFFFF) << 16)  /* 250ns
>> unit */
>> -#define        XHCI_IMOD_DEFAULT       0x000001F4U     /* 8000
>> IRQ/second */
>> +#define        XHCI_IMOD_DEFAULT       0x01F401F4U     /* 8000
>> IRQ/second */
>>  #define        XHCI_ERSTSZ(n)          (0x0028 + (0x20 * (n))) /* XHCI
>> event ring segment table size */
>>  #define        XHCI_ERSTS_GET(x)       ((x) & 0xFFFF)
>>  #define        XHCI_ERSTS_SET(x)       ((x) & 0xFFFF)
>>
>
>
> Second, if you comment out in xhci.c:
>
>         /* catch any lost interrupts */
>         xhci_do_poll(&sc->sc_bus);
>
> Does that change anything?
>
> Try one change at a time.
>
> Thank you!
>
> --HPS
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB8uncbKu-hhsgYEdqc7jBzUwzt63aUQ_j26m-e6ejsstQMYbg>