From nobody Thu Oct 6 11:56:06 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 4MjqfC5s5qz4V2Nv; Thu, 6 Oct 2022 11:56:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MjqfB0xn9z46ZV; Thu, 6 Oct 2022 11:56:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.155] (unknown [178.232.223.95]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5FA91260754; Thu, 6 Oct 2022 13:56:10 +0200 (CEST) Message-ID: <16b3de9c-7ee5-4c8e-e010-8fc5d9cfc3c4@selasky.org> Date: Thu, 6 Oct 2022 13:56:06 +0200 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: Accessing I2C-Bus via ELV USB-I2C Content-Language: en-US To: Axel Rau Cc: hardware@freebsd.org, freebsd-hackers@freebsd.org 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> <23E6D546-DAEF-468D-AE40-752EEB279C8A@Chaos1.DE> From: Hans Petter Selasky In-Reply-To: <23E6D546-DAEF-468D-AE40-752EEB279C8A@Chaos1.DE> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MjqfB0xn9z46ZV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,hardware@freebsd.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[selasky.org]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 10/5/22 18:31, Axel Rau wrote: > > >> Am 05.10.2022 um 16:46 schrieb Hans Petter Selasky : >> >> 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-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 > --- > PGP-Key: CDE74120 ☀ computing @ chaos claudius > > Hi, You just need to rebuild the uslcom.ko and kldunload it. make -C /usr/src/sys/modules/usb/uslcom all install KMODDIR=/boot/kernel Anyway, here you go: https://cgit.freebsd.org/src/commit/?id=9e0edafe92ad9fc6745ee4c4c58e45a49b9e7ed1 --HPS