[bug] uboot 2022.07 hangs on rpi 2 with attached usb storage

Jan Palus jpalus at fastmail.com
Sat Jul 23 16:19:13 CEST 2022


On 22.07.2022 02:59, Simon Glass wrote:
> Hi Jan,
> 
> On Mon, 18 Jul 2022 at 11:48, Jan Palus <jpalus at fastmail.com> wrote:
> >
> > u-boot 2022.07 boots fine without any USB devices attached to
> > RaspberryPi 2 however it hangs early on if external USB drive is
> > connected, right after:
> >
> >    Request Sense returned 02 04 01
> >
> > git bisect indicates first commit to cause regression is:
> >
> >   8c9812a5d557c4eacf164147d7380b3af1b222ec is the first bad commit
> >   commit 8c9812a5d557c4eacf164147d7380b3af1b222ec
> >   Author: AKASHI Takahiro <takahiro.akashi at linaro.org>
> >   Date:   Tue Mar 8 20:36:40 2022 +0900
> >
> >       usb: storage: call device_probe() after scanning
> >
> >       Every time a usb bus/port is scanned and a new device is detected,
> >       we want to call device_probe() as it will give us a chance to run
> >       additional post-processings for some purposes.
> >
> >       In particular, support for creating partitions on a device will be added.
> >
> >       Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> >       Reviewed-by: Simon Glass <sjg at chromium.org>
> >
> > Reverting this commit fixes the issue.
> >
> > Note that USB drive is TOSHIBA MQ04UBD200 and it's not used for booting.
> > Also note that without this change 0 storage devices are detected even
> > when drive is attached.
> 
> I am not sure what is going on here. Can you provide the full console
> trace of the boot? Any idea where it is hanging?

It hangs very early on during USB start, log from USB initialization
with debug enabled:

  starting USB...
  Bus usb at 7e980000: OF: translating address: 0000987e
  OF: parent translation for: 0000003f
  OF: one level translation: 0000983f
  0
     - 0 'gpio at 7e200000'
     - found
  dwc2_usb usb at 7e980000: set_state_simple op missing
  dwc2_usb usb at 7e980000: Can't get reset: -524
  dwc2_usb usb at 7e980000: Core Release: 2.80a
  USB DWC2
  Sending event 4/(unknown) to spy 'efi_disk add'
  scanning bus usb at 7e980000 for devices... bind node usb1 at 1
     - attempt to match compatible string 'usb424,9514'
  No match for node 'usb1 at 1'
  0
     - 0 'gpio at 7e200000'
     - found
  usb_hub usb_hub: set_state_simple op missing
  bind node usbether at 1
     - attempt to match compatible string 'usb424,ec00'
  No match for node 'usbether at 1'
  0
     - 0 'gpio at 7e200000'
     - found
  usb_hub usb_hub: set_state_simple op missing
  Sending event 4/(unknown) to spy 'efi_disk add'
     - seq=0
  0
     - 0 'gpio at 7e200000'
     - found
  smsc95xx_eth smsc95xx_eth: set_state_simple op missing
  Sending event 4/(unknown) to spy 'efi_disk add'
  Device NOT ready
     Request Sense returned 02 04 01

Now the place where it hangs is:

  part_efi.c:

  static int part_test_efi(struct blk_desc *dev_desc)
  {
          ALLOC_CACHE_ALIGN_BUFFER_PAD(legacy_mbr, legacymbr, 1, dev_desc->blksz);

where dev_desc->blksz is 3782209548.




More information about the U-Boot mailing list