Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3762598iog; Tue, 21 Jun 2022 05:35:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+C5Q28hET+PIogjiVXFEDPl3ZjgFfWYCYLowfVmzu4s32l4dfpkgV+a0F5rMqAk20mYJK X-Received: by 2002:a63:4a4e:0:b0:401:baa6:d695 with SMTP id j14-20020a634a4e000000b00401baa6d695mr27043867pgl.259.1655814959247; Tue, 21 Jun 2022 05:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655814959; cv=none; d=google.com; s=arc-20160816; b=B9i53haULfX99/XAlRtkXVMQZq072wuw1RovBAnp0pzw3PgnySKF3JUUGq5cbPMY0W y4Fe3IOCwG0Q5IT2dnhnxEfEznziieQHUV9sxRF4ADvUCDjEpqX346hnJUSmW+SxLpct 7wRpHPgvFo+9LGBPedw11vTpHWhOnqUoZBiLpynaCCZUnmpJx/2yaKqD4zNshm3eTpqs Jkbey8hU1kv/XlwtP9pdvE7vDY3L/WdzWkWagRtXe/dSsi5SZVdjWKDFmIqSVGBMUPP+ bLrmBCCgx4wlOHYFrY10eVk7YRaZuApgO0nRcAgZ4tVFZTmRdwlP1Y3UaddrEEyT0wa8 jyRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tzH6Y8j4nnLjSYfPDQ422HNnQFHE/9n7H+N8jrsvAos=; b=HJiNbaPrgZrdKFM4HGXPJ85yP6mD/xEnohhfyh1tQlAEf49OH292GWIIghGkTdEtm2 N6y8JJ3rW0wcIaYRD4+fPU/Na9QvAuBfkeaUnCpRgGH5h9V/gCjS/wWMY2SjQRIhgy/B g+cBjRWInkMKLvuORSIuWwuaVlX/UhEvrxm63steUHAIqRrzkrekqQjerzwqUmKTxPu9 KhkTAxYbr17/6IPthqG6dxtiVBHuhwSdjUG7aOo+fKYIwOAqASpHG9vW9b898KOE32m+ g3BTCkxGDJGK2ZiHajn59/Ra8cPJnG6sbncHBr/FUH5Ncin6pRsw5xdnOjf6GtLXqdx3 rFaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PK2Wdq5B; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a056a00170d00b00518984386ebsi22832806pfc.37.2022.06.21.05.35.46; Tue, 21 Jun 2022 05:35:59 -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=@kernel.org header.s=k20201202 header.b=PK2Wdq5B; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350293AbiFUMJj (ORCPT + 99 others); Tue, 21 Jun 2022 08:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbiFUMJf (ORCPT ); Tue, 21 Jun 2022 08:09:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8484A2B255; Tue, 21 Jun 2022 05:09:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 26C79B817CA; Tue, 21 Jun 2022 12:09:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D838EC3411C; Tue, 21 Jun 2022 12:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655813369; bh=eef/EY+Oezc3OdkNH+Ii4RPJEch8/C2LY59fJTV0Arg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PK2Wdq5BAW6HOZpA5/ZmNYTX2w7jgqvUCSScw6GKqbJJ8jOa/PGSkBo18gypQraHP 2h8kfVvXR34FCmq5eSBm+Z8+LqxF6D/Lu+Te69FWM0vpwudd+3/5tp6dGvak29CPM4 UHmJw89VARFGxXsuKMgnTSNU9gesxKruRKSTb6zjIlULVM0S6B89a7G6W6dzm9h9Th 5YlcgaHzOYHcVowMdJ+QeOvj977mRyKF4Fhah6wfOhdQ5muHFi4AfmNXGalYEOx2o2 d6NXGCCeVKZsJK8yAUxzYlMXFIDBaqkK9PFGqnKDctZVLUrbuaLG6nsOKrmhdOc9mC WZ7mMf995SU2g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o3ch9-0006ET-J7; Tue, 21 Jun 2022 14:09:24 +0200 Date: Tue, 21 Jun 2022 14:09:23 +0200 From: Johan Hovold To: Yonglin Tan Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] USB: serial: option: add Quectel EM05-G modem Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jun 21, 2022 at 07:59:43PM +0800, Yonglin Tan wrote: > The EM05-G modem has 2 USB configurations that are configurable via the AT > command AT+QCFG="usbnet",[ 0 | 2 ] which make the modem enumerate with > the following interfaces, respectively: > > "RMNET" : AT + DIAG + NMEA + Modem + QMI > "MBIM" : MBIM + AT + DIAG + NMEA + Modem > > The detailed description of the USB configuration for each mode as follows: > > RMNET Mode > -------------- > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=2c7c ProdID=030a Rev= 3.18 > S: Manufacturer=Quectel > S: Product=Quectel EM05-G > C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA > I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) > E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms > E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > MBIM Mode > -------------- > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=2c7c ProdID=030a Rev= 3.18 > S: Manufacturer=Quectel > S: Product=Quectel EM05-G > C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA > A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 > I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option > E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim > E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=32ms > I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim > I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim > E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > Signed-off-by: Yonglin Tan > --- > V2: > 1. Add the description of the usb interface configurations. > 2. Add QMI Interface description. > > V3: > 1. Move the entry to where the other Quectel entries with numerical PIDs are. > 2. Define the macro and remove the comment. I meant to just move the entry where the other entries that use numerical PIDs (instead of defines) are. But this works too. > drivers/usb/serial/option.c | 3 +++ > 1 file changed, 3 insertions(+) > mode change 100644 => 100755 drivers/usb/serial/option.c You're still trying to change the permission bits of the file here, though. You need to figure out why this happens yourself. But I can't accept the patch before this is fixed. You could try chmod 644 before committing, but that may not be sufficient. > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c > old mode 100644 > new mode 100755 > index ed1e50d..7b52865 > --- a/drivers/usb/serial/option.c > +++ b/drivers/usb/serial/option.c > @@ -252,6 +252,7 @@ static void option_instat_callback(struct urb *urb); > #define QUECTEL_PRODUCT_EG95 0x0195 > #define QUECTEL_PRODUCT_BG96 0x0296 > #define QUECTEL_PRODUCT_EP06 0x0306 > +#define QUECTEL_PRODUCT_EM05G 0x030a > #define QUECTEL_PRODUCT_EM12 0x0512 > #define QUECTEL_PRODUCT_RM500Q 0x0800 > #define QUECTEL_PRODUCT_EC200S_CN 0x6002 > @@ -1134,6 +1135,8 @@ static const struct usb_device_id option_ids[] = { > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), > .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, > + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff), > + .driver_info = RSVD(6) | ZLP }, Checkpatch now also warn of trailing whitespace here. Please remember to run scripts/checkpatch.pl before submitting. > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff), > .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, > { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) }, Johan