Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp24104122rwd; Sat, 1 Jul 2023 12:40:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Tiz7K4MIRrG5HOQl54a444UtgmQXjb8wulOvY1oNLLu10E3qExszzIF9KGK8knNRovDq+ X-Received: by 2002:a05:6a20:5499:b0:127:3c6e:fc83 with SMTP id i25-20020a056a20549900b001273c6efc83mr8498411pzk.42.1688240422957; Sat, 01 Jul 2023 12:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688240422; cv=none; d=google.com; s=arc-20160816; b=NFbO/nlE2os3nIKAN/vhk+SZzA3tLjqOeleaNsdIGtwVtEl2O4UOOv2I+7EQxPjyI2 ReN5CG52uoAuMtjZ/sD/aTRxcLABkfYQtCgD/lsA9rrEyzBqe084qHvldpyqEDE3N1sL KEC0dRUo4WzWphkrCAShQWL0xr65O33ThMxr3kiEgvMQF7HzTcqj73a6tdoY2nRMaOJv O0hb1WEIJ73CdNuAK8X8v/SJ8/5569b2H2VUr1+1aTgopbOVaFdbCNTQ0Rp4lW5HqG79 zOtDL9IwQQBlmNM1wZQMOFGHtvdHSVt3cN/9RDBz+L4eAKq+JlZKCsdnstvbK8W6D6Lh ScEA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nzN5M0Aj6HckyCdKJygWarn8tMUOVYCV7PJvrCf93Gs=; fh=Ao8julauXPdKyLUxJw6Tsx0DwTj2Fh0E1pXxcZkBvM8=; b=GQ9QYWS6IOsUvM0MMjUcUBBmiUSfT45RSxg4zcUa6S+QJxjzces0WtrWd9RyDHW18a 5UPrMRtoCTL/of8Fj7iQlzZIczr1miz8FlB2hGYZizT26KKVdvP3GF6yYEpqdbJ0ZKcO BtGNM5CWBSg5S2+VQe/YGNUsOit+GWntx2GoUOH8ycS/1oLVGYa4QPG74tKw4w/+ESvY lZQTU5h1TBVmRKgqwY9rVu/IkWRH8UFC4+s2uPBbyA8EJvdlBjAxBWF9zjH/jnr9Fy5z wyWxk6qxJYBIsKIVfrX+E8ganV6391CYPNRbO8CR55ro7rgL/UceAOkbHUj9CoDAYI0T 9d4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=dmSlowOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w23-20020a63fb57000000b0055397736c02si15310563pgj.842.2023.07.01.12.40.10; Sat, 01 Jul 2023 12:40:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=dmSlowOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbjGATQX (ORCPT + 99 others); Sat, 1 Jul 2023 15:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjGATQW (ORCPT ); Sat, 1 Jul 2023 15:16:22 -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 39A411710 for ; Sat, 1 Jul 2023 12:16:14 -0700 (PDT) Received: from [10.0.0.182] (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 DF2F9160365; Sat, 1 Jul 2023 21:16:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1688238969; 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=nzN5M0Aj6HckyCdKJygWarn8tMUOVYCV7PJvrCf93Gs=; b=dmSlowOWXMhjTtOpvn/TI43Uht6K3UcEJhis9/3hgjgV8oMX90x2Og8ezCDsKzv2cwBBqQ OeNkUJbnFp6yliIibhsBSnkLW6gBq4X5W0q9eNMff1OqR4Kzf+lLi4CvT//6wpXTbcGePr qwdVvGZRU84Mh/L8LRQ3fkE8IhqTpSI= Message-ID: <3a9041c0-6ae2-4231-2a72-32212ff12f16@ixit.cz> Date: Sat, 1 Jul 2023 21:16:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/2] usb: serial: add support for CH348 Content-Language: en-US To: Corentin Labbe Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, johan@kernel.org References: <20230628133834.1527941-1-clabbe@baylibre.com> From: David Heidelberg In-Reply-To: <20230628133834.1527941-1-clabbe@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC,T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR,T_SPF_TEMPERROR, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested-by: David Heidelberg Reviewed-by: David Heidelberg Thank you On 28/06/2023 15:38, 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 > > Changes since v1: > - use a data structure for encoding/decoding messages. > - check if needed endpoints exists > - fix URB leak in ch348_allocate_status_read error case > - test for maximum baud rate as stated by datasheet > > Changes since v2: > - specify ch348_rxbuf data length > - Use correct speed_t dwDTERate instead of __le32 > - test for maximum baud rate supported according to datasheet > - Use a define for CH348_TX_HDRSIZE > > Changes since v3 > - Fixed all reported problem from https://lore.kernel.org/lkml/Y5NDwEakGJbmB6+b@Red/T/#mb6234d0427cfdabf412190565e215995a41482dd > Mostly reworked the endpoint mux to be the same than mx_uport > > Changes since v4: > - The V4 was sent against stable and next have ch348_set_termios ktermios > parameter const that I forgot to change > > Changes since v5: > - Fixed all reported problem from https://lore.kernel.org/lkml/20230106135338.643951-1-clabbe@baylibre.com/T/#m044aab24dfb652ea34aa06f8ef704da9d6a2e036 > - Major change is dropping of all status handling which was unused. > It will be probably necessary to bring it back when using GPIO. > This will be done when I will finish my next devboard. > > Corentin Labbe (2): > usb: serial: add support for CH348 > usb: serial: add myself as maintainer of CH348 > > MAINTAINERS | 5 + > drivers/usb/serial/Kconfig | 9 + > drivers/usb/serial/Makefile | 1 + > drivers/usb/serial/ch348.c | 491 ++++++++++++++++++++++++++++++++++++ > 4 files changed, 506 insertions(+) > create mode 100644 drivers/usb/serial/ch348.c > -- David Heidelberg Consultant Software Engineer