From patchwork Wed Nov 20 09:39:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerry Meng X-Patchwork-Id: 13880919 X-Patchwork-Delegate: kuba@kernel.org Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11020074.outbound.protection.outlook.com [52.101.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C661187844; Wed, 20 Nov 2024 09:39:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732095572; cv=fail; b=obI5PCwFaD/WI9RXdjS0lh7Um0uovy2fo5dfSfHk3M1O7BaZKHHorbhM/Fb5aH1536wOuT5a+qr74L/A6DCyDgCfhKTrHbRR0zMVyrF6iCgN5H2RJ9wsvJboKjD793eg+MlB7f/andJFazUYFerMkOTow++brLAzPJEhamSsu64= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732095572; c=relaxed/simple; bh=ICnf4U3rcI2XSJpKYsdtl6dcTQRzfjBOMCjbDUuLSE0=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Lr53ut/tzytAfuZd98u9VmEh29ILF+7FNG/mQViJ+AO1gBH8YG9cUKJu8ZnMH6wMjfy5bJ0oi4jRVNHMo73r+NzhC/aG9fV60PULpIHz6aHYjRHl03ka/QwW5DJRLG3Ehn3KsrSzON0v82p3Bclx7dPgBS4ug4jmZ69zX5KlRVM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quectel.com; spf=pass smtp.mailfrom=quectel.com; dkim=pass (1024-bit key) header.d=quectel.com header.i=@quectel.com header.b=Ra6oC/Ko; arc=fail smtp.client-ip=52.101.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quectel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quectel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=quectel.com header.i=@quectel.com header.b="Ra6oC/Ko" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aOcKMdmOUFLIF8WPnzOczVV5OWCqhkLM5LoxmUxRoZ+obdyZqXz8j//J0d5o8ImHRBWxTmGQZVBlYu1gCRnHKKw3+vqctKI6w4JDO2Gm4HCNqg5W1F35eW+9LVQpUmMLToAp8ZS8Qf2slj5Bix+LgwQNJmFsB6mxT2KC2wgdRDI3YH32JBZYeOmKqpIvlPxSwsspETrihrt2FmtaSJTbFfp58Z8Jl95tEDw+5Vqk2Z3ztoORhOvKZYDXIdrJJINliBKLCPXFgud3pvsF1UJnBsMhzl+a4MmdrkzZktM+5SsO947MdWBdcO4kouKJtW9i+PDKDioMYDmBUworz0bJUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2nUgiiCpvR1gQE/ROjt9v+5sTquYr3Qvyli+kAH+YCo=; b=mAyTEmiou47nDocpHhsusthlEtsKT2NEhH6B1WAVEMnARcD3SCeIJmOXMNR7oqASvPMR06MYr0paVmSLwsniNgH4gOy7ctDVMJ7R/uQvzwxA3GFDCzjr7TvffifNwTkeD3ZDRUFywV/ophIqa+YvY8+jwj1NX4t2XAXlisP8BWxJOYZe8kRCVmuF9VZTJT7PuTnw4/pMZ7EY08pVfbk+xdTteghZntGK+GtEVAPVRMGm4d/52S76aisZgOIuYdLoriUEAkGwuMsnL+3MZ5eAcMr4skFkOG84UdfjXCUYZG9tY/7IME+g9U9YajDA4AmnMAcmj4tCzLwMGe832wznmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=quectel.com; dmarc=pass action=none header.from=quectel.com; dkim=pass header.d=quectel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quectel.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2nUgiiCpvR1gQE/ROjt9v+5sTquYr3Qvyli+kAH+YCo=; b=Ra6oC/KoVmdqMy5Hj4rAEBkwZ4QbMks7R31Xm150p8ld13sIBsbbvVv4KQxUE/IVegi0c56wLg9Vr0Tm2oEHn6GNp3+P7jq8DaHsqdlxk3BteSRjiV4ynkdoBH7TK6CdwE27VRLCOPGKWMxstXPSILRdk7nkxTtORA7DCumCLtE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=quectel.com; Received: from SG2PR06MB5358.apcprd06.prod.outlook.com (2603:1096:4:1d5::7) by JH0PR06MB6704.apcprd06.prod.outlook.com (2603:1096:990:37::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.14; Wed, 20 Nov 2024 09:39:25 +0000 Received: from SG2PR06MB5358.apcprd06.prod.outlook.com ([fe80::e711:eea9:af2:b2ab]) by SG2PR06MB5358.apcprd06.prod.outlook.com ([fe80::e711:eea9:af2:b2ab%3]) with mapi id 15.20.8182.011; Wed, 20 Nov 2024 09:39:25 +0000 From: Jerry Meng To: ryazanov.s.a@gmail.com, loic.poulain@linaro.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jerry Meng Subject: [PATCH net-next v2] net: wwan: Add WWAN sahara port type Date: Wed, 20 Nov 2024 17:39:04 +0800 Message-Id: <20241120093904.8629-1-jerry.meng.lk@quectel.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: TPYP295CA0051.TWNP295.PROD.OUTLOOK.COM (2603:1096:7d0:8::11) To SG2PR06MB5358.apcprd06.prod.outlook.com (2603:1096:4:1d5::7) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5358:EE_|JH0PR06MB6704:EE_ X-MS-Office365-Filtering-Correlation-Id: 552840fe-8973-4832-7ed2-08dd0947387e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: O/izVw6wZJw9qZfQOq1lvqrT8B3DFHYs9gtbEMV9D2XXpHEN4kgsgHps92eEQI72UNzjGNd/upLlzNmluY2p2y53Iummo2pmsmdU9jEZQ6+K7cxYyMVIj+NohLn9oCNW2cmhiOi0MWH6bmhAaNfGvALUgtW39JDqHzpC1NGq/3ixJG+XZQnP/EgX7d0/igELMaLt6T504Mv6YDbxeL2RsdZ2o+JTPP7XHtFUX/xMTEAprg9WDDHXNQsjgLD/Fbmy3I/xhkkrtUVUlEVDKXqXCunNEviNMIKdNUCLJoznm8lr+CtVWQQod5wbxN3P8Ou9tq7WeuCymTrPSDaoi2yux2SWh4JIbzs3Oxx5w+VjLbRFpwoOUj360QJz451sSUKY6p+sU0o+4PjehBbW9SFJ78xKJcmceRjemZTOzurxN4jfLrWp38gyuR+xWJxf1i01uPWi2WipfJOwmp+t6qBNI3QKeERTwgAwBqrBj7+qJi6Cn3k9Q8h+TReXSzg8zpqxeQ4zvAhDzZpkI5EjVY4lAB0T4zrhSU5on+V5CR7KxBX2d52PVxSaJmOBAZfQRmIokG3zsbgs5rZz1zWCCvwT9ViFnbyh9jPKGHhms7NpS7aH7utV0CXG8rBuq1mwBLNpYn+qh9UP9f3ikDy8dceFZzGcskJR1aY0ZFc5wlzfpqLhlWxoCyzD2U/b7SDT3bvXDDeWbYQpqMDMvCcLl3VyeuzOv5F+6nQr6zcWK0HeVI+T1taCkcqYuPUcely/0RcgEDgXpfTPrdy4y4c/Z82k0FNTz0EwJt0oE6TLDvT98v4BOrv/vZHSpzkA+e9CSwo6jmzsYPsN38A5zTrNMZF3jcMwvf2b6LB5B7ah+4qNMHkbMy6BUB2zhtmIpqXjAqmcC0KCbCIPeMER5tQMRC/asrONxbnkHUnWvXquZE+GYq7ip5Bd+AheO/flSuzXYuGrhAJNQ5WsqDIPEjZl7J7G85+DYqztfcme/isy/LJLDjwTM69hflrUTpLsgBSqJRmjf5M5Sx3ldDNDqXstt9344vj5V1e8GpqGfSVtNLEPGiwmUQ/rmPL6qN7Ifp0VibdyVs5Xqv6XlGX3Iv6vd8WFqCnkXNhTm/Gvo2DKzAMyfYpekqQ6/WPK00p5Hccb58bxzHtPFDx/Jg05LKkNywlroJxMwMdp/Q2fc2xXIakJ+RdhuuPDL0bbfnCGs5LLNoRfajT+kjFO05e3BPd2dF/Mq2lJMMtiRVITlb1qEW66FrexKCMiqkwDGY5iRdHbH1GYIuo5j7YL92e2HYRbV20lzm0AvwK/nRKKrJveVgMtMhMHTz4NBtBPX/Qr0FJbe9qhODqY6uhQCl28LQv9Rr129lmwKcRYo0uPiBSea5wLS1c= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5358.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c2wUxaOIGKOsISkmbCVWhN4rx7qvMeO5xe0BWIrLQwBKtIqxD4Owu/yY2fsfxS4UESCAQxgh+Jy46liH0rhjdP0bdmjnaRuho9nal3HfshqjFxrgZAc2M+8yzJGmGA0ypMTHtw3SMJUqluAP3xEI76bPPfh+Y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/mefDUfPjLpUkZst5TCBiFTMMy6RkuHO/DvMl0CjlS9mP95aeub4omug/EZUzeauUvb6WUAo2Qdmlmzfl6PbCzmXRsDERBdO07wOaiEYHPD3hY70SnMUFJC3DZ46fHxQihZr4Fjw98Bt7kS2WhHAuHIRXy0er5xd9cfaHKRC/B0lK3/e+RbTslnn/Gv1JD1N2YBmQKVSTLZ04zaYomWE+9/xjYwhx6zyNP3JVrY0zEGVtuUqd7ZGFJCgFAP0ZsF06YlLn/dQb9uckfrPOvUXyjtew5I2fz95iJbMpWsXSs24LR9Pvw+B1jFYu1qGAy+eZyIbs/xwwIsK9t0n4Wak299yx4n1d1DaCwyJ9B1AYXE0n/91nMHmoZY8wYw== X-OriginatorOrg: quectel.com X-MS-Exchange-CrossTenant-Network-Message-Id: 552840fe-8973-4832-7ed2-08dd0947387e X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5358.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 09:39:25.4761 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 7730d043-e129-480c-b1ba-e5b6a9f476aa X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gYw7FY5euAAP7WjEGWqsDO8HZPgDW83dFZTRkkcu0F4g+EMq5d8qsxGy5WffGiJ8ntg13WaQyDnzoeQWUHasW9QHCgolrcvJvaN7HMFbe1k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB6704 X-Patchwork-Delegate: kuba@kernel.org Add a Sahara protocol-based interface for downloading ramdump from Qualcomm modems in SBL ramdump mode. Signed-off-by: Jerry Meng --- v1 -> v2: - Fix errors checked by checkpatch.pl, mainly change indentation from space to tab - change my email acount to fit git-send-email drivers/net/wwan/mhi_wwan_ctrl.c | 1 + drivers/net/wwan/wwan_core.c | 4 ++++ include/linux/wwan.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/drivers/net/wwan/mhi_wwan_ctrl.c b/drivers/net/wwan/mhi_wwan_ctrl.c index e9f979d2d..082090ae5 100644 --- a/drivers/net/wwan/mhi_wwan_ctrl.c +++ b/drivers/net/wwan/mhi_wwan_ctrl.c @@ -263,6 +263,7 @@ static const struct mhi_device_id mhi_wwan_ctrl_match_table[] = { { .chan = "QMI", .driver_data = WWAN_PORT_QMI }, { .chan = "DIAG", .driver_data = WWAN_PORT_QCDM }, { .chan = "FIREHOSE", .driver_data = WWAN_PORT_FIREHOSE }, + { .chan = "SAHARA", .driver_data = WWAN_PORT_SAHARA}, {}, }; MODULE_DEVICE_TABLE(mhi, mhi_wwan_ctrl_match_table); diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index a51e27559..5eb0d6de3 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -342,6 +342,10 @@ static const struct { .name = "MIPC", .devsuf = "mipc", }, + [WWAN_PORT_SAHARA] = { + .name = "SAHARA", + .devsuf = "sahara", + }, }; static ssize_t type_show(struct device *dev, struct device_attribute *attr, diff --git a/include/linux/wwan.h b/include/linux/wwan.h index 79c781875..b0ea276f2 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -19,6 +19,7 @@ * @WWAN_PORT_FASTBOOT: Fastboot protocol control * @WWAN_PORT_ADB: ADB protocol control * @WWAN_PORT_MIPC: MTK MIPC diagnostic interface + * @WWAN_PORT_SAHARA: Sahara protocol-based interface for downloading ramdump from Qualcomm modems * * @WWAN_PORT_MAX: Highest supported port types * @WWAN_PORT_UNKNOWN: Special value to indicate an unknown port type @@ -34,6 +35,7 @@ enum wwan_port_type { WWAN_PORT_FASTBOOT, WWAN_PORT_ADB, WWAN_PORT_MIPC, + WWAN_PORT_SAHARA, /* Add new port types above this line */