From nobody Sun Mar 31 18:59:51 2024 X-Original-To: freebsd-current@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 4V73Nz2pfZz5GC9F; Sun, 31 Mar 2024 19:00:03 +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 4V73Ny67rPz4L4T; Sun, 31 Mar 2024 19:00:02 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711911602; 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=WfenXLC3Ck0RRpfHpuomPDkkqtaTFUmsI2noN6ZpDSM=; b=i14zxMVnUWOI9pCcPvNTwo8GeKZNq7TdKFxh8GC7vO/ejNY42jBRCsRhFQ/74EAUt+HcIC QQJojQxdYvdkoWB6EpG5JI7ZFYaxEn/QhHV93OaC/9Z1hPOA5+zuo7Eg7bGCUr4ck/WO9J +LBxVGF8c4hAIJZXwjvJwPRkzOVL7nSitSmfV7IsiYX+CmJisaFWKXLgV5fPIyVBlvKqt6 vLXlSrOiQwpK3Sup1F1ZbIPjRx9dmtdYeWCaq4CVeg+fUGalsl2onQZxUfzzSiKDGhCodX iM0JxS1NB+4ih4/UHWFlH+ay1qMuUgXkRyAXopG9pHfCgCVE0Jw1jWWyfCWarw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711911602; a=rsa-sha256; cv=none; b=QA/0SviDs/bCTJH0QHak14/8FSldBBIrk8bwAeK7Zz5O4oHOJh4ttYQdd78RCrsfcRJKXD KKzRbEKoJhIy4YIsSOkCoeU6vNqwQIWJ3XpeLs2IPeK1PZq8Z36Hu6rN6mOaipzjlY5ge3 3yTGm1BDOJ/j0FGy6fBqMJtSOlN4AF67qkQORxke9wdd2HF8LMbbMXWvNuyZxjIxScehtm 3N51ZkXgainqDksn2ZmWusR5FqTfjXNTe53SrhoRvZEzH5HSTZhcd56wdeb9e9lL/gzTBR w3J6Q0jlRFdOWpP6VP6jxDCua4aBfmJezNkAvOSJIALc8mJGVwsz4Vzj45uf2w== 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=1711911602; 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=WfenXLC3Ck0RRpfHpuomPDkkqtaTFUmsI2noN6ZpDSM=; b=pdzNzKi6HLxPeJcVbvRhU12k+Kqu738g14lxzdnK1VCkkdqx+PNZmO4yps0536aeHSJ/XR HZDJg++dghukCN3FwLyGADJvJJrXgVzJaDJ4Z0ka8XGkJCaxIDwXqTyMS4o0PRCN2lJdo0 RS7yAX4htHohYUwEITSlXjDySddnPH7FqTgO+l3XDXjq2RkhssQfVkmyNVEzah7Uk427b4 G3X7xa4GyXtB7bfquSIkrlx6f1mam1B3JpA6snNbkIfQDw6vKhtB4bwwUCN4GWZzHGFOkr Hb8Y84th91BWmCkIoPNILWGFi5vbiGyskKsY8DJCZGSoc24HvLc31uTW54S8OA== Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 4V73Ny5dNJzY8h; Sun, 31 Mar 2024 19:00:02 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-430ca04b09bso24348881cf.1; Sun, 31 Mar 2024 12:00:02 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVzH4LN+vGzHU5sqwgsRZRbtuIZqDh0tmEG/cEkSV6MR566sHm5uM6/fHRLlGe/4xCON3pDEYE/btNLPECy5M9KTQaDdRGxWFokso0= X-Gm-Message-State: AOJu0YyFTFX7OvbWxM/fCtRPwn3xsoMUXl8+czJoQplFFQjtA/D9TfT7 JJh7JVx3uDRU6ug7iC34QaVyVmwG1GUo9VH9h9FbC0iSaiO+hIpC116L7uJZ7dVcgBFtCLQhO1X z7red8X1Je3cJMtcPqcPUxFAvK1M= X-Google-Smtp-Source: AGHT+IEGtjv1rUx62zpzKErNeaFnIw2Yf9P2MfW0zkK1IkgT0L5sZcGytrQastKaUyl7lAFTK4ijlxVT7tgz6GlUYCc= X-Received: by 2002:a05:622a:24c:b0:431:33ec:be08 with SMTP id c12-20020a05622a024c00b0043133ecbe08mr10905187qtx.15.1711911602011; Sun, 31 Mar 2024 12:00:02 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Sun, 31 Mar 2024 19:59:51 +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="000000000000ecd0160614f97a11" --000000000000ecd0160614f97a11 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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) 1= 9: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. > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000ecd0160614f97a11 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

If you got a fan in y= our 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 boo= t time.

I can't remember the funtion but I'm look= ing at:
https://www.raspberrypi.com/documentation/computers/config_= txt.html

Cheers,

Lexi Winter <lexi@le-fay.org> escreveu (s=C3=A1bado, 30/0= 3/2024 =C3=A0(s) 19:45):
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)
--000000000000ecd0160614f97a11--