From nobody Sun Mar 13 15:25:39 2022
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 552C919B31AD
	for <freebsd-arm@mlmmj.nyi.freebsd.org>; Sun, 13 Mar 2022 15:26:01 +0000 (UTC)
	(envelope-from archimedes.gaviola@gmail.com)
Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635])
	(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))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4KGk5h2V43z3NkN
	for <freebsd-arm@freebsd.org>; Sun, 13 Mar 2022 15:26:00 +0000 (UTC)
	(envelope-from archimedes.gaviola@gmail.com)
Received: by mail-ej1-x635.google.com with SMTP id qt6so28890774ejb.11
        for <freebsd-arm@freebsd.org>; Sun, 13 Mar 2022 08:26:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :cc;
        bh=Pq8tWDrT1Q9cAGxNtTWYTF2ZjWH0VSmcP5kabpLWPnY=;
        b=MOf40aopxcuh8YxGPd/5Vm+vo+/xWBNpg6VNV9xzvoNj9osuX/NKWSdWqsFziY+Uhp
         BY2pQwwk9apZyL1jcB7g+T5IuymRJGy1cdG42vzkvIPlejH2baDASVLhpBdOmo5DahzU
         IOnn3OvuPsO24elkQN0niNFCPPTkoyFbdcJ+k04PeLDFrf45nbfidR0MxMkjFoc22U8C
         YaGhALjLwCe/2D+8XTS5djdwOkVFp84qqHsIPrJjvnXY5o64dR1A+MaNPhvl+VdFle6s
         DEFlSrnou0qR005oHB1Nq+HGU2F2EjM+qM2Ql0Ngxx25a9+ztP06lQg2KH+qJ37yiQkN
         ymbA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:cc;
        bh=Pq8tWDrT1Q9cAGxNtTWYTF2ZjWH0VSmcP5kabpLWPnY=;
        b=k94C1+E4TgHKomEZ+1FxRNlr3KvPqeg4gx0Tw7v1HFx3MWoBIubjroXxBlRRtwKK1s
         sWkU6yoStohIS+V7YCStsLlRVZCjUnCeKufHmpE/TWx28/RRC5uMNAxfmitrSdT1ghfj
         gFbI4P7D4ATlL2rSJisuiXDYYyAiDwN1+XRhByNtPcvTLgSjsBJfOjYKg6kK7dbXfSo0
         /fglcoN7vXHZT4AygoV8Wd+n1GHnAs4e0zdh5xeM9ch9VtuI/lIsYfE17Gzu5+/lWBX4
         LcsS6EEPLNKCbErQJOhBD91ZegY3vaQzvVfs2DJ0Koy+ElBDoqc9TrGxnZzTkDTg2iXP
         oZSw==
X-Gm-Message-State: AOAM530Sc5dkKQe/PMp0zGJbNb6Vqa7stAkS+mjcUEDEhIsnzYvdIoPB
	9zaNU5rLmk7PN0dm8EWTHa1ji2/eFoO/ODZWvUCbK979qYs=
X-Google-Smtp-Source: ABdhPJzl3qqAZ/EeeprdteByxOJAuFF04ZoTf+cIKr4EYGIKITqiG2J4y14GGtlJeCJAOmZEyATrM2lyzKNtwpl4To0=
X-Received: by 2002:a17:907:d90:b0:6db:a372:e61c with SMTP id
 go16-20020a1709070d9000b006dba372e61cmr9900644ejc.276.1647185153250; Sun, 13
 Mar 2022 08:25:53 -0700 (PDT)
List-Id: Porting FreeBSD to ARM processors <freebsd-arm.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-arm
List-Help: <mailto:freebsd-arm+help@freebsd.org>
List-Post: <mailto:freebsd-arm@freebsd.org>
List-Subscribe: <mailto:freebsd-arm+subscribe@freebsd.org>
List-Unsubscribe: <mailto:freebsd-arm+unsubscribe@freebsd.org>
Sender: owner-freebsd-arm@freebsd.org
MIME-Version: 1.0
References: <CAJFbk7EzSfPNbaGxiweKrivwNrKXCPVzA1b7_=0_bTvbs8oBow@mail.gmail.com>
 <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> <CAJFbk7GYbLAFTJY077Nzh3CTBJM6bk8swr4AkgGMaukCxrfcHQ@mail.gmail.com>
 <60f98b10-dcdc-cdf4-3d7a-fe9fd4dff223@selasky.org> <CAJFbk7EAjrQG5Kj_upVKW72opOS+8d63VrMnQdLxcJjUcfsd=g@mail.gmail.com>
 <8226461b-5740-9c19-0575-2740bd952e16@selasky.org> <CAJFbk7GwjFA-=GrJG3KTCnqVfEPhRSY1g8xyws_nE8pAohErEg@mail.gmail.com>
 <dabb798c-435c-6dd3-ac9b-8db3fb02a43c@selasky.org> <CAJFbk7FFeNTKvbNMr41kkwwYtyamJybTzk3=DQB1Hg3z+x2hgQ@mail.gmail.com>
In-Reply-To: <CAJFbk7FFeNTKvbNMr41kkwwYtyamJybTzk3=DQB1Hg3z+x2hgQ@mail.gmail.com>
From: Archimedes Gaviola <archimedes.gaviola@gmail.com>
Date: Sun, 13 Mar 2022 23:25:39 +0800
Message-ID: <CAJFbk7GZF4ahORzCUKaLZS4b=fCJQbEADPJmMYZjyaJwRR+hbw@mail.gmail.com>
Subject: Re: Raspberry Pi 3B USB Printing Issue
To: Hans Petter Selasky <hps@selasky.org>
Cc: freebsd-arm@freebsd.org
Content-Type: multipart/alternative; boundary="000000000000f0590405da1b2dbb"
X-Rspamd-Queue-Id: 4KGk5h2V43z3NkN
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=gmail.com header.s=20210112 header.b=MOf40aop;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::635 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com
X-Spamd-Result: default: False [-4.00 / 15.00];
	 TO_DN_SOME(0.00)[];
	 R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c];
	 FREEMAIL_FROM(0.00)[gmail.com];
	 MID_RHS_MATCH_FROMTLD(0.00)[];
	 DKIM_TRACE(0.00)[gmail.com:+];
	 RCPT_COUNT_TWO(0.00)[2];
	 DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
	 NEURAL_HAM_SHORT(-1.00)[-1.000];
	 FROM_EQ_ENVFROM(0.00)[];
	 MIME_TRACE(0.00)[0:+,1:+,2:~];
	 FREEMAIL_ENVFROM(0.00)[gmail.com];
	 ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
	 TAGGED_FROM(0.00)[];
	 DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
	 ARC_NA(0.00)[];
	 NEURAL_HAM_MEDIUM(-1.00)[-1.000];
	 R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112];
	 FROM_HAS_DN(0.00)[];
	 NEURAL_HAM_LONG(-1.00)[-1.000];
	 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	 PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org];
	 TO_MATCH_ENVRCPT_SOME(0.00)[];
	 RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::635:from];
	 MLMMJ_DEST(0.00)[freebsd-arm];
	 RCVD_COUNT_TWO(0.00)[2];
	 RCVD_TLS_ALL(0.00)[]
X-ThisMailContainsUnwantedMimeParts: N
Status: O
Content-Length: 7450
Lines: 180

--000000000000f0590405da1b2dbb
Content-Type: text/plain; charset="UTF-8"

On Sun, Mar 13, 2022 at 2:27 PM Archimedes Gaviola <
archimedes.gaviola@gmail.com> wrote:

>
>
> On Sun, Mar 13, 2022 at 12:38 AM Hans Petter Selasky <hps@selasky.org>
> wrote:
>
>> On 3/12/22 16:31, Archimedes Gaviola wrote:
>> >>
>> >> IOERROR usually means an electrical error. The RPI3B will use a
>> >> transaction translator for the FULL speed traffic, which is driven by
>> >> software.
>> >
>>
>> Hi Archimedes,
>>
>> > Hi Hans,
>> >
>> > I'm curious about the transaction translator you've mentioned, any idea
>> why
>> > there's a need for translation and what is being translated?
>>
>> When the High Speed USB HUB was invented, there was a need to support
>> FULL and LOW speed USB transactions. Because FULL and LOW speed
>> transactions are slow and take up much bandwidth, a transactions
>> translator was invented which translates between High Speed USB and
>> FULL/LOW speed USB. That means the RPi 3B consists of a single USB HIGH
>> speed port, followed by a USB HUB. These transactions are not visible in
>> usbdump .
>>
>>  >Does this only
>> > happen when RPi 3B (acting as host controller) is transmitting data to
>> the
>> > Epson printer? Are translation events visible in the usbdump? In this
>> case
>> > there's a way to possibly track what's going on and how to identify any
>> > info that is being translated?
>>
>> By turning on the HC debugging, you can possibly track via debug
>> messages what is going on. Maybe it is a timing issue, that the SW is
>> too slow serving the micro transactions.
>>
>> Any idea also if translation is being
>> > performed in RPi 4B?
>>
>> The later RPi's do the transaction translator bits in HW or via the XHCI
>> block.
>>
>> As I have conducted several printing cases with my
>> > Epson printer without any issues with either of the 4 ports.
>> >
>> > Sorry for these questions as I am catching-up to the USB technology
>> > internal workings under the hood.
>>
>> You are welcome!
>>
>
>
> Thank you so much Hans for answering my questions, really appreciate it! I
> have a much better understanding now.
>
> I came from testing with 13.0-RELEASE having the same RPi 3B hardware and
> setup and it's very stable. I haven't encountered any IOERROR and
> incomplete printed outputs that were encountered with 14.0-CURRENT
> (February 24, 2022). By the way, I found in the repository here
> https://download.freebsd.org/snapshots/arm64/aarch64/ISO-IMAGES/14.0/
> that there were two latest snapshots released dated March 3 and March 10,
> respectively. I need to take printing tests first, especially the latest to
> check if it also manifests before I go back to the Feb. 24 snapshot and do
> a thorough test with debugging. I'll provide updates for any observations.
>
> Thanks,
> Archimedes
>


Hi Hans,

Initial testing conducted with the latest 14.0-CURRENT (March 10, 2022
snapshot) seems to be stable. Another test will be performed tomorrow.

Thanks,
Archimedes

--000000000000f0590405da1b2dbb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sun, Mar 13, 2022 at 2:27 PM Archi=
medes Gaviola &lt;<a href=3D"mailto:archimedes.gaviola@gmail.com">archimede=
s.gaviola@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div cla=
ss=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Mar 13, 20=
22 at 12:38 AM Hans Petter Selasky &lt;<a href=3D"mailto:hps@selasky.org" t=
arget=3D"_blank">hps@selasky.org</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">On 3/12/22 16:31, Archimedes Gaviola wrote=
:<br>
&gt;&gt;<br>
&gt;&gt; IOERROR usually means an electrical error. The RPI3B will use a<br=
>
&gt;&gt; transaction translator for the FULL speed traffic, which is driven=
 by<br>
&gt;&gt; software.<br>
&gt; <br>
<br>
Hi Archimedes,<br>
<br>
&gt; Hi Hans,<br>
&gt; <br>
&gt; I&#39;m curious about the transaction translator you&#39;ve mentioned,=
 any idea why<br>
&gt; there&#39;s a need for translation and what is being translated? <br>
<br>
When the High Speed USB HUB was invented, there was a need to support <br>
FULL and LOW speed USB transactions. Because FULL and LOW speed <br>
transactions are slow and take up much bandwidth, a transactions <br>
translator was invented which translates between High Speed USB and <br>
FULL/LOW speed USB. That means the RPi 3B consists of a single USB HIGH <br=
>
speed port, followed by a USB HUB. These transactions are not visible in <b=
r>
usbdump .<br>
<br>
=C2=A0&gt;Does this only<br>
&gt; happen when RPi 3B (acting as host controller) is transmitting data to=
 the<br>
&gt; Epson printer? Are translation events visible in the usbdump? In this =
case<br>
&gt; there&#39;s a way to possibly track what&#39;s going on and how to ide=
ntify any<br>
&gt; info that is being translated? <br>
<br>
By turning on the HC debugging, you can possibly track via debug <br>
messages what is going on. Maybe it is a timing issue, that the SW is <br>
too slow serving the micro transactions.<br>
<br>
Any idea also if translation is being<br>
&gt; performed in RPi 4B? <br>
<br>
The later RPi&#39;s do the transaction translator bits in HW or via the XHC=
I <br>
block.<br>
<br>
As I have conducted several printing cases with my<br>
&gt; Epson printer without any issues with either of the 4 ports.<br>
&gt; <br>
&gt; Sorry for these questions as I am catching-up to the USB technology<br=
>
&gt; internal workings under the hood.<br>
<br>
You are welcome!<br></blockquote><div><br></div><br></div><div class=3D"gma=
il_quote">Thank you so much Hans for answering my questions, really appreci=
ate it! I have a much better understanding now.<br></div><div class=3D"gmai=
l_quote"><br></div><div class=3D"gmail_quote">I came from testing with 13.0=
-RELEASE having the same RPi 3B hardware and setup and it&#39;s very stable=
. I haven&#39;t encountered any IOERROR and incomplete printed outputs that=
 were encountered with 14.0-CURRENT (February 24, 2022). By the way, I foun=
d in the repository here <a href=3D"https://download.freebsd.org/snapshots/=
arm64/aarch64/ISO-IMAGES/14.0/" target=3D"_blank">https://download.freebsd.=
org/snapshots/arm64/aarch64/ISO-IMAGES/14.0/</a> that there were two latest=
 snapshots released dated March 3 and March 10, respectively. I need to tak=
e printing tests first, especially the latest to check if it also manifests=
 before I go back to the Feb. 24 snapshot and do a thorough test with debug=
ging. I&#39;ll provide updates for any observations.<br></div><div class=3D=
"gmail_quote"><br></div><div class=3D"gmail_quote"></div><div class=3D"gmai=
l_quote">Thanks,</div><div class=3D"gmail_quote">Archimedes<br></div></div>=
</blockquote><div><br></div><div><br></div><div>Hi Hans,</div><div><br></di=
v><div>Initial testing conducted with the latest 14.0-CURRENT (March 10, 20=
22 snapshot) seems to be stable. Another test will be performed tomorrow.<b=
r></div><div><br></div><div></div><div>Thanks,</div><div>Archimedes <br></d=
iv></div></div>

--000000000000f0590405da1b2dbb--