Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2018 09:27:24 +0200
From:      Stefan Bethke <stb@lassitu.de>
To:        freebsd-usb@freebsd.org
Subject:   USB problems on PC Engines APU2C4
Message-ID:  <CF83933C-DECF-4B93-A4F3-3B4C5271F6BB@lassitu.de>

next in thread | raw e-mail | index | archive | help
I=E2=80=99m having trouble using USB2 devices on the two USB3 ports on =
the back of the APU2C4. I=E2=80=99m on 11.2-RELEASE.

The APU2 also has two USB2 ports, but they=E2=80=99re only on a pin =
header, and I=E2=80=99m waiting for a cable to try them to see if there =
is a difference.

First, I had trouble installing from:
ugen0.2: <Kingston DataTraveler G3> at usbus0
umass0 on uhub1
umass0: <Kingston DataTraveler G3, class 0/0, rev 2.00/1.00, addr 1> on =
usbus0
umass0:  SCSI over Bulk-Only; quirks =3D 0x8100
umass0:2:0: Attached to scbus2

This is all that gets probed on most attempts to connect the stick. =
Sometimes, it succeeds immediately, or after a couple of retries, like =
this:
ugen0.2: <Kingston DataTraveler G3> at usbus0
umass0 on uhub1
umass0: <Kingston DataTraveler G3, class 0/0, rev 2.00/1.00, addr 1> on =
usbus0
umass0:  SCSI over Bulk-Only; quirks =3D 0x8100
umass0:2:0: Attached to scbus2
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00=20
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an =
error
(probe0:umass-sim0:0:0:0): Retrying command
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <Kingston DataTraveler G3 PMAP> Removable Direct Access SCSI device
da0: Serial Number 001CC0EC34F4BB6155F10168
da0: 40.000MB/s transfers
da0: 15252MB (31236096 512 byte sectors)
da0: quirks=3D0x2<NO_6_BYTE>

On other machines, that stick works just fine.

The other device I=E2=80=99m having trouble with is a Huawei E3272 LTE =
stick. In it=E2=80=99s default mode, it shows up as a umass device; =
using usb_modeswitch, it can be configured as a serial modem or an CDC =
ethernet device.
[root@apu2 ~]# lsusb
Bus /dev/usb Device /dev/ugen0.2: ID 12d1:1f01 Huawei Technologies Co., =
Ltd. E353/E3131 (Mass storage mode)
Bus /dev/usb Device /dev/ugen1.2: ID 0438:7900 Advanced Micro Devices, =
Inc.=20
Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000 =20
Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000 =20

It appears that communication issues stop usb_modeswitch from switching =
to the desired mode:

[root@apu2 ~]# /usr/local/sbin/usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P =
1001 -M 55534243000000000000000000000011060000000000000000000000000000
Look for target devices ...
 No devices in target mode or class found
Look for default devices ...
 Found devices in default mode (1)
Access device 002 on bus 000
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 8
Use endpoints 0x01 (out) and 0x81 (in)
Looking for active drivers ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 Sending the message returned error -7. Try to continue
Read the response to message 1 (CSW) ...
 Response reading failed (error -7)
 Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!

At the same time, the console shows a lot of errors and then:
(cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 ff ff 00 00 01 00=20
(cd0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd0:umass-sim0:0:0:0): SCSI status: Check Condition
(cd0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered =
read err)
(cd0:umass-sim0:0:0:0): Info: 0xffff
(cd0:umass-sim0:0:0:0): Error 5, Unretryable error
(cd0:umass-sim0:0:0:0): cddone: got error 0x5 back
umass0: at uhub1, port 3, addr 1 (disconnected)
cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0
cd0: <HUAWEI Mass Storage 2.31> detached
(cd0:umass-sim0:0:0:0): Periph destroyed
umass0: detached

Here=E2=80=99s the PCI devices the APU has:
[root@apu2 ~]# pciconf -lv
hostb0@pci0:0:0:0:	class=3D0x060000 card=3D0x15661022 =
chip=3D0x15661022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb1@pci0:0:2:0:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x156b1022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
pcib1@pci0:0:2:2:	class=3D0x060400 card=3D0x12341022 =
chip=3D0x14391022 rev=3D0x00 hdr=3D0x01
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'Family 16h Processor Functions 5:1'
    class      =3D bridge
    subclass   =3D PCI-PCI
pcib2@pci0:0:2:3:	class=3D0x060400 card=3D0x12341022 =
chip=3D0x14391022 rev=3D0x00 hdr=3D0x01
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'Family 16h Processor Functions 5:1'
    class      =3D bridge
    subclass   =3D PCI-PCI
pcib3@pci0:0:2:4:	class=3D0x060400 card=3D0x12341022 =
chip=3D0x14391022 rev=3D0x00 hdr=3D0x01
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'Family 16h Processor Functions 5:1'
    class      =3D bridge
    subclass   =3D PCI-PCI
none0@pci0:0:8:0:	class=3D0x108000 card=3D0x15371022 =
chip=3D0x15371022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D encrypt/decrypt
xhci0@pci0:0:16:0:	class=3D0x0c0330 card=3D0x14101022 =
chip=3D0x78141022 rev=3D0x11 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH USB XHCI Controller'
    class      =3D serial bus
    subclass   =3D USB
ahci0@pci0:0:17:0:	class=3D0x010601 card=3D0x00000000 =
chip=3D0x78001022 rev=3D0x39 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH SATA Controller [IDE mode]'
    class      =3D mass storage
    subclass   =3D SATA
ehci0@pci0:0:19:0:	class=3D0x0c0320 card=3D0x78081022 =
chip=3D0x78081022 rev=3D0x39 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH USB EHCI Controller'
    class      =3D serial bus
    subclass   =3D USB
none1@pci0:0:20:0:	class=3D0x0c0500 card=3D0x780b1022 =
chip=3D0x780b1022 rev=3D0x42 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH SMBus Controller'
    class      =3D serial bus
    subclass   =3D SMBus
isab0@pci0:0:20:3:	class=3D0x060100 card=3D0x780e1022 =
chip=3D0x780e1022 rev=3D0x11 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH LPC Bridge'
    class      =3D bridge
    subclass   =3D PCI-ISA
sdhci_pci0@pci0:0:20:7:	class=3D0x080501 card=3D0x78061022 =
chip=3D0x78131022 rev=3D0x01 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    device     =3D 'FCH SD Flash Controller'
    class      =3D base peripheral
    subclass   =3D SD host controller
hostb2@pci0:0:24:0:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15801022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb3@pci0:0:24:1:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15811022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb4@pci0:0:24:2:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15821022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb5@pci0:0:24:3:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15831022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb6@pci0:0:24:4:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15841022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
hostb7@pci0:0:24:5:	class=3D0x060000 card=3D0x00000000 =
chip=3D0x15851022 rev=3D0x00 hdr=3D0x00
    vendor     =3D 'Advanced Micro Devices, Inc. [AMD]'
    class      =3D bridge
    subclass   =3D HOST-PCI
igb0@pci0:1:0:0:	class=3D0x020000 card=3D0x00008086 =
chip=3D0x157b8086 rev=3D0x03 hdr=3D0x00
    vendor     =3D 'Intel Corporation'
    device     =3D 'I210 Gigabit Network Connection'
    class      =3D network
    subclass   =3D ethernet
igb1@pci0:2:0:0:	class=3D0x020000 card=3D0x00008086 =
chip=3D0x157b8086 rev=3D0x03 hdr=3D0x00
    vendor     =3D 'Intel Corporation'
    device     =3D 'I210 Gigabit Network Connection'
    class      =3D network
    subclass   =3D ethernet
igb2@pci0:3:0:0:	class=3D0x020000 card=3D0x00008086 =
chip=3D0x157b8086 rev=3D0x03 hdr=3D0x00
    vendor     =3D 'Intel Corporation'
    device     =3D 'I210 Gigabit Network Connection'
    class      =3D network
    subclass   =3D ethernet

Here=E2=80=99s the dmesg:
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights =
reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018
    root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on =
LLVM 6.0.0)
VT(vga): resolution 640x480
CPU: AMD GX-412TC SOC                                (998.15-MHz =
K8-class CPU)
  Origin=3D"AuthenticAMD"  Id=3D0x730f01  Family=3D0x16  Model=3D0x30  =
Stepping=3D1
  =
Features=3D0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE=
,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  =
Features2=3D0x3ed8220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,P=
OPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
  AMD Features=3D0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD =
Features2=3D0x1d4037ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSV=
W,IBS,SKINIT,WDT,Topology,PNXC,DBE,PTSC,PL2I>
  Structured Extended Features=3D0x8<BMI1>
  XSAVE Features=3D0x1<XSAVEOPT>
  SVM: NP,NRIP,AFlush,DAssist,NAsids=3D8
  TSC: P-state invariant, performance statistics
real memory  =3D 5083496448 (4848 MB)
avail memory =3D 4072296448 (3883 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <CORE   COREBOOT>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
ioapic1: Changing APIC ID to 5
ioapic0 <Version 2.1> irqs 0-23 on motherboard
ioapic1 <Version 2.1> irqs 24-55 on motherboard
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
Timecounter "TSC" frequency 998148477 Hz quality 1000
random: entropy device external interface
kbd0 at kbdmux0
netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0xffffffff80ff4550, 0) error 19
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <CORE COREBOOT> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x818-0x81b on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 25 at device 2.2 on pci0
pcib1: failed to allocate initial I/O port window: 0x1000-0x1fff
pci1: <ACPI PCI bus> on pcib1
igb0: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> mem =
0xf7a00000-0xf7a1ffff,0xf7a20000-0xf7a23fff irq 28 at device 0.0 on pci1
igb0: Using MSIX interrupts with 5 vectors
igb0: Ethernet address: 00:0d:b9:4b:e2:cc
igb0: Bound queue 0 to cpu 0
igb0: Bound queue 1 to cpu 1
igb0: Bound queue 2 to cpu 2
igb0: Bound queue 3 to cpu 3
igb0: netmap queues/slots: TX 4/1024, RX 4/1024
pcib2: <ACPI PCI-PCI bridge> irq 26 at device 2.3 on pci0
pci2: <ACPI PCI bus> on pcib2
igb1: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port =
0x2000-0x201f mem 0xf7b00000-0xf7b1ffff,0xf7b20000-0xf7b23fff irq 32 at =
device 0.0 on pci2
igb1: Using MSIX interrupts with 5 vectors
igb1: Ethernet address: 00:0d:b9:4b:e2:cd
igb1: Bound queue 0 to cpu 0
igb1: Bound queue 1 to cpu 1
igb1: Bound queue 2 to cpu 2
igb1: Bound queue 3 to cpu 3
igb1: netmap queues/slots: TX 4/1024, RX 4/1024
pcib3: <ACPI PCI-PCI bridge> at device 2.4 on pci0
pci3: <ACPI PCI bus> on pcib3
igb2: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port =
0x3000-0x301f mem 0xf7c00000-0xf7c1ffff,0xf7c20000-0xf7c23fff at device =
0.0 on pci3
igb2: Using MSIX interrupts with 5 vectors
igb2: Ethernet address: 00:0d:b9:4b:e2:ce
igb2: Bound queue 0 to cpu 0
igb2: Bound queue 1 to cpu 1
igb2: Bound queue 2 to cpu 2
igb2: Bound queue 3 to cpu 3
igb2: netmap queues/slots: TX 4/1024, RX 4/1024
pci0: <encrypt/decrypt> at device 8.0 (no driver attached)
xhci0: <AMD FCH USB 3.0 controller> mem 0xf7f22000-0xf7f23fff irq 18 at =
device 16.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Unable to map MSI-X table=20
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
ahci0: <AMD Hudson-2 AHCI SATA controller> port =
0x4010-0x4017,0x4020-0x4023,0x4018-0x401f,0x4024-0x4027,0x4000-0x400f =
mem 0xf7f25000-0xf7f253ff at device 17.0 on pci0
ahci0: AHCI v1.30 with 2 6Gbps ports, Port Multiplier supported with FBS
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ehci0: <AMD FCH USB 2.0 controller> mem 0xf7f26000-0xf7f260ff irq 18 at =
device 19.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
sdhci_pci0: <Generic SD HCI> mem 0xf7f27000-0xf7f270ff at device 20.7 on =
pci0
sdhci_pci0: 1 slot(s) allocated
orm0: <ISA Option ROM> at iomem 0xee800-0xeffff on isa0
ppc0: cannot reserve I/O port range
uart0: <16550 or compatible> at port 0x3f8 irq 4 flags 0x10 on isa0
uart0: console (115200,n,8,1)
uart1: <16550 or compatible> at port 0x2f8 irq 3 on isa0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is =
present;
            to enable, add "vfs.zfs.prefetch_disable=3D0" to =
/boot/loader.conf.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
ugen1.1: <AMD EHCI root HUB> at usbus1
ugen0.1: <0x1022 XHCI root HUB> at usbus0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
uhub0: ada0: <SATA SSD SBFM01.1> ACS-4 ATA SATA 3.x device
ada0: Serial Number A4620782148900312898
ada0: 600.000MB/s transfers<AMD EHCI root HUB, class 9/0, rev 2.00/1.00, =
addr 1> on usbus1
 (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 15272MB (31277232 512 byte sectors)
Trying to mount root from zfs:zroot/ROOT/default []...
uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on =
usbus0
Root mount waiting for: usbus1 usbus0
uhub1: 4 ports with 4 removable, self powered
Root mount waiting for: usbus1 usbus0
uhub0: 2 ports with 2 removable, self powered
ugen0.2: <HUAWEI Technology HUAWEI Mobile> at usbus0
ugen1.2: <vendor 0x0438 product 0x7900> at usbus1
uhub2 on uhub0
uhub2: <vendor 0x0438 product 0x7900, class 9/0, rev 2.00/0.18, addr 2> =
on usbus1
Root mount waiting for: usbus1
uhub2: 4 ports with 4 removable, self powered
random: unblocking device.



Stefan

--=20
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CF83933C-DECF-4B93-A4F3-3B4C5271F6BB>