On 17/02/19(Sun) 15:07, Martin Pieuchot wrote:
> On 15/02/19(Fri) 01:47, James Hastings wrote:
> > I settled on a patch providing an additional 250ms powerdelay in
uhub(4).
> > mue(4) reliably attaches now, but hotplugging devices in the left two
> > ports is still an issue.
>
> Interesting. Could you build a kernel with UHUB_DEBUG enable and
> compare the status of the ports? I'm wondering if your increased delay
> will change the value returned by usbd_get_port_status() line 376.
Before:
uhub2: port 1 status=0x0100 change=0x0000
With delay:
uhub2: port 1 status=0x0101 change=0x0001
uhub2: port 1 status=0x0503 change=0x0000
mue0 at uhub2 port 1 configuration 1 interface 0 "Standard Microsystems
LAN7800" rev 2.10/3.00 addr 4
mue0: LAN7800, address
ukphy0 at mue0 phy 1: Generic IEEE 802.3u media interface, rev. 2: OUI
0x0001f0, model 0x0013
> Why did you decide to increase the delay? Did you find some doc or
> code saying this is necessary?
No code or docs, just thought the device might be slow to wake up
and need extra delay to be attached on initial bus exploration.
OpenBSD 6.4-current (GENERIC.MP) #0: Sun Jan 27 14:46:33 EST 2019
[email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem = 963276800 (918MB)
avail mem = 904945664 (863MB)
mainbus0 at root: Raspberry Pi 3 Model B Plus Rev 1.3
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.7
efi0: Das U-Boot rev 0x20180900
simplefb0 at mainbus0: 656x416, 32bpp
wsdisplay0 at simplefb0 mux 1
wsdisplay0: screen 0-5 added (std, vt100 emulation)
simplebus0 at mainbus0: "soc"
"dma" at simplebus0 not configured
bcmintc0 at simplebus0
bcmdog0 at simplebus0
"cprman" at simplebus0 not configured
bcmrng0 at simplebus0
"mailbox" at simplebus0 not configured
"gpio" at simplebus0 not configured
pluart0 at simplebus0
"mmc" at simplebus0 not configured
"dsi" at simplebus0 not configured
bcmtemp0 at simplebus0
bcmaux0 at simplebus0
com0 at simplebus0: ns16550, no working fifo
com0: console
dwctwo0 at simplebus0
"local_intc" at simplebus0 not configured
"mmc" at simplebus0 not configured
"gpiomem" at simplebus0 not configured
"firmware" at simplebus0 not configured
"power" at simplebus0 not configured
"fb" at simplebus0 not configured
"vchiq" at simplebus0 not configured
"vcsm" at simplebus0 not configured
"arm-pmu" at simplebus0 not configured
"expgpio" at simplebus0 not configured
simplebus1 at mainbus0: "clocks"
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
agtimer0 at mainbus0: tick rate 19200 KHz
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 16-way L2 cache
usb0 at dwctwo0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev
2.00/1.00 addr 1
uhub0: 1 port with 1 removable, self powered
uhub0: port 1 status=0x0101 change=0x0001
uhub0: intr status=0
uhub0: port 1 status=0x0503 change=0x0000
uhub1 at uhub0 port 1 configuration 1 interface 0 "Standard Microsystems
product 0x2514" rev 2.00/b.b3 addr 2
uhub1: 4 ports with 3 removable, self powered, multiple transaction
translators
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: port 1 status=0x0101 change=0x0001
uhub1: intr status=0
uhub1: port 1 status=0x0503 change=0x0000
uhub2 at uhub1 port 1 configuration 1 interface 0 "Standard Microsystems
product 0x2514" rev 2.00/b.b3 addr 3
uhub2: 3 ports with 2 removable, self powered, multiple transaction
translators
uhub2: port 1 status=0x0100 change=0x0000
uhub2: port 2 status=0x0100 change=0x0000
uhub2: port 3 status=0x0101 change=0x0001
uhub2: port 3 status=0x0503 change=0x0000
umass0 at uhub2 port 3 configuration 1 interface 0 "FUJIFILM Mass
Storage Device" rev 2.00/11.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <FUJIFILM, 16GB, 1100> SCSI2 0/direct
removable serial
sd0: 15468MB, 512 bytes/sector, 31678464 sectors
uhub1: port 2 status=0x0100 change=0x0000
uhub1: port 3 status=0x0100 change=0x0000
uhub1: port 4 status=0x0100 change=0x0000
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (6d2b33ebe74c79d3.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
OpenBSD 6.4-current (GENERIC.MP) #0: Sun Jan 27 14:05:54 EST 2019
[email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem = 963276800 (918MB)
avail mem = 904941568 (863MB)
mainbus0 at root: Raspberry Pi 3 Model B Plus Rev 1.3
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.7
efi0: Das U-Boot rev 0x20180900
simplefb0 at mainbus0: 656x416, 32bpp
wsdisplay0 at simplefb0 mux 1
wsdisplay0: screen 0-5 added (std, vt100 emulation)
simplebus0 at mainbus0: "soc"
"dma" at simplebus0 not configured
bcmintc0 at simplebus0
bcmdog0 at simplebus0
"cprman" at simplebus0 not configured
bcmrng0 at simplebus0
"mailbox" at simplebus0 not configured
"gpio" at simplebus0 not configured
pluart0 at simplebus0
"mmc" at simplebus0 not configured
"dsi" at simplebus0 not configured
bcmtemp0 at simplebus0
bcmaux0 at simplebus0
com0 at simplebus0: ns16550, no working fifo
com0: console
dwctwo0 at simplebus0
"local_intc" at simplebus0 not configured
"mmc" at simplebus0 not configured
"gpiomem" at simplebus0 not configured
"firmware" at simplebus0 not configured
"power" at simplebus0 not configured
"fb" at simplebus0 not configured
"vchiq" at simplebus0 not configured
"vcsm" at simplebus0 not configured
"arm-pmu" at simplebus0 not configured
"expgpio" at simplebus0 not configured
simplebus1 at mainbus0: "clocks"
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
agtimer0 at mainbus0: tick rate 19200 KHz
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 16-way L2 cache
usb0 at dwctwo0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev
2.00/1.00 addr 1
uhub0: 1 port with 1 removable, self powered
uhub0: port 1 status=0x0101 change=0x0001
uhub0: intr status=0
uhub0: port 1 status=0x0503 change=0x0000
uhub1 at uhub0 port 1 configuration 1 interface 0 "Standard Microsystems
product 0x2514" rev 2.00/b.b3 addr 2
uhub1: 4 ports with 3 removable, self powered, multiple transaction
translators
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: intr status=0
uhub1: port 1 status=0x0101 change=0x0001
uhub1: intr status=0
uhub1: port 1 status=0x0503 change=0x0000
uhub2 at uhub1 port 1 configuration 1 interface 0 "Standard Microsystems
product 0x2514" rev 2.00/b.b3 addr 3
uhub2: 3 ports with 2 removable, self powered, multiple transaction
translators
uhub2: port 1 status=0x0101 change=0x0001
uhub2: port 1 status=0x0503 change=0x0000
mue0 at uhub2 port 1 configuration 1 interface 0 "Standard Microsystems
LAN7800" rev 2.10/3.00 addr 4
mue0: LAN7800, address
ukphy0 at mue0 phy 1: Generic IEEE 802.3u media interface, rev. 2: OUI
0x0001f0, model 0x0013
uhub2: port 2 status=0x0100 change=0x0000
uhub2: port 3 status=0x0101 change=0x0001
uhub2: port 3 status=0x0503 change=0x0000
umass0 at uhub2 port 3 configuration 1 interface 0 "FUJIFILM Mass
Storage Device" rev 2.00/11.00 addr 5
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <FUJIFILM, 16GB, 1100> SCSI2 0/direct
removable serial
sd0: 15468MB, 512 bytes/sector, 31678464 sectors
uhub1: port 2 status=0x0100 change=0x0000
uhub1: port 3 status=0x0100 change=0x0000
uhub1: port 4 status=0x0100 change=0x0000
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (6d2b33ebe74c79d3.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!