From nobody Sun Mar 31 19:03:53 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V73Td121lz5GCyp; Sun, 31 Mar 2024 19:04:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V73Td0TJnz4N0P; Sun, 31 Mar 2024 19:04:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711911845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6yxmJLwmoTc2g4XJpTu7/GwEy0N6nZgGrKXb5NZTUyA=; b=P0k3oJi4m/4y2101lDiMRT26NOtnb8Rz8VLtkL0/YSQEaRNwIy879hVvANhzxLZPZdy1Xr voJbTIcIJfIXfh4fIrgt9dNERU1re+TTVtJytS/JvFSMDrVZuyqdqQN5yX6aKjdpzyo+0w OLCOFYMMmChR3M20fTJWfO6WYOFjs3+DaioNRt0HvvHBj/lFXOyWoVxCp8Cj03rGsnq7v9 ghn46N0ptOHQ/j9jI3qk6SWni6k/z0E1qxyNPqJgo9lilaxYtYi2MGfvstd6kZUySCpHsF geXSmXuRzqUop+LRf/GFUZaVdWHOk+0sxnGCGyVBT1iBnhYmtPEYW9G+fE02fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711911845; a=rsa-sha256; cv=none; b=h+G/TfkGhBvwSXwhQPLBNCjfuqwX1HtnqK5h+XD7IElhVhvr06RyTEcsm+Q9YnncY9zR3P i9wKC81ch9zvVnhoBFkOrIjmSFtgfWlMAX/StPWSUgW8WwsjM7bEXypxBDZj0RpufvDCD0 ngcIBxmtGoUYBz+4l9aLNXWZ1L9lkNXGJfEuHs1O0nrmKK7TwyNTQPIiKjoHYrvNkHX42E 48OUqxBDU/+Eu65X/TsvnoVLLz2M2H+rPHGcwVidz6yAzydRqmYlHNEmajMvtpk9FayBRW AamMpQ23gUDabTwM79WTVuanNjNhnh/K+c5mX/lBzQUPoFbTxdlfnbPRDVtUCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711911845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6yxmJLwmoTc2g4XJpTu7/GwEy0N6nZgGrKXb5NZTUyA=; b=V27kQD3/Zc4MtZbgfuqSy/NiN5CspTImdSwcI762iCfHkSpZP1d717DdimCUMbM3aVD/9T 1Xk720ZjUwXSE4MVLk5AY0vyetK87jSnDn/57PXH1/8m5dNDh+9JZ9TrtjURvmDPKind3/ wRHG2RJojzkE+oCC84Lk7m2u4Pka9wxgmqUPP68SO4sBqTUdKKpgpKYSGjHA1qJekYBVwz XT/Fi+w1exu86CEq6u9GkncuH6GREwI5CGBzdejOpOFrNBy8Azfwk4HCMjNWu7xzu1SeVA OGlxCpzJDhelPqyAdcgMuGj/jMvNOILrOEQO00g8A+4Sa9AkFtFCl8p7FNQObQ== Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4V73Tc73XZzXl1; Sun, 31 Mar 2024 19:04:04 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-432d5b5f00bso6750011cf.0; Sun, 31 Mar 2024 12:04:04 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU4l7N4PjkFwR8QF/7/OYxqSl3zskIVTiWQ4AHe7AGj85Ce02LRa7v1Nqydp2LQk0ew2/0b/1d/iPCHwsF8eUMeCgelJS5fpS01n4w= X-Gm-Message-State: AOJu0Yz+jVKYuJD7cPscVEyNcIiQ9/n8JXOmSJaCaNx64ucYN3NB7W4e CNw55X+AJHWR7509k1Yi6rTbfwuMoFRtBwqzh2arWxNrsfqgpaxay5u8+N5pzOHx7lbs3YEseV3 lP7MyxS7/EDCAM0OK4IXpIL2ApZI= X-Google-Smtp-Source: AGHT+IH6Dekn+UzHFNkLtxFvYO4bW1Xtg+4IJnQZvoonQD+Sdwt7Q0fEmhT/4GZmpxOHi/gbSaIfii3gVzmyJOMDfU4= X-Received: by 2002:a05:622a:1490:b0:432:ccd8:1723 with SMTP id t16-20020a05622a149000b00432ccd81723mr8416514qtx.9.1711911844434; Sun, 31 Mar 2024 12:04:04 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Sun, 31 Mar 2024 20:03:53 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 15.0 on RPi4, USB broken: uhub_reattach_port: port 2 reset failed, error=USB_ERR_TIMEOUT To: freebsd-arm@freebsd.org, freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="0000000000005fe5480614f98990" --0000000000005fe5480614f98990 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable (...) initial_turbo https://www.raspberrypi.com/documentation/computers/config_txt.html#overclo= cking Nuno Teixeira escreveu (domingo, 31/03/2024 =C3=A0(s) 19:59): > Hello, > > If you got a fan in your rpi4 box, you could try to overclock it. > If not, there is a funcionality in config.txt to overclock it just for a > few seconds at boot time. > > I can't remember the funtion but I'm looking at: > https://www.raspberrypi.com/documentation/computers/config_txt.html > > Cheers, > > Lexi Winter escreveu (s=C3=A1bado, 30/03/2024 =C3=A0(s)= 19:45): > >> hello, >> >> i'm using 15.0 (f66a994d59) on an 4GB RPi4 with a USB<>SATA adapter for >> the root disk: >> >> usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device >> ASM1153USB3.0TOSATA ASM1153USB3.0TOSATA (0x174c:0x55aa) >> ugen0.3: at usbus0 >> umass0 on uhub1 >> umass0: > 2.10/1.00, addr 2> on usbus0 >> umass0: SCSI over Bulk-Only; quirks =3D 0x0100 >> umass0:1:0: Attached to scbus1 >> da0 at umass-sim0 bus 0 scbus1 target 0 lun 0 >> da0: Fixed Direct Access SPC-4 SCSI device >> da0: Serial Number 123456789019 >> da0: 40.000MB/s transfers >> da0: 228936MB (468862128 512 byte sectors) >> da0: quirks=3D0x2 >> >> when connected via USB 2, this works fine. when connected via USB 3.0, >> the device sometimes fails to attach on boot, causing mountroot to fail. >> i can reproduce this reliably with both GENERIC-NODEBUG and a custom >> modular kernel, and sometimes (but not every boot) with GENERIC. >> >> when the problem happens, with USB_DEBUG enabled, the kernel logs: >> >> uhub_reattach_port: port 2 reset failed, error=3DUSB_ERR_TIMEOUT >> uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port 2 >> >> however, if i boot with "boot -v", the device is reliably detected >> correctly. since -v shouldn't cause any functional changes, i suspect >> this may be some kind of timing issue. >> >> i've tried increasing some of the USB timings (hw.usb.timings.*) but >> this didn't seem to have any effect. is there anything else i could try >> that might affect this, or is this perhaps a known issue? >> >> thanks, lexi. >> > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000005fe5480614f98990 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Nuno Teixeira <eduardo@freebsd.org> escreveu (domingo, 31/03/2024 =C3= =A0(s) 19:59):
<= div dir=3D"ltr">
Hello,

If you got a fan in yo= ur rpi4 box, you could try to overclock it.
If not, there is = a funcionality in config.txt to overclock it just for a few seconds at boot= time.

I can't remember the funtion but I'm looki= ng at:
https://www.raspberrypi.com/documentation/= computers/config_txt.html

Cheers,

=
hello,

i'm using 15.0 (f66a994d59) on an 4GB RPi4 with a USB<>SATA adapt= er for
the root disk:

usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device ASM= 1153USB3.0TOSATA ASM1153USB3.0TOSATA (0x174c:0x55aa)
ugen0.3: <ASM1153USB3.0TOSATA ASM1153USB3.0TOSATA> at usbus0
umass0 on uhub1
umass0: <ASM1153USB3.0TOSATA ASM1153USB3.0TOSATA, class 0/0, rev 2.10/1.= 00, addr 2> on usbus0
umass0:=C2=A0 SCSI over Bulk-Only; quirks =3D 0x0100
umass0:1:0: Attached to scbus1
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <ASM1153U ASM1153USB3.0TOS 0> Fixed Direct Access SPC-4 SCSI dev= ice
da0: Serial Number 123456789019
da0: 40.000MB/s transfers
da0: 228936MB (468862128 512 byte sectors)
da0: quirks=3D0x2<NO_6_BYTE>

when connected via USB 2, this works fine.=C2=A0 when connected via USB 3.0= ,
the device sometimes fails to attach on boot, causing mountroot to fail. i can reproduce this reliably with both GENERIC-NODEBUG and a custom
modular kernel, and sometimes (but not every boot) with GENERIC.

when the problem happens, with USB_DEBUG enabled, the kernel logs:

uhub_reattach_port: port 2 reset failed, error=3DUSB_ERR_TIMEOUT
uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port 2

however, if i boot with "boot -v", the device is reliably detecte= d
correctly.=C2=A0 since -v shouldn't cause any functional changes, i sus= pect
this may be some kind of timing issue.

i've tried increasing some of the USB timings (hw.usb.timings.*) but this didn't seem to have any effect.=C2=A0 is there anything else i cou= ld try
that might affect this, or is this perhaps a known issue?

=C2=A0 =C2=A0 =C2=A0 =C2=A0 thanks, lexi.


--
Nuno Teixeira
FreeBSD Committ= er (ports)


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--0000000000005fe5480614f98990--