AsahiLinux / u-boot

"Das U-Boot" Source Tree
156 stars 24 forks source link

boot failure when usb disk is connected #4

Open MichaelKofler opened 2 years ago

MichaelKofler commented 2 years ago

Not sure, if m1n1 is the right place to report this ...

I installed Asahi Linux with the installer on a Mac Mini M1 on the internal SSD. Basically works fine with the known limitations.

However, if my external USB disk is connected (which I use for time machine backups when macOS is running), the boot process fails (see photo)

asahi-boot-failure

Any ideas? I would prefer to leave the usb disk connected, as it is useful when running macOS.

kettenis commented 2 years ago

That seems to be a long-standing bug in the U-Boot xhci driver. Not much I can do about it without hardware that reproduces the problem. I'll see what happens if I plug in some random USB devices.

Ideally the request would time out and booting would continue. That doesn't happen?

pluveto commented 1 year ago

exactly same issue.

jannau commented 1 year ago

Please report with which USB mass storage devices this happens. It does not happen with all mass storage devices.

zDEFz commented 1 year ago

Could reproduce. Having a https://www.amazon.de/-/en/dp/B08BTTNVDG? ICY BOX 3.5" Hard Drive Enclosure Single Switchable Strapless USB 3.1 Gen2 (USB-C, USB-A) Fan Aluminum Black unit, plugging it in to a USB C port and U-Boot would halt and tells me something about an unknown XHCI error. Thinking this can be reproduced with cheaper units, of the same series, too. Happens ONLY on the USB type C Ports. I have tested with the mac mini m1. The one with 1GB ethernet. I'll look into whats reported specifically. Sec.

Looked into it via usbview. Report Starting at USB 3.1 Hub. This is collected during it being connected to USB type A. It works on USB type C too, but with C I cant reboot. image

IB-3805-C31
Manufacturer: ICY BOX
Serial Number: redacted
Speed: 5Gb/s (super)
Bus:   2
Address:   3
USB Version:  3.10
Device Class: 00
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 9
Number of Configurations: 1
Vendor Id: 174c
Product Id: 55aa
Revision Number: 01.00

Config Number: 1
    Number of Interfaces: 1
    Attributes: c0
    MaxPower Needed: 0mA

    Interface Number: 0
        Name: uas
        Alternate Number: 1
        Class: 08
        Sub Class: 06
        Protocol: 62
        Number of Endpoints: 4

            Endpoint Address: 02
            Direction: out
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 04
            Direction: out
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 81
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 83
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

USB3.1 Hub             
Manufacturer: VIA Labs, Inc.         
Serial Number: redacted
Speed: 5Gb/s (super)
Bus:   2
Address:   4
Number of Ports: 4
USB Version:  3.20
Device Class: 09
Device Subclass: 00
Device Protocol: 03
Maximum Default Endpoint Size: 9
Number of Configurations: 1
Vendor Id: 2109
Product Id: 0822
Revision Number: 90.13

Config Number: 1
    Number of Interfaces: 1
    Attributes: e0
    MaxPower Needed: 0mA

    Interface Number: 0
        Name: hub
        Alternate Number: 0
        Class: 09
        Sub Class: 00
        Protocol: 00
        Number of Endpoints: 1

            Endpoint Address: 81
            Direction: in
            Attribute: 19
            Type: Interrupt
            Max Packet Size: 2
            Interval: 16ms

IB-3805-C31
Manufacturer: ICY BOX
Serial Number: redacted
Speed: 5Gb/s (super)
Bus:   2
Address:   5
USB Version:  3.10
Device Class: 00
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 9
Number of Configurations: 1
Vendor Id: 174c
Product Id: 55aa
Revision Number: 01.00

Config Number: 1
    Number of Interfaces: 1
    Attributes: c0
    MaxPower Needed: 0mA

    Interface Number: 0
        Name: uas
        Alternate Number: 1
        Class: 08
        Sub Class: 06
        Protocol: 62
        Number of Endpoints: 4

            Endpoint Address: 02
            Direction: out
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 04
            Direction: out
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 81
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 83
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms
zDEFz commented 1 year ago

Not present on ICY BOX IB-3810-C31. Not through USB A or USB C. Log of usbview: http://ix.io/4poY Edit: It is present, it only appears using the the USB C port. My 2.5gbps LAN adapter connected to the USB C Port doesnt make this issues.

zDEFz commented 1 year ago

Reproduction + screenshot added.

image

https://user-images.githubusercontent.com/24463722/222144446-02d85a5e-c961-44e3-aa97-a544ee622c36.mp4

mikebeaton commented 8 months ago

I have what appears to be the same or very closely related issue, when the TESmart 4 port KVM switch is plugged into my M1 Air via a USB hub. The switch works and provides kb and mouse to macOS, Apple boot picker, and even Asahi Fedora once started. (The hub, also with a video camera attached and inbuilt ethernet port, has no effect on Asahi boot as long as the KVM switch is not plugged in.)

20240109_073307

zDEFz commented 8 months ago

I have what appears to be the same or very closely related issue, when the TESmart 4 port KVM switch is plugged into my M1 Air via a USB hub. The switch works and provides kb and mouse to macOS, Apple boot picker, and even Asahi Fedora once started. (The hub, also with a video camera attached and inbuilt ethernet port, has no effect on Asahi boot as long as the KVM switch is not plugged in.)

20240109_073307

The issue is reported upstream. To register: https://lists.denx.de/listinfo/u-boot

Have a look here: https://lists.denx.de/pipermail/u-boot/2023-March/511216.html