From nobody Wed Oct 5 16:31:26 2022 X-Original-To: hardware@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 4MjKpJ0NC9z4V8WC; Wed, 5 Oct 2022 16:31:36 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) Received: from mailout5.lrau.net (mailout5.lrau.net [IPv6:2a05:bec0:26:5::73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailout5.lrau.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MjKpH33jBz3pQ8; Wed, 5 Oct 2022 16:31:35 +0000 (UTC) (envelope-from Axel.Rau@Chaos1.DE) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chaos1.de; s=2022; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type :Message-Id:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=h00AoV1Exprvu501pO7bCen2LyI1QGRFf2xFSgcrh+o=; b=DqDEFfdgEb8tsZdt+9boeby0ex seoFRK41cNsfD2E0ArfmmbYGVCCzbpOwI6PHU7p6g7GiXH4KnaLZWkHgTLwZK2G6998+P4c/P7o4W prwoVX7KALnqDuSrNujYeN3xN4ZkHTaoFJ++i8ajgpOuMhIYGSw/fPKy2h4BJ8CWwd4KmD5akVvw1 vEXldhMg3pmQrlfPsRW4DFwoA2OpbJ9mMjHw/Sqpb+lurEKvnQJPlObwXRb6eg9zI05OjYe24ofQJ UYFt6bh5fD/lNUakaUtepKWy15DbbVRWOzaC3FVXYzPbfHbvQdH8VU8eTXCRuqAdlYAf/WcXEePB/ nPF+vHDg==; Received: from [2a05:bec0:26:5::74] (helo=imap5.lrau.net) by mailout5.lrau.net with esmtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1og7Iy-000N98-7L; Wed, 05 Oct 2022 16:31:32 +0000 Received: from Axel.Rau@Chaos1.DE by imap5.lrau.net (Archiveopteryx 3.2.0) with esmtpsa id 1664987487-11466-8168/7/189; Wed, 5 Oct 2022 16:31:27 +0000 From: Axel Rau Message-Id: <23E6D546-DAEF-468D-AE40-752EEB279C8A@Chaos1.DE> Content-Type: multipart/alternative; boundary="Apple-Mail=_31A3D805-29A8-41CD-AB61-E08C5B1687EF" List-Id: General discussion of FreeBSD hardware List-Archive: https://lists.freebsd.org/archives/freebsd-hardware List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hardware@freebsd.org Mime-Version: 1.0 Subject: Re: Accessing I2C-Bus via ELV USB-I2C Date: Wed, 5 Oct 2022 18:31:26 +0200 In-Reply-To: Cc: hardware@freebsd.org, freebsd-hackers@freebsd.org To: Hans Petter Selasky References: <996df5c0-ffa7-f1bf-a9e2-6dd47d7b49e6@Chaos1.DE> <35D556D7-56EC-4295-93D6-80A4CFE6DCE9@Chaos1.DE> <37c55124-5cd5-6fd1-ca46-9265ebe47b18@selasky.org> <602324D8-515B-4061-8689-5638E9A82759@Chaos1.DE> <2cb6203f-03da-9a05-24a5-c851f1424503@selasky.org> <490EBA38-E103-4DC1-8A42-E16A8279980D@Chaos1.DE> <017C6EBE-910E-43E7-AAF7-A3D9ECE85EFF@Chaos1.DE> <84c5bc0b-1c72-d50d-6289-ac91a0878bd1@selasky.org> <752FCC61-496D-40C5-8A99-143F15B1EE84@Chaos1.DE> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4MjKpH33jBz3pQ8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=chaos1.de header.s=2022 header.b=DqDEFfdg; dmarc=none; spf=none (mx1.freebsd.org: domain of Axel.Rau@Chaos1.DE has no SPF policy when checking 2a05:bec0:26:5::73) smtp.mailfrom=Axel.Rau@Chaos1.DE X-Spamd-Result: default: False [-3.99 / 15.00]; DWL_DNSWL_LOW(-1.00)[chaos1.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.994]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_LOW(-0.20)[2a05:bec0:26:5::73:from,2a05:bec0:26:5::74:received]; R_DKIM_ALLOW(-0.20)[chaos1.de:s=2022]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_NA(0.00)[no SPF record]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:197071, ipnet:2a05:bec0::/29, country:DE]; MLMMJ_DEST(0.00)[hardware@freebsd.org,freebsd-hackers@freebsd.org]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[chaos1.de:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[chaos1.de]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_31A3D805-29A8-41CD-AB61-E08C5B1687EF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 05.10.2022 um 16:46 schrieb Hans Petter Selasky : >=20 > On 10/5/22 13:55, Axel Rau wrote: >> If I do not want to touch th USB stuff, can I get the same effect by = close/open of the serial device? >=20 > The uslcom driver only does this right after attach, in 13-stable and = 14-main. >=20 > Does the attached patch make any difference for you? >=20 > --HPS > <0001-uslcom-4-Clear-stall-at-every-open.patch> As this is a production server, I try to avoid reboots. Meanwhile, I have inserted a read loop which eats the fragments and allows the following status query to get a clean response. With this patch, recovery seems to work. Additionally I have eliminated a hub and connected the device directly = to a port. Hopefully this will stop the frequent `/dev/cuaU0: Bus connection = lost`events. Thanks for your time, Axel =2D-- PGP-Key: CDE74120 =E2=98=80 computing @ chaos claudius --Apple-Mail=_31A3D805-29A8-41CD-AB61-E08C5B1687EF Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
=

= Am 05.10.2022 um 16:46 schrieb Hans Petter Selasky <hps@selasky.org>:

On 10/5/22 = 13:55, Axel Rau wrote:
If I do not want to touch th USB stuff, can I get the same effect by = close/open of the serial device?

The uslcom driver only does this right after attach, in 13-stable and = 14-main.

Does the attached patch make any = difference for you?

--HPS
<0001-u= slcom-4-Clear-stall-at-every-open.patch>
As this is a production server, I try to avoid reboots.

Meanwhile, I have = inserted a read loop which eats the fragments
and = allows the following status query to get a clean response.
With this patch, recovery seems to work.
=
Additionally I have eliminated a = hub and connected the device directly to a port.
Hop= efully this will stop the frequent `/dev/cuaU0: Bus connection lost`event= s.

Thanks for = your time,
Axel
---
PGP-Key: CDE74120  =E2=98=80 =  computing @ chaos claudius

--Apple-Mail=_31A3D805-29A8-41CD-AB61-E08C5B1687EF--