From nobody Sun Mar 20 12:02:22 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 02ADA1A36FFA for ; Sun, 20 Mar 2022 12:02:52 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 4KLxG30dNyz4Vcf for ; Sun, 20 Mar 2022 12:02:51 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ej1-x62f.google.com with SMTP id dr20so24651502ejc.6 for ; Sun, 20 Mar 2022 05:02:51 -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=Kt31ZUxvMeoyu9hMr5Rih/FehUEIC3rxGGz5xxFTF/Y=; b=VIFhR46wqyTPtEFA3XU3qgd6IPd17ZxGZBnuHz9oyphb6HtojvkCA7JC3K3ZS5vnYn q8Pm3Zi30Q9eJ/q20Tme7uTFk++f5zxppNs8XPgXUd9DUplHbwNmUnh/HXLRBjVTmigS l4gFHJETHwqsiiOoWLVv4xkyfc0uMwe6nBuuzRN+aX2s7mAx0UpIfs55ZUNjgmf0hKzN F9hRtJSYkBsHWSw3S0C38/P3wC5WJC+2boBeXjPPtDN5FF91+72dFw71W2Un9u7K/TGT 3Gaxnx2EzlyWo9DSjt0V34b33wlEQXLtsUHXEFHRbXJqXE/GPH88Tz/zMOVj1sUWSnsh rihg== 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=Kt31ZUxvMeoyu9hMr5Rih/FehUEIC3rxGGz5xxFTF/Y=; b=uSJeUvtchA+MODDLQJqfYFwbnwbd3P4PDKMAg0KeaQB80WnJEsTLzKhR177nYWUdUV RFMxhrj5URlo/BsavadEVYztR2jxnigKL39RDnSuzb+ObkHDcHZUITVjq5jdXygLbyvC wtPg7TcpKEgjQCIoWenYXIVg3X7AWgl7fdhR2YHv6f75GZYD1aExjIU3qhh/L7TwhxrL KCosEjTKFZg3NGnP1EqqvAu7T70BlBchyWGTHOwUpmgT/JbNNpLSj0jgFs888XAWTmUe YVURdIY7cP5wsmampP5su3GnvL/FEJt7f7W1KNXNhnjz26FToxCX8bfZU4E8Guz2cX0W Jl3A== X-Gm-Message-State: AOAM532OmCLPU0PSxqOT+C1dgfTofZ6E+dijBH6b3yMHX+M8BxA5wPMs uVmyxrUWXB+DcFf15ZFgF4u/IipK0tjzhx5qbIdhoL7gOYw= X-Google-Smtp-Source: ABdhPJwqpyyOS5QEZQ+JlapmlumDXCNLhkJ47dFDRobE0dCL49/FDwKbsWvdwZVmyk9jQqMRsuS7QCLXYYICE5ZiMes= X-Received: by 2002:a17:906:7302:b0:6df:8c05:60c6 with SMTP id di2-20020a170906730200b006df8c0560c6mr15667335ejc.370.1647777769337; Sun, 20 Mar 2022 05:02:49 -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: <7a77e3bd-1186-56a6-e60e-89e51c190a01@selasky.org> <87a3da15-d83d-c864-bdb7-6035db5cd70d@selasky.org> <5afb1138-b9db-3549-1220-e332a0f68815@selasky.org> In-Reply-To: From: Archimedes Gaviola Date: Sun, 20 Mar 2022 20:02:22 +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="0000000000009c35fa05daa52853" X-Rspamd-Queue-Id: 4KLxG30dNyz4Vcf X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=VIFhR46w; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::62f as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.50 / 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(-0.50)[-0.497]; 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::62f:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000009c35fa05daa52853 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 17, 2022 at 10:35 PM Archimedes Gaviola < archimedes.gaviola@gmail.com> wrote: > > > On Thu, Mar 17, 2022 at 10:32 PM Hans Petter Selasky > wrote: > >> On 3/17/22 14:54, Archimedes Gaviola wrote: >> > Is this an expected >> > behavior? >> >> Yes, you shouldn't rely on the ugen numbering. It depends on the actual >> enumeration order. >> > > Alright, this is noted. Thank you Hans! > Hi Hans, For how many days I've been doing the automated printing the issue never occurred with DWC OTG debug level 17 but still for sure the issue is observed when debug is bypassed or disabled . That's why it's quite a challenge for me to capture. Not sure why this debug level 17 issue never appeared. Any ideas? Meanwhile, I've tried enabling 'sysctl hw.usb.ugen.debug=17' and this is what I've got. Not sure if this is helpful to you for any clue. When exactly the printing issue occurred this is what happened as found in the logs -> ugen_write_clear_stall_callback: f=0xffffa00016208d80: stall cleared. Below is the complete /var/log/messages (appeared twice) and the c-file-to-printer is my little printing program invoked. Mar 20 14:39:04 generic kernel: ugen_open: flag=0x402 pid=1337 name=c-file-to-printer Mar 20 14:39:04 generic kernel: ugen_ioctl: cmd=0x402c7413 Mar 20 14:39:04 generic kernel: ugen_ioctl: error=-3 Mar 20 14:39:04 generic kernel: ugen_ioctl_post: cmd=0x402c7413 Mar 20 14:39:04 generic kernel: ugen_ioctl_post: error=-3 Mar 20 14:39:04 generic kernel: ugen_ctrl_write_callback: actlen=0, aframes=0 Mar 20 14:39:04 generic kernel: ugen_ctrl_write_callback: actlen=697, aframes=1 Mar 20 14:39:04 generic kernel: ugen_close: flag=0x402 pid=1337 name=c-file-to-printer Mar 20 14:39:04 generic kernel: ugen_close: no FIFOs Mar 20 14:39:10 generic kernel: ugen_open: flag=0x402 pid=1338 name=c-file-to-printer Mar 20 14:39:10 generic kernel: ugen_ioctl: cmd=0x402c7413 Mar 20 14:39:10 generic kernel: ugen_ioctl: error=-3 Mar 20 14:39:10 generic kernel: ugen_ioctl_post: cmd=0x402c7413 Mar 20 14:39:10 generic kernel: ugen_ioctl_post: error=-3 Mar 20 14:39:10 generic kernel: ugen_ctrl_write_callback: actlen=0, aframes=0 Mar 20 14:39:10 generic kernel: ugen_ctrl_write_callback: actlen=697, aframes=1 Mar 20 14:39:10 generic kernel: ugen_close: flag=0x402 pid=1338 name=c-file-to-printer Mar 20 14:39:10 generic kernel: ugen_close: no FIFOs Mar 20 14:39:15 generic kernel: ugen_open: flag=0x402 pid=1339 name=c-file-to-printer Mar 20 14:39:15 generic kernel: ugen_ioctl: cmd=0x402c7413 Mar 20 14:39:15 generic kernel: ugen_ioctl: error=-3 Mar 20 14:39:15 generic kernel: ugen_ioctl_post: cmd=0x402c7413 Mar 20 14:39:15 generic kernel: ugen_ioctl_post: error=-3 Mar 20 14:39:15 generic kernel: ugen_ctrl_write_callback: actlen=0, aframes=0 Mar 20 14:39:15 generic kernel: ugen_ctrl_write_callback: actlen=56, aframes=1 Mar 20 14:39:15 generic kernel: ugen_write_clear_stall_callback: f=0xffffa00016208d80: stall cleared Mar 20 14:39:15 generic kernel: ugen_ctrl_write_callback: actlen=56, aframes=1 Mar 20 14:39:15 generic kernel: ugen_close: flag=0x402 pid=1339 name=c-file-to-printer Mar 20 14:39:15 generic kernel: ugen_close: no FIFOs Mar 20 14:39:49 generic login[1169]: ROOT LOGIN (root) ON ttyv3 Mar 20 14:40:40 generic kernel: ugen_open: flag=0x402 pid=1346 name=c-file-to-printer Mar 20 14:40:40 generic kernel: ugen_ioctl: cmd=0x402c7413 Mar 20 14:40:40 generic kernel: ugen_ioctl: error=-3 Mar 20 14:40:40 generic kernel: ugen_ioctl_post: cmd=0x402c7413 Mar 20 14:40:40 generic kernel: ugen_ioctl_post: error=-3 Mar 20 14:40:40 generic kernel: ugen_ctrl_write_callback: actlen=0, aframes=0 Mar 20 14:40:40 generic kernel: ugen_ctrl_write_callback: actlen=72, aframes=1 Mar 20 14:40:40 generic kernel: ugen_write_clear_stall_callback: f=0xffffa00016208d80: stall cleared Mar 20 14:40:40 generic kernel: ugen_ctrl_write_callback: actlen=72, aframes=1 Mar 20 14:40:40 generic kernel: ugen_close: flag=0x402 pid=1346 name=c-file-to-printer Mar 20 14:40:40 generic kernel: ugen_close: no FIFOs Mar 20 14:40:51 generic kernel: ugen_open: flag=0x402 pid=1347 name=c-file-to-printer Mar 20 14:40:51 generic kernel: ugen_ioctl: cmd=0x402c7413 Mar 20 14:40:51 generic kernel: ugen_ioctl: error=-3 Mar 20 14:40:51 generic kernel: ugen_ioctl_post: cmd=0x402c7413 Mar 20 14:40:51 generic kernel: ugen_ioctl_post: error=-3 Mar 20 14:40:51 generic kernel: ugen_ctrl_write_callback: actlen=0, aframes=0 Mar 20 14:40:51 generic kernel: ugen_ctrl_write_callback: actlen=697, aframes=1 Mar 20 14:40:51 generic kernel: ugen_close: flag=0x402 pid=1347 name=c-file-to-printer Mar 20 14:40:51 generic kernel: ugen_close: no FIFOs Thanks, Archimedes --0000000000009c35fa05daa52853 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Mar 17, 2022 at 10:35 PM Arch= imedes Gaviola <archimed= es.gaviola@gmail.com> wrote:


On Thu, Mar 17, 2= 022 at 10:32 PM Hans Petter Selasky <hps@selasky.org> wrote:
On 3/17/22 14:54, Archimedes Gaviola wrote= :
> Is this an expected
> behavior?

Yes, you shouldn't rely on the ugen numbering. It depends on the actual=
enumeration order.

Alright, this is not= ed. Thank you Hans!


<= /div>
Hi Hans,

For how many days I've been= doing the automated printing the issue never occurred with DWC OTG debug l= evel 17 but still for sure the issue is observed when debug is bypassed or = disabled . That's why it's quite a challenge for me to capture. Not= sure why this debug level 17 issue never appeared. Any ideas?

Meanwhile, I've tried enabling 'sysctl hw.usb.ugen= .debug=3D17' and this is what I've got. Not sure if this is helpful= to you for any clue. When exactly the printing issue occurred this is what= happened as found in the logs -> ugen_write_clear_stall_callback: f=3D0= xffffa00016208d80: stall cleared. Below is the complete /var/log/messages (= appeared twice)=20 and the c-file-to-printer is my little printing program invoked.

Mar 20 14:39:04 generic kernel: ugen_open: flag= =3D0x402 pid=3D1337 name=3Dc-file-to-printer
Mar 20 14:39:04 generic ker= nel: ugen_ioctl: cmd=3D0x402c7413
Mar 20 14:39:04 generic kernel: ugen_i= octl: error=3D-3
Mar 20 14:39:04 generic kernel: ugen_ioctl_post: cmd=3D= 0x402c7413
Mar 20 14:39:04 generic kernel: ugen_ioctl_post: error=3D-3Mar 20 14:39:04 generic kernel: ugen_ctrl_write_callback: actlen=3D0, afr= ames=3D0
Mar 20 14:39:04 generic kernel: ugen_ctrl_write_callback: actle= n=3D697, aframes=3D1
Mar 20 14:39:04 generic kernel: ugen_close: flag=3D= 0x402 pid=3D1337 name=3Dc-file-to-printer
Mar 20 14:39:04 generic kernel= : ugen_close: no FIFOs
Mar 20 14:39:10 generic kernel: ugen_open: flag= =3D0x402 pid=3D1338 name=3Dc-file-to-printer
Mar 20 14:39:10 generic ker= nel: ugen_ioctl: cmd=3D0x402c7413
Mar 20 14:39:10 generic kernel: ugen_i= octl: error=3D-3
Mar 20 14:39:10 generic kernel: ugen_ioctl_post: cmd=3D= 0x402c7413
Mar 20 14:39:10 generic kernel: ugen_ioctl_post: error=3D-3Mar 20 14:39:10 generic kernel: ugen_ctrl_write_callback: actlen=3D0, afr= ames=3D0
Mar 20 14:39:10 generic kernel: ugen_ctrl_write_callback: actle= n=3D697, aframes=3D1
Mar 20 14:39:10 generic kernel: ugen_close: flag=3D= 0x402 pid=3D1338 name=3Dc-file-to-printer
Mar 20 14:39:10 generic kernel= : ugen_close: no FIFOs
Mar 20 14:39:15 generic kernel: ugen_open: flag= =3D0x402 pid=3D1339 name=3Dc-file-to-printer
Mar 20 14:39:15 generic ker= nel: ugen_ioctl: cmd=3D0x402c7413
Mar 20 14:39:15 generic kernel: ugen_i= octl: error=3D-3
Mar 20 14:39:15 generic kernel: ugen_ioctl_post: cmd=3D= 0x402c7413
Mar 20 14:39:15 generic kernel: ugen_ioctl_post: error=3D-3Mar 20 14:39:15 generic kernel: ugen_ctrl_write_callback: actlen=3D0, afr= ames=3D0
Mar 20 14:39:15 generic kernel: ugen_ctrl_write_callback: actle= n=3D56, aframes=3D1
Mar 20 14:39:15 generic kernel: ugen_write_clear_sta= ll_callback: f=3D0xffffa00016208d80: stall cleared
Mar 20 14:39:15 gener= ic kernel: ugen_ctrl_write_callback: actlen=3D56, aframes=3D1
Mar 20 14:= 39:15 generic kernel: ugen_close: flag=3D0x402 pid=3D1339 name=3Dc-file-to-= printer
Mar 20 14:39:15 generic kernel: ugen_close: no FIFOs
Mar 20 1= 4:39:49 generic login[1169]: ROOT LOGIN (root) ON ttyv3
Mar 20 14:40:40 = generic kernel: ugen_open: flag=3D0x402 pid=3D1346 name=3Dc-file-to-printer=
Mar 20 14:40:40 generic kernel: ugen_ioctl: cmd=3D0x402c7413
Mar 20 = 14:40:40 generic kernel: ugen_ioctl: error=3D-3
Mar 20 14:40:40 generic = kernel: ugen_ioctl_post: cmd=3D0x402c7413
Mar 20 14:40:40 generic kernel= : ugen_ioctl_post: error=3D-3
Mar 20 14:40:40 generic kernel: ugen_ctrl_= write_callback: actlen=3D0, aframes=3D0
Mar 20 14:40:40 generic kernel: = ugen_ctrl_write_callback: actlen=3D72, aframes=3D1
Mar 20 14:40:40 gener= ic kernel: ugen_write_clear_stall_callback: f=3D0xffffa00016208d80: stall c= leared
Mar 20 14:40:40 generic kernel: ugen_ctrl_write_callback: actlen= =3D72, aframes=3D1
Mar 20 14:40:40 generic kernel: ugen_close: flag=3D0x= 402 pid=3D1346 name=3Dc-file-to-printer
Mar 20 14:40:40 generic kernel: = ugen_close: no FIFOs
Mar 20 14:40:51 generic kernel: ugen_open: flag=3D0= x402 pid=3D1347 name=3Dc-file-to-printer
Mar 20 14:40:51 generic kernel:= ugen_ioctl: cmd=3D0x402c7413
Mar 20 14:40:51 generic kernel: ugen_ioctl= : error=3D-3
Mar 20 14:40:51 generic kernel: ugen_ioctl_post: cmd=3D0x40= 2c7413
Mar 20 14:40:51 generic kernel: ugen_ioctl_post: error=3D-3
Ma= r 20 14:40:51 generic kernel: ugen_ctrl_write_callback: actlen=3D0, aframes= =3D0
Mar 20 14:40:51 generic kernel: ugen_ctrl_write_callback: actlen=3D= 697, aframes=3D1
Mar 20 14:40:51 generic kernel: ugen_close: flag=3D0x40= 2 pid=3D1347 name=3Dc-file-to-printer
Mar 20 14:40:51 generic kernel: ug= en_close: no FIFOs

Thanks,
Archimedes

=C2=A0

--0000000000009c35fa05daa52853--