Hi Martin,
On Wed, Sep 05, 2018 at 11:19:56AM -0300, Martin Pieuchot wrote:
> On 05/09/18(Wed) 09:51, Tom Murphy wrote:
> > [...]
> > I physically unplug the phone and the kernel starts generating the xhci0:
> > timeout aborting transfer messages in a loop.
>
> Aah! So the messages appear *after* you unplugged the device. That
> makes sense. Does the diff below help? I just committed the previous
> one so make sure you have current sources.
>
> Index: xhci.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/xhci.c,v
> retrieving revision 1.88
> diff -u -p -r1.88 xhci.c
> --- xhci.c 5 Sep 2018 14:03:28 -0000 1.88
> +++ xhci.c 5 Sep 2018 14:17:39 -0000
> @@ -2055,8 +2055,13 @@ xhci_abort_xfer(struct usbd_xfer *xfer,
> xp->aborted_xfer = xfer;
>
> /* Stop the endpoint and wait until the hardware says so. */
> - if (xhci_cmd_stop_ep(sc, xp->slot, xp->dci))
> + if (xhci_cmd_stop_ep(sc, xp->slot, xp->dci)) {
> DPRINTF(("%s: error stopping endpoint\n", DEVNAME(sc)));
> + /* Assume the device is gone. */
> + xfer->status = status;
> + usb_transfer_complete(xfer);
> + return;
> + }
>
> /*
> * The transfer was already completed when we stopped the
I've just tested the patch. It does fix the behavior when unplugging the device,
however, I've gotten the kernel to crash when I do the following:
1) Start adb
2) Connect the phone
3) Try connecting to phone with adb shell (it doesn't work.. says device is
offline)
4) Disconnect phone
5) Reconnect phone
6) run: 'adb kill-server'
Then kernel protection fault happens. Dmesg and backtrace and XHCI debug
entries below.
dmesg:
OpenBSD 6.4-beta (CUSTOM) #1: Wed Sep 5 19:44:41 BST 2018
[email protected]:/sys/arch/amd64/compile/CUSTOM
real mem = 17040445440 (16251MB)
avail mem = 16514736128 (15749MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7b288000 (41 entries)
bios0: vendor American Megatrends Inc. version "1.05.07" date 09/29/2017
bios0: PC Specialist LTD N13xWU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG SSDT SSDT HPET UEFI SSDT SSDT SSDT
DBGP DBG2 DMAR BGRT ASF! WSMT
acpi0: wakeup devices PXSX(S4) RP17(S4) PXSX(S4) RP18(S4) PXSX(S4) RP19(S4)
PXSX(S4) RP20(S4) PXSX(S4) RP21(S4) PXSX(S4) RP22(S4) PXSX(S4) RP23(S4)
PXSX(S4) RP24(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.47 MHz, 06-8e-0a
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.07 MHz, 06-8e-0a
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 1, package 0
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 1, core 2, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 1696.06 MHz, 06-8e-0a
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus -1 (RP17)
acpiprt5 at acpi0: bus -1 (RP18)
acpiprt6 at acpi0: bus -1 (RP19)
acpiprt7 at acpi0: bus -1 (RP20)
acpiprt8 at acpi0: bus -1 (RP21)
acpiprt9 at acpi0: bus -1 (RP22)
acpiprt10 at acpi0: bus -1 (RP23)
acpiprt11 at acpi0: bus -1 (RP24)
acpiprt12 at acpi0: bus 1 (RP01)
acpiprt13 at acpi0: bus -1 (RP02)
acpiprt14 at acpi0: bus -1 (RP03)
acpiprt15 at acpi0: bus -1 (RP04)
acpiprt16 at acpi0: bus 58 (RP05)
acpiprt17 at acpi0: bus 59 (RP06)
acpiprt18 at acpi0: bus -1 (RP07)
acpiprt19 at acpi0: bus -1 (RP08)
acpiprt20 at acpi0: bus -1 (RP09)
acpiprt21 at acpi0: bus -1 (RP10)
acpiprt22 at acpi0: bus -1 (RP11)
acpiprt23 at acpi0: bus -1 (RP12)
acpiprt24 at acpi0: bus -1 (RP13)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu4 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu5 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu6 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu7 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpitz0 at acpi0: critical temperature is 120 degC
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
"PNPC000" at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "BAT" serial 0001 type LION oem "Notebook"
"PNP0C14" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCD0
cpu0: Enhanced SpeedStep 1696 MHz: speeds: 2001, 2000, 1900, 1800, 1700, 1500,
1400, 1300, 1200, 1100, 1000, 800, 700, 600, 500, 400 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 8G Host" rev 0x08
inteldrm0 at pci0 dev 2 function 0 "Intel UHD Graphics 620" rev 0x07
drm0 at inteldrm0
inteldrm0: msi
error: [drm:pid0:i915_firmware_load_error_print] *ERROR* failed to load
firmware i915/kbl_dmc_ver1.bin (-22)
inteldrm0: 1920x1080, 32bpp
WARNING !wm_changed failed at /usr/src/sys/dev/pci/drm/i915/intel_pm.c:3609
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi, xHCI 1.0
xhci0: CAPLENGTH=0x80
xhci0: DOORBELL=0x3000
xhci0: RUNTIME=0x2000
xhci0: 32 bytes context
xhci0: supported page size 0x00000001
xhci0: 18 ports and 64 slots
xhci0: 34 scratch pages, ETE=0, IST=0x4
xhci0: USB3PRM / USB3.0 configurable ports: 0x00000000
xhci0: USB3_PSSEN / Enabled USB3.0 ports under xHCI: 0x00000000
xhci0: XUSB2PRM / USB2.0 ports can switch from EHCI to xHCI:0x00000000
xhci0: XUSB2PR / USB2.0 ports under xHCI: 0x00000000
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00
addr 1
xhci0: DCBAAP=00x6843f000
xhci0: CRCR=00 (0000000068440000)
xhci0: ERSTBA=00x6842a000
xhci0: ERDP=00x68441000
xhci0: USBCMD=0x5
xhci0: IMAN=0x2
pchtemp0 at pci0 dev 20 function 2 "Intel 100 Series Thermal" rev 0x21
"Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x21: msi, AHCI
1.3.1
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WDS500G2B0A-, X611> SCSI3 0/direct
fixed naa.5001b448b66ac709
sd0: 476940MB, 512 bytes/sector, 976773168 sectors, thin
ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 58
rtsx0 at pci2 dev 0 function 0 "Realtek RTL8411B Card Reader" rev 0x01: msi
sdmmc0 at rtsx0: 4-bit, dma
re0 at pci2 dev 0 function 1 "Realtek 8168" rev 0x12: RTL8411B (0x5c80), msi,
address 80:fa:5b:4f:5b:fb
rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ppb2 at pci0 dev 28 function 5 "Intel 100 Series PCIE" rev 0xf1: msi
pci3 at ppb2 bus 59
iwm0 at pci3 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x78, msi
pcib0 at pci0 dev 31 function 0 "Intel 200 Series LPC" rev 0x21
"Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 200 Series HD Audio" rev 0x21: msi
azalia0: codecs: Realtek ALC269, Intel/0x280b, using Realtek ALC269
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21: apic 2 int
16
iic0 at ichiic0
sdtemp0 at iic0 addr 0x18: stts2004
iic0: addr 0x2c 80=04 81=04 82=04 83=04 84=04 85=04 86=04 87=04 fd=01 words
00=ffff 01=ffff 02=ffff 03=ffff 04=ffff 05=ffff 06=ffff 07=ffff
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 8.2, 0x1e2b1 0x840300
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
xhci0: port=1 change=0x02
xhci0: port=4 change=0x10
xhci0: port=5 change=0x20
xhci0: port=13 change=0x00
xhci0: port=1 change=0x02
xhci0: xhci_cmd_slot_control
xhci0: dev 1, input=0xffffff00687b9000 slot=0xffffff00687b9020
ep0=0xffffff00687b9040
xhci0: dev 1, setting DCBAA to 0x00000000687ba000
xhci_pipe_init: pipe=0xffff800000c55000 addr=0 depth=1 port=1 speed=3 dev 1 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 1 addr 1
uhub1 at uhub0 port 1 configuration 1 interface 0 "GenesysLogic USB2.0 Hub" rev
2.10/4.01 addr 2
xhci_pipe_init: pipe=0xffff800000c57000 addr=2 depth=1 port=1 speed=3 dev 1 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 1
xhci0: xhci_cmd_slot_control
xhci0: dev 2, input=0xffffff00687bd000 slot=0xffffff00687bd020
ep0=0xffffff00687bd040
xhci0: dev 2, setting DCBAA to 0x00000000687be000
xhci_pipe_init: pipe=0xffff800000c58000 addr=0 depth=2 port=2 speed=1 dev 2 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 2 addr 2
uhidev0 at uhub1 port 2 configuration 1 interface 0 "vendor 0x0b38 product
0x0010" rev 1.10/1.02 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
xhci_pipe_init: pipe=0xffff800000c5b000 addr=3 depth=2 port=2 speed=1 dev 2 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 2
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "vendor 0x0b38 product
0x0010" rev 1.10/1.02 addr 3
uhidev1: iclass 3/0, 2 report ids
uhid0 at uhidev1 reportid 1: input=2, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
xhci0: xhci_cmd_slot_control
xhci0: dev 3, input=0xffffff00687c1000 slot=0xffffff00687c1020
ep0=0xffffff00687c1040
xhci0: dev 3, setting DCBAA to 0x00000000687c2000
xhci_pipe_init: pipe=0xffff800000c5c000 addr=0 depth=2 port=3 speed=1 dev 3 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 3 addr 3
uhidev2 at uhub1 port 3 configuration 1 interface 0 "Logitech USB Trackball"
rev 1.10/14.00 addr 4
uhidev2: iclass 3/1
ums0 at uhidev2: 5 buttons
wsmouse1 at ums0 mux 0
xhci0: port=4 change=0x10
xhci0: xhci_cmd_slot_control
xhci0: dev 4, input=0xffffff00687c4000 slot=0xffffff00687c4020
ep0=0xffffff00687c4040
xhci0: dev 4, setting DCBAA to 0x00000000687c5000
xhci_pipe_init: pipe=0xffff800000c5e000 addr=0 depth=1 port=4 speed=3 dev 4 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 4 addr 4
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Chicony Electronics
Co.,Ltd. Chicony USB2.0 Camera" rev 2.00/10.19 addr 5
video0 at uvideo0
xhci0: port=5 change=0x20
xhci0: xhci_cmd_slot_control
xhci0: dev 5, input=0xffffff00687c7000 slot=0xffffff00687c7020
ep0=0xffffff00687c7040
xhci0: dev 5, setting DCBAA to 0x00000000687c8000
xhci_pipe_init: pipe=0xffff800000e24000 addr=0 depth=1 port=5 speed=2 dev 5 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 5 addr 5
ugen0 at uhub0 port 5 "Intel Bluetooth" rev 2.00/0.10 addr 6
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
softraid0: sd1 was not shutdown properly
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd1: 461318MB, 512 bytes/sector, 944780799 sectors
root on sd1a (462370a034f99fd5.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x230, fw ver 22.361476.0, address 00:21:6b:f3:e1:34
XHCI debug (you can see where I've unplugged and replugged in the phone):
1. Plugged in phone and fired up adb:
ugen1 at uhub0 port 7 "motorola XT1039" rev 2.00/2.28 addr 7
xhci0: short xfer 0xffffff047d8ad3c0 for 48
xhci0: short xfer 0xffffff047d8ad3c0 for 51
xhci_pipe_init: pipe=0xffff800001609000 addr=7 depth=1 port=7 speed=3 dev 8 dci
2 (epAddr=0x1)
xhci0: xhci_cmd_configure_ep dev 8
xhci_pipe_init: pipe=0xffff80000159e000 addr=7 depth=1 port=7 speed=3 dev 8 dci
2 (epAddr=0x1)
xhci0: xhci_cmd_configure_ep dev 8
xhci_pipe_init: pipe=0xffff800001545000 addr=7 depth=1 port=7 speed=3 dev 8 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 8
xhci_pipe_init: pipe=0xffff80000155d000 addr=7 depth=1 port=7 speed=3 dev 8 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 8
xhci_abort_xfer: xfer=0xffffff047d8ad5a0 status=IN_PROGRESS err=CANCELLED
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 8 dci 2
xhci_abort_xfer: xfer=0xffffff047d8ad3c0 status=IN_PROGRESS err=CANCELLED
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 8 dci 3
xhci0: wrong trb index (4294967040) max is 255
xhci0: xhci_cmd_set_tr_deq_async dev 8 dci 2
xhci0: NULL xfer pointer
xhci0: xhci_cmd_set_tr_deq_async dev 8 dci 3
xhci0: timeout aborting transfer
xhci_abort_xfer: xfer=0xffffff047d8ad3c0 status=IN_PROGRESS err=CANCELLED
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 8 dci 3
xhci0: event error code=19, result=33
trb=0xffff800031d6a378 (0x0000000068440060 0x13000000 0x8008400)
xhci0: error stopping endpoint
xhci0: xhci_cmd_configure_ep dev 8
xhci0: xhci_cmd_configure_ep dev 8
2. Unplugged phone:
xhci0: port=7 change=0x80
ugen1 detached
xhci0: xhci_cmd_configure_ep dev 8
xhci0: xhci_cmd_slot_control
3. Plugged phone back in:
xhci0: port=7 change=0x80
xhci0: port=7 change=0x80
xhci0: xhci_cmd_slot_control
xhci0: dev 9, input=0xffffff0070656000 slot=0xffffff0070656020
ep0=0xffffff0070656040
xhci0: dev 9, setting DCBAA to 0x0000000070657000
xhci_pipe_init: pipe=0xffff800001603000 addr=0 depth=1 port=7 speed=3 dev 9 dci
1 (epAddr=0x0)
xhci0: xhci_cmd_set_address BSR=1
xhci0: xhci_cmd_set_address BSR=0
xhci0: dev 9 addr 9
ugen1 at uhub0 port 7 "motorola XT1039" rev 2.00/2.28 addr 7
4. Trying to use adb again to connect (adb shell, adb devices -l, etc)
xhci0: short xfer 0xffffff047d8ad3c0 for 48
xhci0: short xfer 0xffffff047d8ad3c0 for 51
xhci_pipe_init: pipe=0xffff80000155d000 addr=7 depth=1 port=7 speed=3 dev 9 dci
2 (epAddr=0x1)
xhci0: xhci_cmd_configure_ep dev 9
xhci_pipe_init: pipe=0xffff80000160d000 addr=7 depth=1 port=7 speed=3 dev 9 dci
2 (epAddr=0x1)
xhci0: xhci_cmd_configure_ep dev 9
xhci_pipe_init: pipe=0xffff80000159e000 addr=7 depth=1 port=7 speed=3 dev 9 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 9
xhci_pipe_init: pipe=0xffff800001607000 addr=7 depth=1 port=7 speed=3 dev 9 dci
3 (epAddr=0x81)
xhci0: xhci_cmd_configure_ep dev 9
xhci0: port=7 change=0x80
xhci_abort_xfer: xfer=0xffffff047d8ad5a0 status=IN_PROGRESS err=CANCELLED
actlen=0 len=24 idx=0
xhci0: xhci_cmd_stop_ep dev 9 dci 2
xhci0: wrong trb index (4294967040) max is 255
xhci0: xhci_cmd_set_tr_deq_async dev 9 dci 2
usb_detach_wait: ugen1 didn't detach
xhci0: xhci_cmd_configure_ep dev 9
xhci0: xhci_cmd_configure_ep dev 9
ugen1 detached
xhci0: xhci_cmd_configure_ep dev 9
xhci0: xhci_cmd_slot_control
5. Run adb kill-server:
# adb kill-server
xhci_abort_xfer: xfer=0xffffff047d8ad3c0 status=IN_PROGRESS err=CANCELLED
actlen=0 len=24 idx=0
kernel: protection fault trap, code=0
Stopped at xhci_abort_xfer+0xb1: cmpb $0,0x471(%r14)
ddb{3}> bt
xhci_abort_xfer(7782b154fd1dc1df,4) at xhci_abort_xfer+0xb1
usbd_transfer(8287378bfc733553) at usbd_transfer+0x24d
ugen_do_read(652e49999b7f364f,ffff800031d6a010,ffff800001542000,ffffff047e7b28a0)
at ugen_do_read+0x347
ugenread(845741ee006e0938,ffff800031d6a010,ffff800031d69f10) at ugenread+0x47
spec_read(a4cba2f7feb0be4c) at spec_read+0xab
VOP_READ(8312fb516fec2110,b5781487e00e805,ffffff047e7b28a0,ffffff0400000000)
at VOP_READ+0x49
dofilereadv(a42bddd481041809,30,ffff800031c0fc50,3,ffff800031d6a140) at
dofilereadv+0xe0
sys_read(bde7f8b75cfaeb4a,b5781487e00e805,18) at sys_read+0x5c
Xsyscall(6,3,168fe1dcee50,3,1,1690a8ba5000) at Xsyscall+0x128
end of kernel
end trace frame: 0x169044988600, count: -11
Incidentally, is there an easier way of grabbing ddb output on a machine
without a serial port?
Right now I take a picture of the screen with the phone and type in the
backtraces by hand.
Thanks so much for looking into this and spending the time and the patches.
I think we're getting closer!
-Tom