Regression in usb-storage in u-boot 2015.04 ???
Hi,
First of all I'm not sure this is a regression, but I'm afraid I do not have time to dig deeper so I thought I should report it anyways and then others can try to reproduce it.
I'm seeing the following happen when using a usb stick with a musb-new otg controller in host mode on an allwinner tablet:
sunxi# usb reset
resetting USB...
USB0: scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... error in inquiry
0 Storage Device(s) found
The interesting thing is that, the first "usb start" works fine, this only happens on the second usb start (triggered through a usb reset).
This may be specific to using musb on sunxi, or to the flashdrive I have but I thought I should report this anyways. Esp. since usb otherwise works fine after a usb reset, other devices (usb keyboards) continue to work, and the descriptors of the usb drive do get read correctly:
sunxi# usb info
1: Mass Storage, USB Revision 2.0
- USB Flash Disk 4C0E960F
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x058f Product 0x6387 Version 1.3
Configuration: 1
- Interfaces: 1 Bus Powered 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512
Perhaps someone can test the reproducer on another board with usb:
1) plug in a usb drive
2) do "usb start"
3) should print that 1 storage device is found
4) do "usb reset"
5) should still print that 1 storage device is found, but for me gives the error I mentioned above.
Regards,
Hans
Hi Hans,
Quoted 46 lines · Hans de Goede
Hi,
First of all I'm not sure this is a regression, but I'm afraid I do not have time to dig deeper so I thought I should report it anyways and then others can try to reproduce it.
I'm seeing the following happen when using a usb stick with a musb-new otg controller in host mode on an allwinner tablet:
sunxi# usb reset
resetting USB...
USB0: scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... error in inquiry
0 Storage Device(s) foundThe interesting thing is that, the first "usb start" works fine, this only happens on the second usb start (triggered through a usb reset).
This may be specific to using musb on sunxi, or to the flashdrive I have but I thought I should report this anyways. Esp. since usb otherwise works fine after a usb reset, other devices (usb keyboards) continue to work, and the descriptors of the usb drive do get read correctly:
sunxi# usb info
1: Mass Storage, USB Revision 2.0
- USB Flash Disk 4C0E960F
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor:0x058fProduct0x6387Version 1.3
Configuration: 1
- Interfaces: 1 Bus Powered 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512Perhaps someone can test the reproducer on another board with usb:
Quoted 6 lines
1) plug in a usb drive
2) do "usb start"
3) should print that 1 storage device is found
4) do "usb reset"
5) should still print that 1 storage device is found, but for me gives the error I mentioned above.
I tested it OK with EHCI on Atmel sama5d4ek board. The following information for your reference.
--->8---
U-Boot SPL 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49)
U-Boot 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49)
CPU: SAMA5D44 Crystal frequency: 12 MHz CPU clock : 528 MHz Master clock : 176 MHz DRAM: 512 MiB NAND: 512 MiB MMC: mci: 0 In: serial Out: serial Err: serial Net: gmac0, usb_ether Error: usb_ether address not set.
Hit any key to stop autoboot: 0
U-Boot> usb start
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot>
---8<---
Quoted 3 lines
Regards,
Hans
Best Regards,
Bo Shen
Hi,
Quoted 76 lines · Bo Shen
Hi Hans,
Quoted 46 lines · Hans de Goede
Hi,
First of all I'm not sure this is a regression, but I'm afraid I do not have time to dig deeper so I thought I should report it anyways and then others can try to reproduce it.
I'm seeing the following happen when using a usb stick with a musb-new otg controller in host mode on an allwinner tablet:
sunxi# usb reset
resetting USB...
USB0: scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... error in inquiry
0 Storage Device(s) foundThe interesting thing is that, the first "usb start" works fine, this only happens on the second usb start (triggered through a usb reset).
This may be specific to using musb on sunxi, or to the flashdrive I have but I thought I should report this anyways. Esp. since usb otherwise works fine after a usb reset, other devices (usb keyboards) continue to work, and the descriptors of the usb drive do get read correctly:
sunxi# usb info
1: Mass Storage, USB Revision 2.0
- USB Flash Disk 4C0E960F
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor:0x058fProduct0x6387Version 1.3
Configuration: 1
- Interfaces: 1 Bus Powered 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512Perhaps someone can test the reproducer on another board with usb:
Quoted 6 lines
1) plug in a usb drive
2) do "usb start"
3) should print that 1 storage device is found
4) do "usb reset"
5) should still print that 1 storage device is found, but for me gives the error I mentioned above.I tested it OK with EHCI on Atmel sama5d4ek board. The following information for your reference. --->8---
U-Boot SPL 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49)U-Boot 2015.04-rc4-00067-gf643d92 (Mar 27 2015 - 14:31:49)
CPU: SAMA5D44 Crystal frequency: 12 MHz CPU clock : 528 MHz Master clock : 176 MHz DRAM: 512 MiB NAND: 512 MiB MMC: mci: 0 In: serial Out: serial Err: serial Net: gmac0, usb_ether Error: usb_ether address not set.
Quoted 13 lines
Hit any key to stop autoboot: 0
U-Boot> usb start
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
U-Boot>
---8<---
Ok, thanks for testing then@least this is not something which hits all boards, likely is some musb in host mode issue, which we probably have had for a long time now but I just noticed.
Regards,
Hans
Quoted 2 lines · Hans de Goede
Perhaps someone can test the reproducer on another board with usb:
on an A20-OLinuXino-lime2
U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
sunxi# usb start
sunxi# usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
tried with a few different usb sticks and couldn't reproduce it.
Rgds,
Iain
Hi,
Quoted 45 lines · Iain Paton
Quoted 2 lines · Hans de Goede
Perhaps someone can test the reproducer on another board with usb:
on an A20-OLinuXino-lime2
U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11)
DRAM: 1024 MiBCPU: 912000000Hz, AXI/AHB/APB: 3/2/2U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
sunxi# usb start
sunxi# usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 3 lines
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Regards,
Hans
Quoted 1 line · Hans de Goede
Hi,
Hi!
[...]
Quoted 9 lines
Quoted 6 lines
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Are there any updates on this musb issue please ?
Best regards,
Marek Vasut
Hi,
Quoted 10 lines · Marek Vasut
Quoted 1 line · Hans de Goede
Hi,
Hi!
[...]
Quoted 3 lines
Quoted 3 lines
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Are there any updates on this musb issue please ?
No, since most people who are doing usb booting are using boards with a "proper" ehci usb controller I've not investigated this further.
Also this only happens after a usb reset, the first time the storage device works fine, iow this is a corner case. I agree it would be nice to fix it, but -ENOTIME.
Regards,
Hans
Quoted 1 line · Hans de Goede
Hi,
Hi again!
Quoted 18 lines · Marek Vasut
Quoted 17 lines · Hans de Goede
Quoted 1 line
Hi,
Hi!
[...]
Quoted 9 lines
Quoted 6 lines
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Quoted 8 lines
Quoted 1 line
Are there any updates on this musb issue please ?
No, since most people who are doing usb booting are using boards with a "proper" ehci usb controller I've not investigated this further.
Also this only happens after a usb reset, the first time the storage device works fine, iow this is a corner case. I agree it would be nice to fix it, but
-ENOTIME.
CCing also Tom, since he has an MUSB device. Let's not forget about this bug. Are there any news please ?
Best regards,
Marek Vasut
Hi,
Quoted 28 lines · Marek Vasut
Quoted 1 line · Hans de Goede
Hi,
Hi again!
Quoted 23 lines · Marek Vasut
Quoted 12 lines · Hans de Goede
Quoted 1 line
Hi,
Hi!
[...]
Quoted 5 lines
Quoted 5 lines
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Are there any updates on this musb issue please ?
No, since most people who are doing usb booting are using boards with a "proper" ehci usb controller I've not investigated this further.
Quoted 6 lines
Quoted 3 lines
Also this only happens after a usb reset, the first time the storage device works fine, iow this is a corner case. I agree it would be nice to fix it, but
-ENOTIME.CCing also Tom, since he has an MUSB device. Let's not forget about this bug. Are there any news please ?
So I've finally been able to make some time to retest this, and as hoped the recent(ish) fixes to the sunxi-musb glue for fixing the gadget code not working when changing gadget type, also fix this.
TLDR: This was a sunxi specific issue and it is fixed now.
Regards,
Hans
Quoted 1 line · Hans de Goede
Hi,
Hi!
Quoted 34 lines · Marek Vasut
Quoted 33 lines · Hans de Goede
Quoted 1 line
Hi,
Hi again!
Quoted 27 lines · Marek Vasut
Quoted 13 lines · Hans de Goede
Quoted 1 line
Hi,
Hi!
[...]
Quoted 6 lines
Quoted 6 lines
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
tried with a few different usb sticks and couldn't reproduce it.
Thanks that confirms that it is a musb issue, and likely one which has been around for ages.
Are there any updates on this musb issue please ?
No, since most people who are doing usb booting are using boards with a "proper" ehci usb controller I've not investigated this further.
Also this only happens after a usb reset, the first time the storage device works fine, iow this is a corner case. I agree it would be nice to fix it, but
-ENOTIME.
Quoted 8 lines
Quoted 2 lines
CCing also Tom, since he has an MUSB device. Let's not forget about this bug. Are there any news please ?
So I've finally been able to make some time to retest this, and as hoped the recent(ish) fixes to the sunxi-musb glue for fixing the gadget code not working when changing gadget type, also fix this.
TLDR: This was a sunxi specific issue and it is fixed now.
Thank you very much for looking into this!
I'm really happy I can tick this one off :)
Best regards,
Marek Vasut
Hi Iain,
Quoted 45 lines · Iain Paton
Quoted 2 lines · Hans de Goede
Perhaps someone can test the reproducer on another board with usb:
on an A20-OLinuXino-lime2
U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11)
DRAM: 1024 MiBCPU: 912000000Hz, AXI/AHB/APB: 3/2/2U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
sunxi# usb start
sunxi# usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 1 line
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
I see this also, both with and without driver model. It seems like a bit of a worry. I can repeat this on the first use of USB from boot, around 20% of the time.
Regards,
Simon
Quoted 48 lines · Simon Glass
Hi Iain,
Quoted 45 lines · Iain Paton
Quoted 3 lines · Hans de Goede
Perhaps someone can test the reproducer on another board
with usb:
on an A20-OLinuXino-lime2
U-Boot SPL 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11)
DRAM: 1024 MiBCPU: 912000000Hz, AXI/AHB/APB: 3/2/2U-Boot 2015.04-rc4-00073-g07d8f86 (Mar 27 2015 - 08:05:11) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) foundscanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot: 0
sunxi# usb start
sunxi# usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80 2 USB Device(s) found
Quoted 7 lines
Quoted 3 lines
scanning usb for storage devices... 1 Storage Device(s) found
that EHCI timeout appears to be random, it pops up maybe 20% of the time.
I see this also, both with and without driver model. It seems like a bit of a worry. I can repeat this on the first use of USB from boot, around 20% of the time.
Just a random guess -- Try enabling cache debugging, maybe it's some alignment problem somewhere?
Best regards,
Marek Vasut