{"id":2922,"date":"2021-05-11T16:32:04","date_gmt":"2021-05-11T23:32:04","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=2922"},"modified":"2021-05-11T16:32:04","modified_gmt":"2021-05-11T23:32:04","slug":"arm64-pi-4-usb-problems-and-a-messy-fix","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2922","title":{"rendered":"ARM64 &#8211; Pi 4 USB Problems &#8211; And a Messy Fix.."},"content":{"rendered":"<p>After some delay, I finally had a &#8216;good&#8217; cooling solution for my 8GB Pi4, and resumed testing..<\/p>\n<p>The last Kernel version I had running on it was 5.9-rc4, and everything seemed to be working OK (including 8GB of memory recognised).<\/p>\n<p>I then updated to 5.11.18, and found that none of the USB ports worked:<\/p>\n<p><strong><span style=\"font-family: Courier New, Courier, monospace;\"># dmesg |grep usb<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 0.061522] usbcore: registered new interface driver usbfs<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 0.061571] usbcore: registered new interface driver hub<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 0.061619] usbcore: registered new device driver usb<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 0.061770] usb_phy_generic phy: supply vcc not found, using dummy regulator<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 2.405204] usbcore: registered new interface driver usb-storage<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 2.444718] usbcore: registered new interface driver usbhid<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 2.449078] usbhid: USB HID core driver<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 2.967797] usb 1-1: new high-speed USB device number 2 using xhci_hcd<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 3.103999] usb 1-1: device descriptor read\/64, error -71<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 3.343985] usb 1-1: device descriptor read\/64, error -71<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 3.587805] usb 1-1: new high-speed USB device number 3 using xhci_hcd<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 3.719992] usb 1-1: device descriptor read\/64, error -71<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 3.959983] usb 1-1: device descriptor read\/64, error -71<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 4.071910] usb usb1-port1: attempt power cycle<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 4.727810] usb 1-1: new high-speed USB device number 4 using xhci_hcd<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 5.763798] usb 1-1: device not accepting address 4, error -22<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 5.899777] usb 1-1: new high-speed USB device number 5 using xhci_hcd<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 6.335782] usb 1-1: device not accepting address 5, error -22<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[ 6.340571] usb usb1-port1: unable to enumerate USB device<\/span><\/strong><\/p>\n<p>More research showed that the USB\/PCI issues had &#8211; supposedly &#8211; been fixed in 2020, and I then carried out a test booting from the official Fedora 34 kernel &#8211; <strong>5.11.17-300.fc34.aarch64<\/strong> &#8211; and this detected the USB ports correctly, but (as usual) failed to find the rootfs..\u00a0\u00a0\u00a0 I then extracted the Fedora\/RedHat kernel patchset (<strong><span style=\"font-family: Courier New, Courier, monospace;\">patch-5.11-redhat.patch<\/span><\/strong>) from the source rpm <strong>kernel-5.11.17-300.fc34.src.rpm<\/strong> and applied this to the <em>kernel.org<\/em> 5.11.18, and this detected USB correctly again..<\/p>\n<p>Further tests produced the following good\/bad results:<\/p>\n<p><strong><span style=\"font-family: Courier New, Courier, monospace;\">5.9.0 &#8211;\u00a0 USB good<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.9.16 &#8211; USB good<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.10.34 &#8211; USB bad<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.11.18 &#8211; USB bad<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.11.17 Fedora34 &#8211; USB good (<em>but fails to find rootfs..<\/em>)<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.11.18 + Fedora\/RedHat patchset &#8211; USB good.<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.12.1 &#8211; USB bad<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.12.1 + RedHat (koji dev) patch &#8211; USB bad..<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">5.13-rc1 &#8211; USB bad.<\/span><\/strong><\/p>\n<p>The VIA USB connection on the Pi4 is via PCIe, and this may (again?) be the source of the problem:<\/p>\n<p>Good system:<br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\"># lsusb<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\"># lspci <\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 10) <\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">01:00.0 USB controller: VIA Technologies, Inc. VL805\/806 xHCI USB 3.0 Controller (rev 01)<\/span><\/strong><\/p>\n<p>Bad system:<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>$ lsusb <\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub <\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<\/strong><\/span><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">$ lspci <\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 10) <\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">01:00.0 USB controller: VIA Technologies, Inc. VL805\/806 xHCI USB 3.0 Controller (rev 01)<\/span><\/strong><\/p>\n<p>In summary, it would appear that USB on an 8GB Pi4 was OK with kernel 5.9.x, but broken after 5.10.x, and there is a &#8216;messy&#8217; fix for 5.11.18 by applying the Fedora 5.11.17 patchset.\u00a0\u00a0\u00a0 More testing needed, including &#8211; possibly &#8211; repeating them with a <em>4GB<\/em> Pi4?<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 May 11th 2021.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After some delay, I finally had a &#8216;good&#8217; cooling solution for my 8GB Pi4, and resumed testing.. The last Kernel version I had running on it was 5.9-rc4, and everything seemed to be working OK (including 8GB of memory recognised). I then updated to 5.11.18, and found that none of the USB ports worked: # dmesg |grep <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2922\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1132,6,10,1238,11,14,16,19,1533,1535,2254],"tags":[2392,2390,2393,2394,2391,2256,2388,2389,418],"class_list":["post-2922","post","type-post","status-publish","format-standard","hentry","category-aarch64","category-crash-and-burn","category-fedora","category-fix","category-hacks","category-kernel","category-linux-arm","category-opinion","category-patches","category-quirks","category-raspberry-pi-4","tag-5-10-34-fails","tag-5-11-18-with-rh-patchset","tag-5-12-fails","tag-5-13-rc-fails","tag-5-9-16-works","tag-8gb","tag-pi4","tag-usb-fails","tag-workaround"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2922"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2922\/revisions"}],"predecessor-version":[{"id":2924,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2922\/revisions\/2924"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}