Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1445911imw; Sat, 16 Jul 2022 06:52:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vEyCZu8qEFave6sCkh8rXd2FXitHcR9k+YJItv4gOZ/T8G4+zxskaGj9CGQGH5PpwSrPTY X-Received: by 2002:aa7:c0c4:0:b0:43a:20cf:3c68 with SMTP id j4-20020aa7c0c4000000b0043a20cf3c68mr25959264edp.172.1657979548334; Sat, 16 Jul 2022 06:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657979548; cv=none; d=google.com; s=arc-20160816; b=z1++CltUHyZZ86yk91OMm0+oiLPeupQF3qD+kMjxgMAMyhakMHlkL2+anaIEXQ5BDB 39GmNG68y7N9bou1LnmtoHuAJmxAhLlcThPoeggBIhXUVxCTNL9DyawfSO2a+DN0RjZ/ 3I5mRBaL6VPul0F+G1Mvqslh+Kd8y2YlVa0sTaicA5oreTYJ9olkhkpqf4oEb4bq0CmD ZvpG+FBmasXnxcizAnQxWji+P1JieI0Uc9bpPK5ncBaXvU5k9ctu4URkk6RPntKe7fKO VosIs3Wi31vaoPJXr5ejyGUpQJBKci3pvk/VPqxje5EV+/lhVUnLygEux/cIectc/8Cv OhOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=qEGRgKObqU+pSL4Nphk1rhGN0jQn9BUR4rA6lZCmNL4=; b=O0HYuNg07kGtw4LXCqsUGaZw9ARl3ZfnsePo3MWR5mQidH5ESrjyS5llbRtQZh9eE/ UAsQXcIq5qhtbP+ej6tEIek8Qwe+2NXU2AiPKqXP4Ib81L9hEifNa4HzhdtPegiekJIL eBvmAHqv2u+rmXbESPIeaKjW0zh20oU+jrwqViKm/AkZyCieQd1d8yUl2dpHZHQLEB78 b35lox9qYTWICvSgDv3YiF4lpUt1+dN9t2Nz7Hb397nhM9kmJ2TE7l+3877VWeBQM9+L BaYQ+yO9JhG5mtnWzKPHJsu9H3Tz1r7g+k1C8uY9dnwFWaWKryHWb49vZdsHGh8v/fY6 nJAQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bupt.edu.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b67-20020a509f49000000b0043a2c63f93dsi9608767edf.494.2022.07.16.06.52.03; Sat, 16 Jul 2022 06:52:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bupt.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbiGPNgw convert rfc822-to-8bit (ORCPT + 99 others); Sat, 16 Jul 2022 09:36:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbiGPNgu (ORCPT ); Sat, 16 Jul 2022 09:36:50 -0400 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099971E3ED for ; Sat, 16 Jul 2022 06:36:48 -0700 (PDT) X-QQ-mid: bizesmtp76t1657978588to1mi2xn Received: from smtpclient.apple ( [111.193.9.146]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 16 Jul 2022 21:36:27 +0800 (CST) X-QQ-SSF: 01400000000000B0V000B00A0000000 X-QQ-FEAT: XrEBpEcZEe1Cj4fayQZUg0OXzuD0PvM2lhXbXnWJ8U3bxtL+YyTNENp6Wbjg+ uSJlyVvvCCJw7i+7BF5Pi30oHM2gJSkfS5evsQItbj1YqbTX4faB2EeST1FK3Xgvg9Nl0i2 a4q4qv7dXowUXZ3/fPlw7BDBv0m2dwP2oZPCJyxd1um2BtS/cnqmjvClzt3/Bqb11/sMl7r 5qohEQ8q/o6k6f6hXqOOhQ9bVTSv3QU/+GaWi3yqmTeDBLj5SlnHLdeAAVj+Y4+GxnI5KBo s32VTILfmwuBxhf3McjFf9RzvpcitvYS5ptN/cqwyLcRqIcYfKhFCLLsXgPJsdqRcYP7xCZ uzheXLFcsoWhT4+0XNkZEjnctiWUiX8f9VoskbAFXQl1q3Ge0c97Jfp5CPHTQ== X-QQ-GoodBg: 2 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: [PATCH] USB: usb-serial-simple: add new device id for OPPO R11 From: sdlyyxy In-Reply-To: Date: Sat, 16 Jul 2022 21:36:27 +0800 Cc: johan@kernel.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <333E5B85-7534-4CE5-8AB6-464571CBF61E@bupt.edu.cn> References: <20220715142444.4173681-1-gregkh@linuxfoundation.org> <119D7B0F-7809-464A-AFF1-DF72FFF9E63F@bupt.edu.cn> To: Reinhard Speyerer X-Mailer: Apple Mail (2.3696.100.31) X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:bupt.edu.cn:qybgforeign:qybgforeign9 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE 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 Hi Reinhard, > On Jul 16, 2022, at 20:13, Reinhard Speyerer wrote: > > On Fri, Jul 15, 2022 at 10:59:13PM +0800, sdlyyxy wrote: >> >>> On Jul 15, 2022, at 22:24, Greg Kroah-Hartman wrote: >>> >>> The Oppo R11 diagnostic USB connection needs to be bound to the >>> usb-serial-simple driver as it just wants to use a dumb pipe to >>> communicate to the host. >>> >>> usb-devices output: >>> T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 10 Spd=480 MxCh= 0 >>> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 >>> P: Vendor=22d9 ProdID=276c Rev=04.04 >>> S: Manufacturer=OPPO >>> S: Product=SDM660-MTP _SN:09C6BCA7 >>> S: SerialNumber=beb2c403 >>> C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA >>> I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 >>> >>> Reported-by: Yan Xinyu >>> Cc: Johan Hovold >>> Signed-off-by: Greg Kroah-Hartman >>> --- >>> drivers/usb/serial/usb-serial-simple.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c >>> index 4c6747889a19..eb832b94aa3a 100644 >>> --- a/drivers/usb/serial/usb-serial-simple.c >>> +++ b/drivers/usb/serial/usb-serial-simple.c >>> @@ -60,7 +60,9 @@ DEVICE(flashloader, FLASHLOADER_IDS); >>> { USB_VENDOR_AND_INTERFACE_INFO(0x18d1, \ >>> USB_CLASS_VENDOR_SPEC, \ >>> 0x50, \ >>> - 0x01) } >>> + 0x01) }, \ >>> + { USB_DEVICE_AND_INTERFACE_INFO(0x22d9, 0x276c, \ >>> + 0xff, 0xff, 0x30) } >>> DEVICE(google, GOOGLE_IDS); >>> >>> /* Libtransistor USB console */ >>> -- >>> 2.37.1 >> Tested-by: Yan Xinyu > > While this may work sufficiently well for real low-volume diag traffic I'd > expect a significant percentage of diag messages to be lost in practice > with the usb-serial-simple driver. > > According to the usb-devices output this looks like the Qualcomm USB gadget > in the DIAG + ADB composition to me. > > Since the option driver uses the usb-wwan framework my suggestion would be > for the original patch to be applied instead similar to what has been done > e.g. for the Quectel RM500Q diag port. > > Regards, > Reinhard > I tested the diag port using two userspace programs: QCSuper[1] and scat[2]. Both option and usb-serial-simple drivers generate similar output, so I cannot comfirm diag message loss. Do you have any test method suggestions to generate high-volume diag traffic and detect message loss? [1] https://github.com/P1sec/QCSuper [2] https://github.com/fgsect/scat Thanks, sdlyyxy