Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 01 Oct 2022 18:08:05 UTC
On 2022-Oct-1, at 09:33, bob prohaska <fbsd@www.zefox.net> wrote:

> On Sat, Oct 01, 2022 at 09:12:23AM -0700, Mark Millard wrote:
>> On 2022-Oct-1, at 08:22, bob prohaska <fbsd@www.zefox.net> wrote:
>> 
>>> On Fri, Sep 30, 2022 at 05:51:03PM -0700, Mark Millard wrote:
>>>> 
>>>> By the way, it looks like having the line:
>>>> 
>>>> CONFIG_CMD_LOG=y
>>>> 
>>>> in files/rpi_arm64_fragment would try to build the
>>>> log command into U-Boot.
>>>> 
>>> 
>>> Done and working. Now to learn how to use it.
>> 
>> Good.
>> 
>> Have you tried the updated patch-common_usb.c that
>> has the 3 mdelay(...) adjustments? Does it lead to
>> avoiding the problem? Any change in observed
>> behavior?
>> 
>> 
> Not yet.
> 
> However, with logging enabled (but still not understood)
> there are more mountroot failures. Here's a list of tries,
> where
> S means I issued shutdown -r 
> P means I had to powercycle
> R means I issued a reset to u-boot
> L means the Pi got stuck in a loop
> U means usb reset was issued
> M means the Pi stopped at mountroot (self-reset)
> B means I issued a boot at the loader prompt
> 
> The sequence was:
> PRSSSSBSSSSULPMSSM
> 
> I've placed the log script at
> http://nemesis.zefox.com/~fbsd/ with mountroot in the filename.
> 
> I'll try your patch next.
> 


A failure leading to mount root failure:

usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
Root mount waiting for: usbus1
usbd_req_re_enumerate: addr=5, set address failed! (USB_ERR_IOERROR, ignored)
Root mount waiting for: usbus1
usbd_setup_device_desc: getting device descriptor at addr 5 failed, USB_ERR_IOERROR
Root mount waiting for: usbus1
ugen1.5: <JMicron USB Mass Storage> at usbus1
umass0 on uhub2
umass0: <JMicron USB Mass Storage, class 0/0, rev 2.10/2.14, addr 5> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:0:0: Attached to scbus0
uhub_reattach_port: device problem (USB_ERR_STALLED), disabling port 3
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
ugen1.6: <FTDI FT232R USB UART> at usbus1
ugen1.5: <JMicron USB Mass Storage> at usbus1 (disconnected)
umass0: at uhub2, port 4, addr 5 (disconnected)
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
. . .
da0: <SABRENT  0214> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number DD564198838F9


Another failure leading to such:

usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
usbd_req_re_enumerate: addr=5, set address failed! (USB_ERR_IOERROR, ignored)
Root mount waiting for: usbus1
Root mount waiting for: usbus1
usbd_setup_device_desc: getting device descriptor at addr 5 failed, USB_ERR_IOERROR
ugen1.5: <JMicron USB Mass Storage> at usbus1
umass0 on uhub2
umass0: <JMicron USB Mass Storage, class 0/0, rev 2.10/2.14, addr 5> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:0:0: Attached to scbus0
Root mount waiting for: usbus1 CAM
ugen1.6: <FTDI FT232R USB UART> at usbus1
ugen1.5: <JMicron USB Mass Storage> at usbus1 (disconnected)
umass0: at uhub2, port 4, addr 5 (disconnected)
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
umass0: detached

Yet another failure leading to such:

usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device JMicron USB Mass Storage (0x152d:0x0577)
usbd_req_re_enumerate: addr=5, set address failed! (USB_ERR_IOERROR, ignored)
Root mount waiting for: usbus1
Root mount waiting for: usbus1
usbd_setup_device_desc: getting device descriptor at addr 5 failed, USB_ERR_IOERROR
Root mount waiting for: usbus1
ugen1.5: <JMicron USB Mass Storage> at usbus1
umass0 on uhub2
umass0: <JMicron USB Mass Storage, class 0/0, rev 2.10/2.14, addr 5> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:0:0: Attached to scbus0
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <SABRENT  0214> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number DD564198838F9
da0: 40.000MB/s transfers
da0: 953869MB (1953525168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
ugen1.6: <FTDI FT232R USB UART> at usbus1
ugen1.5: <JMicron USB Mass Storage> at usbus1 (disconnected)
umass0: at uhub2, port 4, addr 5 (disconnected)
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 74 70 6d af 00 00 01 00 
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <SABRENT  0214>  s/n DD564198838F9 detached
g_dev_taste: g_dev_taste(da0) failed to g_attach, error=6
(da0:umass-sim0:0:0:0): Periph destroyed
umass0: detached


All 3 got:

usbd_req_re_enumerate: addr=5, set address failed! (USB_ERR_IOERROR, ignored)

as the first failure of the sequence.

This establishes that U-Boot is not the only thing to
have problems with your equipment.

I'll note that the:

da0: <SABRENT  0214> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number DD564198838F9

does not match other log files:

da0: <SABRENT  1214> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 000000000000A

but it may well be an example of garbage-in/garbage-out.

The same goes for the usual:

umass0:  SCSI over Bulk-Only; quirks = 0x8100

vs. the 3 odd examples:

umass0:  SCSI over Bulk-Only; quirks = 0xc105
umass0:  SCSI over Bulk-Only; quirks = 0xc105
umass0:  SCSI over Bulk-Only; quirks = 0x8101



You also got another "0 Storage Device(s) found". It again has
the sequence for portstatus:

311, 311, (sequence of 5 instanced of:) 301

for:

Manufacturer 
Product      U-Boot Root Hub
SerialNumber 
bind node usb1@1

So, just like the others.

===
Mark Millard
marklmi at yahoo.com