Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2713290lqz; Wed, 3 Apr 2024 06:39:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXA8RoDox5PqR/klPt3OFlv5rZkzaCpbppABHfXCOSbrsCIgV8h5EhhLz6DL0IFOzo1Rt69iZ2irnqPZmIRSaLbPGH9jaSna3gX4QUhkw== X-Google-Smtp-Source: AGHT+IF5MqKM7Vw0iwWb4cYIvcH1N7h2q2//JcIOvoxqeng0qQ6/dCS6mTk81faldFvA1/87J0Ns X-Received: by 2002:a17:90a:7d08:b0:2a0:3c38:5e2e with SMTP id g8-20020a17090a7d0800b002a03c385e2emr11403067pjl.45.1712151569678; Wed, 03 Apr 2024 06:39:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712151569; cv=pass; d=google.com; s=arc-20160816; b=GusG8mZPmXwT/K6ObAPFjbXeb9wcagYh7IlzAXaQcz6VDdAHIbxUqe28Iie4ujLSJp JMZkFnqhNTu8o0dmyvYBvS6Aliah1dsfUiZgnoMHwb28JQMFtWeFH7W688NbAdwvY1lk tAnBQ88vMgP6c7TiXAMmu+bS6t/hnK3oDhZZaB7lDB2iRKitfeLOmKTUxA2VFVIBw06L MGnyjxFVZyeNSx6dx+Lno62WIofb5H/2RLXOwC00DcqaQt0c4KJMbZnyD7RMbHaiv13g TXbyeq/J430v3JzVeMcjkVehyEkDZPOmwB4vlGV8Ge5A1PP3Qkw4Mvu8p0POYz+uKHXN zXHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=e2ZW5YwM7LCMfQsqtCaAg0KPR2u5p7sL5BpamhWD0Zs=; fh=dxyYPpkapqCOA1S5SgZom3TPm3P8btSYsBdeOjtrOcE=; b=KKQWXRzAfnB8VwWsgWKN9RwMj+6YQ6FP/YNAJWgDCHNFyL5FTdIoprB9c+7RfKlWNw N1/aZhVZLuCb44L1I8QvNlkILepLEAxl6BEQevZdDjxHa3FNlO2B/FI0Vib3/o/1FlIr Z267Nw+MIYIC/Xphyyj9P83KoguTD48+Lkn1Rh3sw1bxGNWuTKcx/Ot88I3HamV55Ftz ju4/NF/2uxRtshIM4kmsmFg0ZE+gG4VVwtDoiD61veTYsYr03mwcN5doFhjrAi357bT5 q2ZY2dSuq01Y9tHEiLdbd+tmbsh2cVFAyuLrL8gkUYmtcPdBkRKK14goNt8H7AUI3Ow8 6w6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=UjXIGxpl; arc=pass (i=1 spf=pass spfdomain=ixit.cz dkim=pass dkdomain=ixit.cz dmarc=pass fromdomain=ixit.cz); spf=pass (google.com: domain of linux-kernel+bounces-129853-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i22-20020a17090acf9600b002a204803722si13319484pju.85.2024.04.03.06.39.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 06:39:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129853-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=UjXIGxpl; arc=pass (i=1 spf=pass spfdomain=ixit.cz dkim=pass dkdomain=ixit.cz dmarc=pass fromdomain=ixit.cz); spf=pass (google.com: domain of linux-kernel+bounces-129853-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 526DD282D2C for ; Wed, 3 Apr 2024 13:37:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01D811487C9; Wed, 3 Apr 2024 13:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ixit.cz header.i=@ixit.cz header.b="UjXIGxpl" Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B3DC7143863; Wed, 3 Apr 2024 13:37:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.177.23.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712151423; cv=none; b=IWT4vCsPkBq7xEvay72SCekFv2JRaFeY1DzZPEtxwcA5ynmg/iQys87xJ+d9TBInwWOPEBfwB8vA3eM3/AR3FLr4/CUcNpyISrmyJfNjLoKX+2z2jL8nUwasBzZtZyK6EZ4w5kiHC0UMVDsch/wtcwRHEQycDrsWog3YYADPS1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712151423; c=relaxed/simple; bh=+F4Hbvp1IyArx78p/Dg0KT/m9+3bN5tBBIOYAx858GQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WdompYbX0fjHIQan5aMOMp8zl5FYixjau1m7lfglA1yc0KAk+ylNMX5Pa5NZDAbEMbogMzPqTDVzNQ1ttsteYHUvCqJUJLiJlUXwU8TB4ueIgLKTuC8nuVvNnau2KXdze/VavGHk0rOv3YDPXR6B3GkJaHjRwyHVcDaQAOUiEkk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ixit.cz; spf=pass smtp.mailfrom=ixit.cz; dkim=pass (1024-bit key) header.d=ixit.cz header.i=@ixit.cz header.b=UjXIGxpl; arc=none smtp.client-ip=89.177.23.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ixit.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ixit.cz Received: from [10.0.0.200] (unknown [10.0.0.1]) (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 ixit.cz (Postfix) with ESMTPSA id 7C943165BA4; Wed, 3 Apr 2024 15:27:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1712150845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e2ZW5YwM7LCMfQsqtCaAg0KPR2u5p7sL5BpamhWD0Zs=; b=UjXIGxplfEY9FH0fb8RMu4TKXmxLnAT/xg1bZEyy94n+G5PuNOUhFEw7xL9mrxlUHklnOq Ji/EjmqvynX8gm9Kzs6vGPmn6/7uQtTNzDlLDA6/clhmYEFOEW5iUT8QszLuAVd923mH72 84udrN1HOT4tEU8tRkZvp+Mqr2LkNIE= Message-ID: Date: Wed, 3 Apr 2024 15:27:25 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH v6 0/2] usb: serial: add support for CH348 To: Corentin LABBE , Nicolas Frattaroli Cc: gregkh@linuxfoundation.org, johan@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <20230628133834.1527941-1-clabbe@baylibre.com> <2595072.9XhBIDAVAK@archbook> Content-Language: en-US From: David Heidelberg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Corentin, is there chance you find some time to upstream this? In the worst case I would try to find some time to look into this, so it would have chance to get merged. Thanks David On 20/11/2023 13:29, Corentin LABBE wrote: > Le Wed, Aug 30, 2023 at 07:43:03PM +0200, Nicolas Frattaroli a écrit : >> On Mittwoch, 28. Juni 2023 15:38:32 CEST Corentin Labbe wrote: >>> Hello >>> >>> The CH348 is an octo serial to USB adapter. >>> The following patch adds a driver for supporting it. >>> Since there is no public datasheet, unfortunatly it remains some magic values. >>> >>> It was tested with a large range of baud from 1200 to 1500000 and used with >>> success in one of our kernel CI testlab. >>> >>> Regards >>> >>> [...] >> Hello, >> >> thank you for your work on this. I recently made myself a CH348 >> board and used this patchset with a small test application[1] >> to see how it performs. Specifically, I ran this on an RK3566 >> single board computer, connecting one serial adapter to the >> other, with the test as follows: >> >> ./serialtest /dev/ttyUSB0 9600 # UART0 of 1st CH348 board >> ./serialtest /dev/ttyUSB8 9600 # UART0 of 2nd CH348 board >> >> One problem I've noticed is that writes to the tty fd never >> seem to block. On two CH340 adapters I have, they do seem to >> block, whereas here, you can see from the statistics at the >> end that magnitudes more bytes were written than read, with >> seemingly most of them being discarded. From my reading of >> the termios parameters I set, this shouldn't be the case, >> right? >> >> You can see from the error percentage that it gets less >> bad as you increase the serial baudrate; I've tested up >> to 6 mbaud like this. I assume that's because less written >> bytes get discarded. >> >> Any ideas on whether I'm relying on weird driver behaviour >> with the blocking here or if this driver actually has a >> defect whereby it never signals to userspace that less >> bytes were written than have been submitted? >> >> Kind regards, >> Nicolas Frattaroli >> >> [1]: https://github.com/CounterPillow/serialtest >> > Hello > > Sorry for the very long delay of the answer. > I have reproduced the problem on my board. > My reproducer is https://github.com/montjoie/lava-tests/blob/master/test2a2.py > > This problem seems to be here since the v1 of my patchset. > The vendor driver seems to work so it is not an hardware problem. > > I have no clue at the moment, it is hard to diff with vendor driver since it create tty directly and do not use usbserial. > > Regards -- David Heidelberg