Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2696781rdh; Wed, 27 Sep 2023 09:56:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGST/wQYQaI4ndVjVJnBluiRr/GJUPWlqPN0f8kO55mcNy5bOJHmEDuVp9Epamj2AUGjf2x X-Received: by 2002:a17:90a:ce02:b0:274:8310:d097 with SMTP id f2-20020a17090ace0200b002748310d097mr2200890pju.11.1695833788635; Wed, 27 Sep 2023 09:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695833788; cv=none; d=google.com; s=arc-20160816; b=jx/I/GZyU3Nq/cvRVVUzW85pM6pHDa/LRBD/b44N40l6vwTZP2SyeIlInf1HO6JPV1 0v04tbLMD2e4YrylbVBtfqeRndsVdgsXBNRCYKdO29Lg7SiltPg20ceaJNk1z1KB+Imj S4mf7HPhGXZtWtbvcWeOg5hM4uX8dcIaOj+SC8fiY7qAJrCD3cTNETrEgdZCed8FPcHI dm9UidqFGESdpYC6s8JcsvECDADJ+CFNQ6AGNmZQ0TqoUgxBbXhQinfeWobRln7v0ukl Uad44zPIqRtHRv8LWzySj+WjaoXTw684c5sakOmRliY323XufAdh42ggA/qvwgacqP6E eApg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:content-language:references:cc:to:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=3Cdq5REI7iGI0Vko+4TAl0TC/MrR+Cd3aFhQmSjwwlk=; fh=hKtO0UYBmffDSoovBS/TupqTb2xpI0e8xdEVlh2EmpM=; b=oJGT/rWclqP9Uy3MtlMpLPTuBap4tCRj9oEwkODYyzke62XRUtL4QBjgf6/HgQLGP+ Uh94Vtxdwosk7YDaATeL5sb6s1P5HyKyB8oKcMgbAOucgBZrzdsj1ZCzUDmP4WN0xVB9 EKZ/Ch5Mn8W6tFxlzc0FR1L5kFYYLX6/OAS37QsrqHgbt9UqU5XoMEIRdOyByn7moAsb OAkV70DNx1sfLwFbIkioLtecfZDeKT7HrZHrcYMoOUk2B/UEQO6FPuTYGc3+ME3Hjat/ 0LnvHXEoo7eiYk5CEsF6+IaYOuhRRm9qnmrfo3js7o0BHu92sr7BsC2CN4AgU8VZvICj 1b5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=Go+aMeH9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id gd22-20020a17090b0fd600b00271ae22eea7si17700222pjb.117.2023.09.27.09.56.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 09:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=Go+aMeH9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 611EF81F88C7; Wed, 27 Sep 2023 05:09:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231425AbjI0MJf (ORCPT + 99 others); Wed, 27 Sep 2023 08:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjI0MJe (ORCPT ); Wed, 27 Sep 2023 08:09:34 -0400 Received: from ixit.cz (ip-89-177-23-149.bb.vodafone.cz [89.177.23.149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B91C8BE; Wed, 27 Sep 2023 05:09:31 -0700 (PDT) Received: from [192.168.2.126] (unknown [103.206.135.194]) (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 C1FF81602AB; Wed, 27 Sep 2023 14:09:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1695816569; 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:autocrypt:autocrypt; bh=3Cdq5REI7iGI0Vko+4TAl0TC/MrR+Cd3aFhQmSjwwlk=; b=Go+aMeH9yKXf915D9DeW40d2sVLX+OiA4NNHtFRa4HADR0ENMIiTChuriRMNkiXs29+niS 2ZBurtUSNpUGGTAtS8pQv27Yy6IW+8aX0X1CLj/D1vFORJkgRstmce2/DfVC1cVJamDsC2 CttmK0zG6+jJnL9R5JpB76PTv/2sOMY= Message-ID: <023e0d6d-a896-448c-80b1-0c17ef5e810c@ixit.cz> Date: Wed, 27 Sep 2023 17:39:15 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/2] usb: serial: add support for CH348 To: Nicolas Frattaroli , gregkh@linuxfoundation.org, johan@kernel.org, Corentin Labbe Cc: 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 Autocrypt: addr=david@ixit.cz; keydata= xs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bhXS164iRB7rBZk6ZRVgCz3V6 hhhjkipYvpJ/fpjXNsVL8jvel1mYNf0a46T4QQDQx4KQj0zXJbC2fFikAtu1AULktF4iEXEI rSjFoqhd4euZ+QARAQABwsF8BBgBCAAmFiEE13oJz+7cK71TpwR0YAI/xNNJIHIFAl5v1x4C GwwFCQeEzgAACgkQYAI/xNNJIHJTZg/+NqA4kGauw0qAR1bm2VVaDJjajjJerDLr/uMEgBCo DXiDu0obZ3XwMDe2ohXxV4L875B7q/lzgWR/YrJNU3CkMFknPZl++gVhkBZ0xQhMs0HsIEgD TKgX3bKCIy7niHVMq6S8tYs2eTnK6NEQFWr2Vq6fAT8NjYMhaAbIMvZfz/hCkwzWD5QTejZi ulP6Cl4AVa4mun6FzMpHAcXk/NdSgWYO0f7AtW+KzIKKrcT2HcDBGM2OaPuEajHFX/1lyyRO LiGcgz9E/5WfzvaBrqWy6CdIzJWtGsOKWMyjry5227UOwqPTqIWAs10XgaYsevES0ljDDA0y wX/adCrlOaNQaBcB/bIKjrrsHg+5XnanET7PbB75cDmd0AT0DNeCs/AZXDn2O7gKmPq3GokU zCw7l/b5I49Zp1zybEwVy+TYC0e/d05geyjQN7e2i0RcElGaHQ+82iRIJD3cvDfrk4+HPzeE 8udw5/rKxFMHhti1wgtklyJBc64JK2vgB6xJz9Zc4WoNnifc8QjyhsQ7K0UI9jykBXrb1ZZO DYlcrAqh9Sx4vNTmdi6pJWSsrhDtfmDIw81GIW5pc0QpZPqGeKMi5xEU8se5fQ21DuE5LRKF Zd4Uq64igWvLAgHIcJHgNbc5BruuZm9p1+S5SfQGfnOYxJM1PkY/E32H52iV/Babj30= In-Reply-To: <2595072.9XhBIDAVAK@archbook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 27 Sep 2023 05:09:43 -0700 (PDT) Hello Corentin, light reminder about this patchset and Nicolas question :) Thank you David On 30/08/2023 23:13, Nicolas Frattaroli wrote: > 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 > > -- David Heidelberg Certified Linux Magician