Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 2021 11:38:05 +0200
From:      Ronald Klop <ronald-lists@klop.ws>
To:        freebsd-arm@freebsd.org
Subject:   Re: RPi 4B USB 3 support appears to still be broken in 13.0-RELEASE
Message-ID:  <187de31a-e96f-aa98-23a4-e0fb63de5671@klop.ws>
In-Reply-To: <YHoXAS%2B0/ptwL0IS@fuz.su>
References:  <YHoXAS%2B0/ptwL0IS@fuz.su>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/17/21 1:00 AM, Robert Clausecker wrote:
> Greetings!
> 
> Last time I experimented with ZFS on the RPi 4B, I noticed that
> there is a strange problem when attaching the zpool via USB 3 as
> opposed to USB 2.  When doing that, mounting root fails with
> IO errors like these:
> 
> (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 03 c1 b9 65 00 00 07 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:umass-sim0:0:0:0): READ(10). CDB: 28 00 03 c1 b9 65 00 00 07 00
> (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
> (da0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
> 
> Attaching the boot disk through USB 2 instead works.  Likewise,
> using USB 3 with a UFS root file system works (and in fact ran fine
> in a development system for months).  I do not understand this.
> 
> I had previously reported this issue as PR 249520:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249520
> 
> There's some stuff about UEFI booting in there which you can ignore.
> The same problem also appears when booting via U-Boot.
> 
> Now what surprises me is that this issue still occurs with
> FreeBSD 13.0-RELEASE.  So whatever fixes had been performed
> did not seem to address the underlying problem at all.
> 
> Is there any workaround or solution (except for ditching root
> on ZFS which would be rather painful for my use case?)
> 
> Yours,
> Robert Clausecker
> 


Weird that UFS works, but ZFS doesn't. This is really on the same disk? Just checking.
I can only add a datapoint that I'm running 13.0 on ZFS on USB3 on RPI4-8GB without problems.
Could it be a partitioning difference that you are crossing 4K-sector boundaries or something else that amplifies the traffic when using ZFS? Or bad sectors which are nog used with UFS?

Another possibility with your hardware: https://twitter.com/bsdimp/status/1383165361734832132?s=20
13.0 increased maxphys which is the size of the data transfers send to the disk. Can you try kern.maxphys=131072 in loader.conf?

[root@rpi4 ~]# usbconfig
ugen0.1: <0x1106 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x2109 USB2.0 Hub> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.3: <Western Digital Elements 25A2> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (224mA)   <---

Regards,
Ronald.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?187de31a-e96f-aa98-23a4-e0fb63de5671>