Thursday, June 01, 2017

Re: USB3 devices not recognized partially/at all at boot when using USB3 with BIOS "USB Legacy" setting off. Bug or feature?

..I got the problem of USB3 devices not being recognized at boot, also
with "USB Legacy" enabled. Leading me to the question:

Did anyone else experience this?

Can I tweak anything in the OS/kernel to maximize the likelihood of USB3
device recognition success at boot?


This is also in a new constellation of devices, now two Realtek
RTL8153:s. For now as bandaid I'll plug one to USB2 and one to USB3.

Tinker

On 2017-06-02 00:06, Tinker wrote:
> Hi misc@,
>
> This is a weird issue. I resolved it for my usecase but just wanted to
> report it and also ask if it's a bug or feature and if there's any
> right or wrong way here.
>
> So I have one AXEN and one RTL8153(CDCE) gigabit USB NIC plugged in to
> a Xeon Asrock E3C226D2I motherboard.
>
> It's 6.0 MP generic + the RTL8153 support diff, booted via MBR.
>
>
> Until two days ago they were accidentally plugged into an USB 2 port,
> and also I had the "USB Legacy Mode" BIOS setting set to its default
> enabled setting ("USB Legacy mode: Auto" + "USB3 Legacy Mode: Enabled"
> more specifically).
>
> Up to that point, both the AXEN and the CDCE would be recognized every
> single time I booted (i.e. they would show up in the dmesg, and would
> produce interfaces).
>
> Then, two days ago, I disabled the "USB Legacy Mode" as part of
> debugging the AXEN NIC which has behaved very strangely to me - I
> disabled the USB legacy mode out of the idea that it could cause
> interference with OpenBSD's USB/AXEN subsystems, and also the
> motherboard manual suggests doing it in case of "USB compatibility
> issues", which I maybe experienced.
>
> The devices would still be recognized when I booted, still all fine in
> this respect.
>
>
> And then the same day I switched over to use the USB 3 ports, and I
> think initially the USB devices would come up as they should on boot,
> but then at least yesterday, on at least seven different boots -
> either just "halt -p" and then power on (meaning the USB devices were
> powered all the time), or hard power-off between -
>
> Either *none* of the USB devices would come up on boot, or *one* of
> them would but not the other one.
>
> When they did not come up on boot, just unplugging it and replugging
> it would make it come up (i.e. on unplug there was no detach message
> in the dmesg, but on replug there would be a message saying it had
> been plugged in).
>
>
> I did not give any effort to understand the case of when only one of
> them would come up, *which* one of the two would. Possibly it could be
> the AXEN messing up things big time but I don't think so, I could try
> with two RTL8153:s only instead also.
>
> I was thinking for a second that possibly the reason that only one of
> them would come up, could be power consumption problems, but, this is
> a server-grade computer with strong power supplies, and these USB3
> ports are directly on the motherboard, so they should have proper
> power supply.
>
>
> Switching back to USB2 made them come up on boot as they should. And,
> switching on "USB Legacy Mode" (to "enabled", and for the sake of it
> also its "USB3 Legacy Mode" subsetting, to "enabled") also made the
> USB3 devices come up on every boot.
>
> I'm not aware of any console tools to power on/off the USB
> bus/hubs/devices, so I couldn't reduce further from within OpenBSD.
>
> Trying to analyze the problem a bit, I find the dmesg + usbdevs output
> a bit funny - the dmesg says the USB3 devices are on 'port 16 addr 4'
> and 'port 17 addr 5', while usbdevs mentions the port number for the
> first device only and not for the second device.
>
> What the motherboard manual
> ftp://europe.asrock.com/Manual/E3C226D2I.pdf says about the USB legacy
> settings (page 47) is quoted below, it's not instructive at all to me.
>
>
> So by this email I just wanted to report this peculiar behavior, and
> also ask if you think it's a bug or a feature.
>
> I guess actually I'll keep the "USB Legacy" feature on from now and on
> as AFAIK it's needed for booting off USB block devices which is handy
> sometimes, however it was a really strange side-effect that disabling
> it would make USB3 devices in particular not detect on boot.
>
>
> If you have any comments on if this is a bug or a feature or if "USB
> Legacy" is generally advisable to be on or off, would be happy to
> learn to know.
>
> Thanks,
> Tinker
>
>
> Motherboard manual excerpt:
> "Legacy USB Support: [options are Enabled, Disabled, Auto, and UEFI
> Setup Only]
> Enable or disable Legacy OS Support for USB 2.0 devices. If you
> encounter USB compatibility issues it is recommended to disable legacy
> USB support. Select UEFI Setup Only to support USB devices under the
> UEFI setup and Windows/Linux operating systems only.
>
> Legacy USB 3.0 Support: [options are Enabled and Disabled]
> Enable or disable Legacy OS Support for USB 3.0 devices."
>
> dmesg excerpt:
> axen0 at uhub0 port 16 configuration 1 interface 0 "ASIX Elec. Corp.
> AX88179" rev 3.00/1.00 addr 4
> axen0: AX88179, address 00:11:6b:SNIP
> rgephy0 at axen0 phy 3: RTL8169S/8110S/8211 PHY, rev. 5
> cdce0 at uhub0 port 17 configuration 2 interface 0 "Linksys Linksys
> USB3GIGV1" rev 3.00/30.00 addr 5
> cdce0: address 14:91:82:SNIP
>
> usbdevs -v:
> Controller /dev/usb0:
> addr 1: super speed, self powered, config 1, xHCI root hub(0x0000),
> Intel(0x8086), rev 1.00
> port 1 addr 2: high speed, self powered, config 1, Virtual
> Hub(0xff01), American Megatrends Inc.(0x046b), rev 1.00, iSerialNumber
> serial
> port 1 powered
> port 2 powered
> port 3 powered
> port 4 addr 3: low speed, self powered, config 1, Virtual Keyboard
> and Mouse(0xff10), American Megatrends Inc.(0x046b), rev 1.00
> port 5 powered
> port 2 disabled
> port 3 disabled
> port 4 disabled
> port 5 disabled
> port 6 disabled
> port 7 disabled
> port 8 disabled
> port 9 disabled
> port 10 disabled
> port 11 disabled
> port 12 disabled
> port 13 disabled
> port 14 disabled
> port 15 disabled
> port 16 addr 4: super speed, power 124 mA, config 1, AX88179(0x1790),
> ASIX Elec. Corp.(0x0b95), rev 1.00, iSerialNumber 000011SNIP
> addr 5: super speed, power 64 mA, config 2, Linksys USB3GIGV1(0x0041),
> Linksys(0x13b1), rev 30.00, iSerialNumber 000001000000

No comments:

Post a Comment