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 ; 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 ; 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 ; 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 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: <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> <60f98b10-dcdc-cdf4-3d7a-fe9fd4dff223@selasky.org> <8226461b-5740-9c19-0575-2740bd952e16@selasky.org> In-Reply-To: From: Archimedes Gaviola Date: Sun, 13 Mar 2022 23:25:39 +0800 Message-ID: Subject: Re: Raspberry Pi 3B USB Printing Issue To: Hans Petter Selasky 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 --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 > 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


=
On Sun, Mar 13, 2022 at 2:27 PM Archi= medes Gaviola <archimede= s.gaviola@gmail.com> wrote:


On Sun, Mar 13, 20= 22 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 .

=C2=A0>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 ide= ntify 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 XHC= I
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 appreci= ate 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 foun= d 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 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'll provide updates for any observations.

Thanks,
Archimedes
=


Hi Hans,

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

Thanks,
Archimedes
--000000000000f0590405da1b2dbb--