From owner-freebsd-usb@freebsd.org Wed Mar 3 08:00:30 2021 Return-Path: Delivered-To: freebsd-usb@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28EE7561D99; Wed, 3 Mar 2021 08:00:30 +0000 (UTC) (envelope-from matpockuh@gmail.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr5yj3dF9z4nwY; Wed, 3 Mar 2021 08:00:29 +0000 (UTC) (envelope-from matpockuh@gmail.com) Received: by mail-ed1-x532.google.com with SMTP id h10so28602045edl.6; Wed, 03 Mar 2021 00:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kFfWZBXA3XWtzqGe4D77xTYpbtu5MmK9VKOPGs41E0U=; b=eS/jtusouMrxBAcYUn/shd/K2/Yx0E5pt16qruMdaHUiHVx2McAKDDWeytCgqK90sp SADUsPecL1dynPLV2P0JnX8pUt94+7MWWuPZX7RF+NV5GpzcosU//cwuW9vsPt2ILiCV Ef0/qJT55YhLQq3mj67fac0BMi8LZG7upR2BXhIKT38k1mTqCLr3ulelPLVlvpKOJUTd 5Mz7HMPL2PClTR7v+kltXreXauj5gxzVXxJgS8oZD0rPs8+FAms9WDU1125EM7qY8XbP CqTNjzugrGE8w/CxXZGUlBTqxaLHlcSlpRS+OK6pUXeBlNVjDdnf6V9XfHLc/03wBnKz Uclw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kFfWZBXA3XWtzqGe4D77xTYpbtu5MmK9VKOPGs41E0U=; b=ToIrW7efKzvFpoMPB7Nte+WvsD25ZjpKwSPDN7nR6aTBcGbDuh91rKgte6+PBuTfLj HoVQDao+KbijRDX8v11pbCtxyC/xSC/nv4GNVmkoahVev2EK4k65qxs/AgFMjrrtFs+F 6mfg7VmHZnBn5k2jomRs6vOG9v6RU75sIC71raa0iJD9nujQZaJ27aroOVU6jd9WQtaa DW+MU9Wj5iqZDOOgE1p3S5USLocmiMc/8WLjox4rc45jMCANPHi6ds6+TYRrHeLJvCDQ jcZxi2EpF8Yk7OqxDpZIKBr9W5xI4R/h2wudi42bM3avql0SKDT6JHadO95Ugz707UQY PFUA== X-Gm-Message-State: AOAM531q/33bBtZDT4Qe9K+kbnA7DwxgjM8oNEUogI28AzlJNiJt6HYQ ciMEpmHvRQaItzKJyfkJ6FJoN96He+LdbSeOq24juQ85Va8= X-Google-Smtp-Source: ABdhPJw2pyO8K53pu67Vb3+6fGY0Jht16QtA+4ltqv+ObNYpp6o9wxmvXIdEIc49zasW6YYlfmwHYA6NCWkOG1zMz7o= X-Received: by 2002:a50:eb97:: with SMTP id y23mr13080054edr.170.1614758427105; Wed, 03 Mar 2021 00:00:27 -0800 (PST) MIME-Version: 1.0 References: <83f7a6dd-5d7e-cfd2-e580-4db0c7134220@capeaugusta.com> <592ff8c3-a47f-30c2-4e09-1a11152715c8@FreeBSD.org> In-Reply-To: <592ff8c3-a47f-30c2-4e09-1a11152715c8@FreeBSD.org> From: KOT MATPOCKuH Date: Wed, 3 Mar 2021 11:00:04 +0300 Message-ID: Subject: Re: uchcom update To: Andriy Gapon Cc: freebsd-usb@freebsd.org, FreeBSD Current , freebsd-stable List X-Rspamd-Queue-Id: 4Dr5yj3dF9z4nwY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=eS/jtuso; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of matpockuh@gmail.com designates 2a00:1450:4864:20::532 as permitted sender) smtp.mailfrom=matpockuh@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::532:from]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::532:from:127.0.2.255]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::532:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-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]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-usb,freebsd-current,freebsd-stable]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Mailman-Approved-At: Wed, 03 Mar 2021 08:46:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 08:00:30 -0000 Thank You, Andriy! It solved the problem for me too. Also this can be applied without reboot via command: sysctl hw.usb.no_cs_fail=3D1 =D0=B2=D1=81, 28 =D1=84=D0=B5=D0=B2=D1=80. 2021 =D0=B3. =D0=B2 14:21, Andri= y Gapon : > On 28/02/2021 11:03, KOT MATPOCKuH wrote: > > Hello! > > > > I'm using FreeBSD 12.2-STABLE r368656 and got usb-to-rs232 with this > > controller. > > I see /dev/cuaU0 after plugging in adapter, I can attach to serial line > > using cu, but after sending any symbol to device I have device > reconnection: > > uchcom0 on uhub0 > > uchcom0: on usbus0 > > uchcom0: CH340 detected > > uchcom0: at uhub0, port 9, addr 17 (disconnected) > > uchcom0: detached > > uchcom0 on uhub0 > > uchcom0: on usbus0 > > uchcom0: CH340 detected > > I have this in my loader.conf: > > # Ignore result of "clear stall" (clearing halt on endpoints) > # CH340 USB<->RS232 requires this > # and it seems that Linux and Windows do this by default > hw.usb.no_cs_fail=3D1 > > I recall that without that tuning I had a similar problem. > > > =D0=B2=D1=82, 5 =D0=B8=D1=8E=D0=BD. 2018 =D0=B3. =D0=B2 15:05, Ian FREI= SLICH >: > > > >> On 05/22/2018 09:44 AM, Andriy Gapon wrote: > >>> Yesterday I committed some changes to uchcom (so far, only in CURRENT= ). > >>> Commits are r333997 - r334002. > >>> > >>> If you have a CH340/341 based USB<->RS232 adapter and it works for yo= u, > >> could > >>> you please test that it still does? > >>> If you tried your adapter in the past and it did not work, there is a > >> chance it > >>> might start working now. Could you please test that as well? > >> > >> ugen5.4: at usbus5, cfg=3D0 md=3DHOST sp= d=3DFULL > >> (12Mbps) pwr=3DON (96mA) > >> ugen5.4.0: uchcom0: > >> > >> It's not made it any worse. I'm not using this adapter by choice - it= 's > >> a USB to Maxim (Dallas) one-wire bus adapter. The manual used to stat= e > >> that these are possibly the worst chips ever. Is that still the > >> prevailing opinion? > > > -- > Andriy Gapon > --=20 MATPOCKuH