From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D95BDC6FA8E for ; Thu, 2 Mar 2023 09:14:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7267085C1A; Thu, 2 Mar 2023 10:14:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jannau.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D571785C1A; Thu, 2 Mar 2023 10:14:16 +0100 (CET) Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 35D6785C1A for ; Thu, 2 Mar 2023 10:14:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jannau.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=janne@jannau.net Received: by soltyk.jannau.net (Postfix, from userid 1000) id D776D26F839; Thu, 2 Mar 2023 10:14:13 +0100 (CET) Date: Thu, 2 Mar 2023 10:14:13 +0100 From: Janne Grunau To: Marek Vasut Cc: Simon Glass , bluetail , Bin Meng , Mark Kettenis , Tom Rini , u-boot@lists.denx.de Subject: Re: u-boot crashes if mass-storage devices are connected via USB-C Message-ID: <20230302091413.GD24656@jannau.net> References: <322414817369964463b2ffd89ff1989f@posteo.net> <79b7c4da-eae4-2e9c-585e-ae10f5bb0489@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79b7c4da-eae4-2e9c-585e-ae10f5bb0489@denx.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 2023-03-01 23:51:14 +0100, Marek Vasut wrote: > On 3/1/23 21:34, Simon Glass wrote: > > +Marek Vasut +Bin Meng +Mark Kettenis +Tom Rini > > > > On Wed, 1 Mar 2023 at 08:12, bluetail wrote: > > > > > > Hello. user kettenis aka "Mark Kettenis" guided me write my bug report > > > to this email. "bluetail: please report these usb bugs upstream; they're > > > almost certainly not hardware-specific" > > > > > > But before, jannau aka Janne Grunau asked me to give the version output > > > of `pacman -Qi uboot-asahi` to which I replied 2022.10.asahi1-1. > > > Because I had the feeling that sometimes the reboot with a USB-C > > > connected device succeeds, depending how many bays are populated. But I > > > have no evidence for that. > > > I did try other USB Type C Cables, but without success of fixing the > > > underlying issue. The device works fine via USB Type A or C fine if > > > plugged in AFTER u-boot. > > > But, u-boot does not support USB Type A yet, which is why it wont break > > > my boot sequence with USB Type A. > > > > > > Essentially, I connect a mass-storage device to the USB-C port of a Mac > > > Mini 2020 (M1), and it leads to the issue in the attachment. > > > I was able to reproduce it with Icy Box IB-3810 and ICY BOX IB-3805. > > > Initially I thought this issue was only for some devices (also attached > > > here) https://github.com/AsahiLinux/u-boot/issues/4 but it appears this > > > might be a issue that is with many devices. > > > > > > If you need any more information, please feel free to ask. I am very > > > eager to have this issue fixed because it seems to be a very broad issue > > > with mass media storage in general. > > > uname-r returns 6.1.0-asahi-2-2-edge-ARCH > Would it be possible to check whether current u-boot/master works any better Reproduced with b0eda49bc9b0 ("Merge tag 'u-boot-at91-fixes-2023.04-a' of https://source.denx.de/u-boot/custodians/u-boot-at91") and Icy Box IB-3804-C31 (same design as IB-3805/IB-3810 but just a single 4 port USB3 hub + 4 independent asmedia usb3 to sata converters). | scanning bus usb@b02280000 for devices... Device NOT ready | Request Sense returned 02 3A 00 | Device NOT ready | Request Sense returned 02 3A 00 | Resetting EP 0... | WARN halted endpoint, queueing URB anyway. | Unexpected XHCI event TRB, skipping... (c9208350 0000010f 13000000 04008401) | "Synchronous Abort" handler, esr 0x96000005 | elr: 000000000003934c lr : 000000000003934c (reloc) | elr: 0000010fcd24034c lr : 0000010fcd24034c | x0 : 0000000000000000 x1 : 00000000000003e8 | x2 : 0000000000000040 x3 : 000000000000003f | x4 : 0000010fc92065c0 x5 : 0000010fc9208210 | x6 : 0000000000001800 x7 : 00000000300c0300 | x8 : 0000000000000424 x9 : 0000000000000004 | x10: 00000000ffffffe8 x11: 0000000000000010 | x12: 0000000000010000 x13: 0000000000000001 | x14: 0000010fc91c6720 x15: 0000000000000021 | x16: 0000010fcd23a414 x17: 0000000000000040 | x18: 0000010fc91e7d70 x19: 0000010fc92065c0 | x20: 0000010fc9443630 x21: 0000000000000002 | x22: 0000010fc94406f0 x23: 0000000000000080 | x24: 0000000000000000 x25: 0000010fc91c6100 | x26: 0000010fc91c6100 x27: 0000010fc94406f0 | x28: 0000000000000000 x29: 0000010fc91c5db0 | | Code: 97ffff3c 52800401 aa1303e0 97ffffa2 (b9400c00) Resetting CPU ... The usb2sata bridges can powered off individually. u-boot crashes with just a single bridge with HDD powered on. Works if all bridges are off or don't have a HDD connected. The bridge reports under linux as Bus 005 Device 003: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge best regards Janne