From nobody Sat Mar 12 09:33:07 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 0A01D19F9837 for ; Sat, 12 Mar 2022 09:33:27 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 4KFyKL0KD9z4hPX for ; Sat, 12 Mar 2022 09:33:26 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ed1-x535.google.com with SMTP id g20so13664521edw.6 for ; Sat, 12 Mar 2022 01:33:26 -0800 (PST) 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=rF+hiGoIJac+QXbrgKyYeQ8Ezw+pBsKNOln6NGDkezI=; b=khWam5t/dx9Dp8sxuIzsu16SVljNj65u6oyx151rnVXvjbbBMPxtQNIBxxRYimPS5o JgcnsrgeGZ4LcHad6elu3rnSdmTc8C7KNrHyngBTX3bYz3n6aXD6Y3ExYKNH7eXiIQpS gTVGeCqGOpbkxhkmvQqL0AB0HDrwp+DjFaOxVOWFjGfy4Lz2qSjqEU5mHvIruHIvmy27 +DWktylnXCu0vkkLsuhBSBQq79XeUeVRKn6FoHpkPFKfBBPZ1WSUPzj95OPJuPPQ8iAV jL7J70BFc2s1IX4ynLk67NC57a2oX3SlXTEtbOJ/g2jpS+x9tY+xWVvsOXqXPix4v6Rc hzWg== 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=rF+hiGoIJac+QXbrgKyYeQ8Ezw+pBsKNOln6NGDkezI=; b=Kjp8RKxYUKVasKLxTdy8qMhSBUgLE7ewUJkM5HsGmaipigd3HXRKpW2tihMpOKc0Tq Ofzcg2mgja7EvP6rbS/xKRaJK8XR4HJnH3AQmcyzpxGRVBdhKMTbAOiPBy0UkzrlKU0l YVnSFOieZnAY1cH3+m5gnvjfgfAs1U2sqkirewXx6dcjqe3BxCOf0wmx8Hbbt8JCCSVP ov3ynTgrske5vLQUM6T5QwO9YbolqrVyQMDwEkx/JK2J3D5MM2dWOgEOhEt47WiMCOQ3 lr6pn8egcsuW1EDtXZUO7ohtHbehMMCPWnqk+0GA/vRD2HGerGqoZukcyyR5WnXbHKSj gAYg== X-Gm-Message-State: AOAM531gsM3V34uPGoq24fQJauGheHmRD/4rr6TxwrQaLu+dp+664zcL CrxwvdLDsHlzrpUzvUetcU7KTbo+1lrkjt6Imy0= X-Google-Smtp-Source: ABdhPJybK4qrrboQgSAtH6IN8tEFpTBxoa95ykoURMePIvycCHqLMD9v10nKYIWb0EPX00hJgpqA7aT1czrljhSNZY4= X-Received: by 2002:a50:cf48:0:b0:415:df40:9e3d with SMTP id d8-20020a50cf48000000b00415df409e3dmr12226924edk.185.1647077598092; Sat, 12 Mar 2022 01:33:18 -0800 (PST) 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: Sat, 12 Mar 2022 17:33:07 +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="00000000000026e1f405da022313" X-Rspamd-Queue-Id: 4KFyKL0KD9z4hPX X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="khWam5t/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; 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)[-0.998]; 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::535:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000026e1f405da022313 Content-Type: text/plain; charset="UTF-8" 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 > Hi Hans, > > 12 : man errno : > 12 ENOMEM Cannot allocate memory. > > I guess the EPSON printer you've got is not compatible with ulpt > Oh I see, just tried with my RPi 4B and it has the same issue with returned 12 on ENOMEM. Previously with OpenBSD it was only detected as well with the ugen(4) driver not ulpt(4) so most likely not compatible. I will check the manual for any settings relevant to this. > > When printing, can you make sure that the length transferred is never a > multiple of 64 bytes? > Okay let me double check with usbdump again as these are only plain text characters being printed with no other formats involved. > > Also, there might be a bug lurking in the USB host controller driver, > like already mentioned. > Okay noted again, so there's a need to check and review the code of the DWC OTG host controller driver. So this is just specific to RPi 3B. I'll proceed on enabling the debugging settings and observed. Thanks, Archimedes --00000000000026e1f405da022313 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Mar 12, 2022 at 4:41 PM Hans = Petter Selasky <hps@selasky.org&g= t; wrote:
On 3/1= 2/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, addr 5> = on usbus1
> device_attach: ulpt1 attach returned 12


Hi Hans,
=C2=A0

12 : man errno :
=C2=A0 =C2=A0 =C2=A0 12 ENOMEM Cannot allocate memory.

I guess the EPSON printer you've got is not compatible with ulpt<n&g= t;

Oh I see, just tried with my RPi 4B = and it has the same issue with returned 12 on ENOMEM. Previously with OpenB= SD it was only detected as well with the ugen(4) driver not ulpt(4) so most= likely not compatible. I will check the manual for any settings relevant t= o this.
=C2=A0

When printing, can you make sure that the length transferred is never a multiple of 64 bytes?

Okay let me doubl= e check with usbdump again as these are only plain text characters being pr= inted with no other formats involved.
=C2=A0

Also, there might be a bug lurking in the USB host controller driver,
like already mentioned.
Okay noted again, so there's a need = to check and review the code of the DWC OTG host controller driver. So this= is just specific to RPi 3B. I'll proceed on enabling the debugging set= tings and observed.

Thanks,
Archimedes


--00000000000026e1f405da022313--