From nobody Thu Mar 31 11:52:58 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 EB63F1A42E34 for ; Thu, 31 Mar 2022 11:53:11 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 4KThWp6Fr1z59St for ; Thu, 31 Mar 2022 11:53:10 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ej1-x634.google.com with SMTP id bi12so47638985ejb.3 for ; Thu, 31 Mar 2022 04:53:10 -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=/YXWZNX39x2HMuyWcSQF9zBTZYZ62ugeIabminyj7bc=; b=WbUicy2Jy1nccVakwEdocZ4p0h3yvtmXzGvigNifQbsh9ZZMEdYeC/HwckWnf6ZHjM GjxgxKvHKIz5XpMsxCZuGOAp0geMyvzivDmu4iM4iEFbFN4SH2cLNRzZ1wuvl/Ra0PUX xyMZqJXGKOPSe2veAbhFADxtIIWZjP5YPQKzt3+ec7mp6xGMWe375zjGXMc3K+q/FpMj Cq+VrEzWkGk0XxBaMSUomr0aDqx67ojmECE3I7V/TIW+Ay0EaxqLv6Fox5dQn3cilVGw 2QdaSNnjuckKJ3wbPsy3PJ6j5jsnDqf+fgbSoI3+NWoleTZtt9j+ijO6EsVlV0qvT24k Bzeg== 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=/YXWZNX39x2HMuyWcSQF9zBTZYZ62ugeIabminyj7bc=; b=uq2Aphs26pP39FHm5mj3PBeqqylrqseLZChjo5Tz52BYXQVD/ouLQaDmwb2Hna/zHo Rjhugyva6bQmFIUYhiRrSQR5IxcgN4InHZLta3moLXuFLtQgQZti6bXLPKUnQkq/hfK2 PZYUeQFaUwign+vfrxbnA3XsQbr8ZmGyQ24x1ZpYs5PLpBxmhhs1wfFFlo7NGnVHiNq4 qF/x4DlNEg/paI7XjzaEmjiNsyIUteGNz66RM/lQ/NJOdcFhM9pIx7dc4mzFn2Vect6l fHdC/47aIVxrKmfcEaiPBnejz9UPREjOs7sETVUUlPfTohJoxS2FEnHbOjsvk8alwuWW usVA== X-Gm-Message-State: AOAM531nloDT5p+ace8f1Dw9Zh15lRQdnFjcp+lnxTXrKMMrRIdCBYrK WOlAOUTXENhndTQkMM088YmErX13VtZWU4PIRxqMftvPjYQtUA== X-Google-Smtp-Source: ABdhPJxOVWqbKfQEthc3YeIrbK3dOS83CSwpUbK5p18mt1l6tPV2fb+6fnivC1cyZ/q7EWMsh+JbDtWe9i0vZUGiKwk= X-Received: by 2002:a17:907:7284:b0:6df:9120:d935 with SMTP id dt4-20020a170907728400b006df9120d935mr4738513ejc.276.1648727589550; Thu, 31 Mar 2022 04:53:09 -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> <5fcece51-b014-330e-b701-fd75fa1ac204@selasky.org> In-Reply-To: From: Archimedes Gaviola Date: Thu, 31 Mar 2022 19:52:58 +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="0000000000004e7db505db824ee0" X-Rspamd-Queue-Id: 4KThWp6Fr1z59St X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=WbUicy2J; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::634 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.87 / 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(-0.88)[-0.875]; 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::634:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000004e7db505db824ee0 Content-Type: text/plain; charset="UTF-8" On Sun, Mar 27, 2022 at 10:28 PM Archimedes Gaviola < archimedes.gaviola@gmail.com> wrote: > > > On Sun, Mar 27, 2022 at 5:05 PM Hans Petter Selasky > wrote: > >> On 3/27/22 07:55, Archimedes Gaviola wrote: >> > On Sat, Mar 12, 2022 at 4:41 PM Hans Petter Selasky >> wrote: >> > >> >> On 3/12/22 08:07, Archimedes Gaviola wrote: >> >>> ugen1.5: at usbus1 >> >>> ulpt1 on uhub1 >> >>> ulpt1: on >> usbus1 >> >>> device_attach: ulpt1 attach returned 12 >> >> >> >> 12 : man errno : >> >> 12 ENOMEM Cannot allocate memory. >> >> >> >> I guess the EPSON printer you've got is not compatible with ulpt >> >> >> >> When printing, can you make sure that the length transferred is never a >> >> multiple of 64 bytes? >> >> >> >> Also, there might be a bug lurking in the USB host controller driver, >> >> like already mentioned. >> >> >> > >> > >> > Hi Hans, >> > >> > I just figured-out the ulpt(4) driver in my Epson printer while >> comparing >> > with my Xprinter printer's USB device info. My Epson printer is >> providing >> > vendor specific values of 255 in the bInterfaceClass and >> bInterfaceSubClass >> > respectively. >> > >> > bInterfaceClass = 0x00ff >> > bInterfaceSubClass = 0x00ff >> > >> > It should be a value of 7 for bInterfaceClass and a value of 1 in >> > bInterfaceSubClass. >> > >> > bInterfaceClass = 0x0007 >> > bInterfaceSubClass = 0x0001 >> > >> > So, the ulpt_attach() routine below will break upon validation for >> > mismatched values in UICLASS_PRINTER and UISUBCLASS_PRINTER. >> > >> > } else { >> > alt_index++; >> > if ((id->bInterfaceClass == >> > UICLASS_PRINTER) && >> > (id->bInterfaceSubClass == >> > UISUBCLASS_PRINTER) && >> > (id->bInterfaceProtocol == >> > UIPROTO_PRINTER_BI)) { >> > goto found; >> > } >> > } >> > >> > What I did is temporarily replace these values in the USB definition. In >> > this case, how should the project handle this non-compliance USB >> devices? >> > Though I will raise this to Epson if they could provide an updated >> firmware. >> > >> > freebsd@generic:~ % diff -Nur /usr/src/sys/dev/usb/usb.h.orig >> > /usr/src/sys/dev/usb/usb.h >> > --- /usr/src/sys/dev/usb/usb.h.orig 2022-03-27 02:55:01.319235000 >> +0800 >> > +++ /usr/src/sys/dev/usb/usb.h 2022-03-27 02:57:10.608518000 +0800 >> > @@ -459,8 +459,10 @@ >> > #define UICLASS_PHYSICAL 0x05 >> > #define UICLASS_IMAGE 0x06 >> > #define UISUBCLASS_SIC 1 /* still image class */ >> > -#define UICLASS_PRINTER 0x07 >> > -#define UISUBCLASS_PRINTER 1 >> > +/* #define UICLASS_PRINTER 0x07 */ >> > +/* #define UISUBCLASS_PRINTER 1 */ >> > +#define UICLASS_PRINTER 0xff >> > +#define UISUBCLASS_PRINTER 0xff >> > >> > I can print now with ulpt(4) driver but need further testing for any >> issues. >> > >> > ugen1.5: at usbus1 >> > ulpt0 on uhub1 >> > ulpt0: on >> usbus1 >> > ulpt_attach: setting alternate config number: 0 >> > ulpt0: using bi-directional mode >> > >> >> Hi, >> >> I think you can just extend that piece of code to accept either value >> using a boolean OR, ||. >> > > > Hi Hans, > > Ah okay, this is noted. I just thought it's not allowed. I already > extended the code and on the way re-building the kernel. > Hi Hans, Here are the changes I've done in the /usr/src/sys/dev/usb/serial/ulpt.c source. This works both now with my Epson TM-U220B and Xprinter printers. It can detect either or both in 14.0-CURRENT. So far I haven't encountered any strange behavior while printing using this ulpt(4) driver. freebsd@generic:~ % diff -Nur /usr/src/sys/dev/usb/serial/ulpt.c.orig /usr/src/sys/dev/usb/serial/ulpt.c --- /usr/src/sys/dev/usb/serial/ulpt.c.orig 2022-03-21 19:44:29.178010000 +0800 +++ /usr/src/sys/dev/usb/serial/ulpt.c 2022-03-31 16:57:53.317952000 +0800 @@ -495,6 +495,11 @@ USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER), USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)}, + /* Bi-directional USB vendor specific */ + {USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(UISUBCLASS_VENDOR), + USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)}, + /* 1284 USB printer */ {USB_IFACE_CLASS(UICLASS_PRINTER), USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER), @@ -555,9 +560,11 @@ break; } else { alt_index++; - if ((id->bInterfaceClass == UICLASS_PRINTER) && - (id->bInterfaceSubClass == UISUBCLASS_PRINTER) && - (id->bInterfaceProtocol == UIPROTO_PRINTER_BI)) { + if ((id->bInterfaceClass == UICLASS_PRINTER || + id->bInterfaceClass == UICLASS_VENDOR) && + (id->bInterfaceSubClass == UISUBCLASS_PRINTER || + id->bInterfaceClass == UISUBCLASS_VENDOR) && + (id->bInterfaceProtocol == UIPROTO_PRINTER_BI)) { goto found; } } In the /usr/src/sys/dev/usb/usbdevs, I think there's a need to include the undefined TM-U220B. freebsd@generic:~ % diff -Nur /usr/src/sys/dev/usb/usbdevs.orig /usr/src/sys/dev/usb/usbdevs --- /usr/src/sys/dev/usb/usbdevs.orig 2022-03-21 19:42:20.999397000 +0800 +++ /usr/src/sys/dev/usb/usbdevs 2022-04-01 01:21:31.361567000 +0800 @@ -1941,6 +1941,7 @@ product EPSON 2480 0x0121 Perfection 2480 scanner product EPSON 3590 0x0122 Perfection 3590 scanner product EPSON 4990 0x012a Perfection 4990 Photo scanner +product EPSON TMU220B 0x0202 TM-U220B product EPSON CRESSI_EDY 0x0521 Cressi Edy diving computer product EPSON N2ITION3 0x0522 Zeagle N2iTion3 diving computer product EPSON STYLUS_875DC 0x0601 Stylus Photo 875DC Card Reader Thanks, Archimedes --0000000000004e7db505db824ee0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Mar 27, 2022 at 10:28 PM Arch= imedes Gaviola <archimed= es.gaviola@gmail.com> wrote:


On Sun, Mar 27, 2= 022 at 5:05 PM Hans Petter Selasky <hps@selasky.org> wrote:
On 3/27/22 07:55, Archimedes Gaviola wrote= :
> On Sat, Mar 12, 2022 at 4:41 PM Hans Petter Selasky <hps@selasky.org> wrote:
>
>> On 3/12/22 08:07, Archimedes Gaviola wrote:
>>> ugen1.5: <EPSON EPSON UB-U03II> at usbus1
>>> ulpt1 on uhub1
>>> ulpt1: <EPSON EPSON UB-U03II, class 0/0, rev 1.10/2.00, add= r 5> on usbus1
>>> device_attach: ulpt1 attach returned 12
>>
>> 12 : man errno :
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 12 ENOMEM Cannot allocate memory.
>>
>> I guess the EPSON printer you've got is not compatible with ul= pt<n>
>>
>> When printing, can you make sure that the length transferred is ne= ver a
>> multiple of 64 bytes?
>>
>> Also, there might be a bug lurking in the USB host controller driv= er,
>> like already mentioned.
>>
>
>
> Hi Hans,
>
> I just figured-out the ulpt(4) driver in my Epson printer while compar= ing
> with my Xprinter printer's USB device info. My Epson printer is pr= oviding
> vendor specific values of 255 in the bInterfaceClass and bInterfaceSub= Class
> respectively.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 bInterfaceClass =3D 0x00ff=C2=A0 <Vendor= specific>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 bInterfaceSubClass =3D 0x00ff
>
> It should be a value of 7 for bInterfaceClass and a value of 1 in
> bInterfaceSubClass.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 bInterfaceClass =3D 0x0007=C2=A0 <Printe= r device>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 bInterfaceSubClass =3D 0x0001
>
> So, the ulpt_attach() routine below will break upon validation for
> mismatched values in UICLASS_PRINTER and=C2=A0 UISUBCLASS_PRINTER.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 } else {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 alt_index++;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((id->bInterfaceClas= s =3D=3D
> UICLASS_PRINTER) &&
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (id->bInt= erfaceSubClass =3D=3D
> UISUBCLASS_PRINTER) &&
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (id->bInt= erfaceProtocol =3D=3D
> UIPROTO_PRINTER_BI)) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 goto found;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 }
>
> What I did is temporarily replace these values in the USB definition. = In
> this case, how should the project handle this non-compliance USB devic= es?
> Though I will raise this to Epson if they could provide an updated fir= mware.
>
> freebsd@generic:~ % diff -Nur /usr/src/sys/dev/usb/usb.h.orig
> /usr/src/sys/dev/usb/usb.h
> --- /usr/src/sys/dev/usb/usb.h.orig=C2=A0 =C2=A0 =C2=A02022-03-27 02:5= 5:01.319235000 +0800
> +++ /usr/src/sys/dev/usb/usb.h=C2=A0 2022-03-27 02:57:10.608518000 +08= 00
> @@ -459,8 +459,10 @@
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UICLASS_PHYSICAL=C2=A0 = =C2=A0 =C2=A0 =C2=A0 0x05
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UICLASS_IMAGE=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x06
>=C2=A0 =C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UISUBCLASS_SIC=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A0/* still image clas= s */
> -#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UICLASS_PRINTER=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00x07
> -#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UISUBCLASS_PRINTER=C2=A0 =C2=A0 = =C2=A0 1
> +/* #define=C2=A0 =C2=A0 =C2=A0UICLASS_PRINTER=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A00x07 */
> +/* #define=C2=A0 =C2=A0 =C2=A0UISUBCLASS_PRINTER=C2=A0 =C2=A0 =C2=A0 = 1 */
> +#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UICLASS_PRINTER=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00xff
> +#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 UISUBCLASS_PRINTER=C2=A0 =C2=A0 = =C2=A0 0xff
>
> I can print now with ulpt(4) driver but need further testing for any i= ssues.
>
> ugen1.5: <EPSON EPSON UB-U03II> at usbus1
> ulpt0 on uhub1
> ulpt0: <EPSON EPSON UB-U03II, class 0/0, rev 1.10/2.00, addr 5> = on usbus1
> ulpt_attach: setting alternate config number: 0
> ulpt0: using bi-directional mode
>

Hi,

I think you can just extend that piece of code to accept either value
using a boolean OR, ||.


Hi Hans,

Ah okay, this is noted. I just thought it's not all= owed. I already extended the code and on the way re-building the kernel.


Hi Hans,

Here are the changes I've done in the /usr/src/sys/dev/= usb/serial/ulpt.c source. This works both now with my Epson TM-U220B and Xp= rinter printers. It can detect either or both in 14.0-CURRENT. So far I hav= en't encountered any strange behavior while printing using this ulpt(4)= driver.

freebsd@generic:~ % diff -Nur /usr/sr= c/sys/dev/usb/serial/ulpt.c.orig /usr/src/sys/dev/usb/serial/ulpt.c
--- = /usr/src/sys/dev/usb/serial/ulpt.c.orig =C2=A0 =C2=A0 2022-03-21 19:44:29.1= 78010000 +0800
+++ /usr/src/sys/dev/usb/serial/ulpt.c =C2=A02022-03-31 1= 6:57:53.317952000 +0800
@@ -495,6 +495,11 @@
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)},

+ =C2=A0 =C2= =A0 =C2=A0 /* Bi-directional USB vendor specific */
+ =C2=A0 =C2=A0 =C2= =A0 {USB_IFACE_CLASS(UICLASS_VENDOR),
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_I= FACE_SUBCLASS(UISUBCLASS_VENDOR),
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE= _PROTOCOL(UIPROTO_PRINTER_BI)},
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* 1284= USB printer */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 {USB_IFACE_CLASS(UICLASS_PRI= NTER),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE_SUBCLASS(UISUBCLASS_P= RINTER),
@@ -555,9 +560,11 @@
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b= reak;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 } else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 alt_inde= x++;
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((id->bInterfaceClass =3D= =3D UICLASS_PRINTER) &&
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (id->bInterfaceSubClass =3D=3D UISUBCLASS_PRINTER) &&
= - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (id->bInterfaceProtocol = =3D=3D UIPROTO_PRINTER_BI)) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((id-= >bInterfaceClass =3D=3D UICLASS_PRINTER ||
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 id->bInterfaceClass =3D=3D UICLASS_VENDOR) &&am= p;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (id->bInterfaceSubC= lass =3D=3D UISUBCLASS_PRINTER ||
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 id->bInterfaceClass =3D=3D UISUBCLASS_VENDOR) &&
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (id->bInterfaceProtocol = =3D=3D UIPROTO_PRINTER_BI)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 goto found;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }

In the=20 /usr/src/sys/dev/usb/usbdevs, I think there's a need to include the und= efined TM-U220B.

freebsd@generic:~ % diff -Nur= /usr/src/sys/dev/usb/usbdevs.orig /usr/src/sys/dev/usb/usbdevs
--- /usr= /src/sys/dev/usb/usbdevs.orig =C2=A0 2022-03-21 19:42:20.999397000 +0800+++ /usr/src/sys/dev/usb/usbdevs =C2=A0 =C2=A0 =C2=A0 =C2=A02022-04-01 01:= 21:31.361567000 +0800
@@ -1941,6 +1941,7 @@
=C2=A0product EPSON 2480 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0121 =C2=A0Perfection 2480 scan= ner
=C2=A0product EPSON 3590 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0= x0122 =C2=A0Perfection 3590 scanner
=C2=A0product EPSON 4990 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x012a =C2=A0Perfection 4990 Photo scanner<= br>+product EPSON TMU220B =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x0202 =C2=A0TM= -U220B
=C2=A0product EPSON CRESSI_EDY =C2=A0 =C2=A0 =C2=A0 0x0521 =C2=A0= Cressi Edy diving computer
=C2=A0product EPSON N2ITION3 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 0x0522 =C2=A0Zeagle N2iTion3 diving computer
=C2=A0product= EPSON STYLUS_875DC =C2=A0 =C2=A0 0x0601 =C2=A0Stylus Photo 875DC Card Read= er

Thanks,
Archimedes

--0000000000004e7db505db824ee0--