Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6826426rwn; Tue, 13 Sep 2022 09:29:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR5yYJeF1nTYMui4VP4hnDnXcv3Z3seegnvqSzT3yUbqxcq3XNJrXjkCXwFVQi5ZFqvkEzAE X-Received: by 2002:a17:902:8ec8:b0:176:9fbc:6293 with SMTP id x8-20020a1709028ec800b001769fbc6293mr32187949plo.163.1663086554900; Tue, 13 Sep 2022 09:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663086554; cv=none; d=google.com; s=arc-20160816; b=0u16k/nPaQQUaLn0S5SYgMPbhAdE/LL2nJXBzrYHLYZtJf4VJbxLEYNYq1qr039DL8 8jUHbCrjZh3HPHnHPw7hEutlpb8T50CuxUFiKqVAWVOm2tLHtZXiQbtJGOtKgrl1qoeH Ls2JZeNKay7mMX5VrwIJ6fWQV1ZFcasCd88wx+wS1DcqsmsmRVw6dy4qGBzJMMYJHUFl RrWrHpjlPjHTsuP86r3+Bbs1PdYxrwRAemfDdO8suFYu+psF5D+5Oa6vXeekyUbl7YCI PQMt5nQ6b+l/AI6uFxv3uXp7UOCKOE6W/tRt/OvR0GrJkHOT2/hb9lqC7JgX96mqKRs/ RMzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Nrv5+cMmAUzSvbbs46RwLlX/F5FFl0RfVO7siiDquWs=; b=ucqNc6FJP2dZQFZrNGqD2zr8f/IZBB/VaL0oL43mA5EdimAIyal+aIKNVphILFTKsW maQMupo76qkKfZcyv/CYx2zGS2pT3cWDHJQZJ2tC4hrIm7NMkJYd3GZY/Trpmma2a+zU Ox2KZxqzAjgc4LXsICKu9cMK0/7kQmOM8cUIJwPMYp0w5Ys0WBl45xSZ08OwxwbUr88Q 5YSbMBlED+yLnHMG6OryxWU7qGe15gGa+F1LHYgrzVCcOUcEpgQbiu1WR4He04Ws4gGk P0DAZLUR8K4euX0meI2CHBBYdk8F261Z/LmBT6A30QjNqxfs35wrBnEQe/mWfTUZCSv3 8xQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=B5hyEVaG; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a056a0021d100b0052f9293affcsi12445876pfj.335.2022.09.13.09.29.03; Tue, 13 Sep 2022 09:29:14 -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=@linuxfoundation.org header.s=korg header.b=B5hyEVaG; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232688AbiIMO43 (ORCPT + 99 others); Tue, 13 Sep 2022 10:56:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232653AbiIMOxF (ORCPT ); Tue, 13 Sep 2022 10:53:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CE6472B52; Tue, 13 Sep 2022 07:26:49 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 850A6614AE; Tue, 13 Sep 2022 14:26:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BFF4C433C1; Tue, 13 Sep 2022 14:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079206; bh=qOPfv6rN3G08Au0xWngt92uuyIDREJjHLEVh3jzqV5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5hyEVaGs8BHq90xniS8umiTeqqnCMWcy0oYOI03QO4n8T26Rv9umCpJH8JG1QYqQ ii472VrLseQXnt+3+knYuZmPodHvtB5GggYvkiKJf9dt/O1cF/5ga7iCHhPTPLqedm J7jali63D2PsKazG4B+xfxMKe+lEYpVTvMb1BVZ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yan Xinyu , Johan Hovold Subject: [PATCH 5.4 044/108] USB: serial: option: add support for OPPO R11 diag port Date: Tue, 13 Sep 2022 16:06:15 +0200 Message-Id: <20220913140355.537735040@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140353.549108748@linuxfoundation.org> References: <20220913140353.549108748@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 From: Yan Xinyu commit 8d5fc280392735e4441b35de14f2f4860fa8d83c upstream. Add support for OPPO R11 USB diag serial port to option driver. This phone uses Qualcomm Snapdragon 660 SoC. 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 Driver=option I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs Signed-off-by: Yan Xinyu Link: https://lore.kernel.org/r/20220714102037.4113889-1-sdlyyxy@bupt.edu.cn Link: https://lore.kernel.org/r/Yt1WfSZk03Plpnan@hovoldconsulting.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -573,6 +573,10 @@ static void option_instat_callback(struc #define WETELECOM_PRODUCT_6802 0x6802 #define WETELECOM_PRODUCT_WMD300 0x6803 +/* OPPO products */ +#define OPPO_VENDOR_ID 0x22d9 +#define OPPO_PRODUCT_R11 0x276c + /* Device flags */ @@ -2155,6 +2159,7 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ + { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids);