From patchwork Mon Jan 22 09:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjian Song X-Patchwork-Id: 13524989 Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01olkn2153.outbound.protection.outlook.com [40.92.63.153]) (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 5349B38DED for ; Mon, 22 Jan 2024 09:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.63.153 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705914612; cv=fail; b=I6UZQQ1M3Fasd3m86FzPreZXPrh72VeedAxg12DAbACGNtDpKkHOBhSDyUSoO6uSn6ld7WC81jSxK3NLdcmhs0E9yKPT962XoMwNG6im6S8OYIutFVNXrLcN9pQPgO3x4N0VMa8bLrBS3cuSMhgSwckK5ayTRfdZeUqWhAQsxHk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705914612; c=relaxed/simple; bh=y/FKn6/JtvkNHe5Yl7YGjeQ3xnE4sRSYLKuaOmfcZsI=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=F/yjUpNMEUxVahUZsuh6gVUuTcJh9fV26f9RjUxJGPRezDBUybeyz6rAs3VKLHpmVABT1OJ/pVkx2CZR8SXvNnDdOGkBN8YbiACSH+Wk7gCBeujaipVDbhcRrL6vFx1baQirfgrMG1UtmUw5VqpknITCAsXVEsAASNXe1DU1VzY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hotmail.com; spf=pass smtp.mailfrom=hotmail.com; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b=BeB/gHnP; arc=fail smtp.client-ip=40.92.63.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hotmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b="BeB/gHnP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NsBeBWEGHae6e+MzV317UG34Bj25O9TH4sUTvfHUB2xO3y9hV7/JO1zOzDStCEx6cFJhaXwKO3p9AsdeNAb6wtMbglStmVNtE1qm/U45RltPUS8v8e4y4RyzzJ6afUh1/yFEIAW8UrrKs2047xo4nrjbRKKrV74Lj+EwfYCFI9s3XMhZzLboTrniVeAnfvlgGplFxYQQ3Og9sNJyUzf1x0sze0Nei3Is81RttMeaxGPEwDjayIdc938l2uC8c/aI3kshW38bqCKaPsWUAUwoDvgnz6M8de7profpKPLCp4cNvJfyG6v1LIONaODZ+tTJ76KmhCDeReDXQTCat/2Vkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=zKauP3fBPP/swl3BR05m52Ch95A07rG5Kx9lSf6I/4Y=; b=gm3UwHWM5G0Q3Ow6wUR9nGHM/IvP95RdSPQDHCYeD52adUFBphbZw0+GAxNZljB4HYQe03DSrzaCKNM1OZ7lsPcneoggKOrXqz9mBzPlFYw76fmP2KOLemaRkWmv5Oh6Xz3wOVmVJvYdajdJppGdMtaC9hTCGA1rkfOWPa7R3hQ0QrqfHspJTnbQMEbD3AAP0ahOtVPyvAW5x+ck8mjiGpAEw0bJOtTbVsZ/SsKaDu+0prKBm3NDiAMaSSbJi7d43/y3OuWmXMssdUx/fp613+iTVIXx252fw2q2+pp/j1Zs3UkBld/U+lGmEZeGAnmvSCLYQgbFROu/sz2EWvdTpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zKauP3fBPP/swl3BR05m52Ch95A07rG5Kx9lSf6I/4Y=; b=BeB/gHnPIn9gmHBTFEq/OS73iqEyt7+NKMY8vnP770WwuuFtmjsTTrtw/whLVdyPefJopOQZXmlgjnHuI4Hzbwi/og10rsTdOsVppGZPu3GItvP/vNjh2bd/dzJtv++fNzEjTGmVJbDpi4jf4aAG3j5GSk+toFaT3/5hXk0lBrLZKQKPxRJIQH0HxOU9ghDlgiL+MYi56cos5p1GDSMdXpOI0GERUKFz+lkJfJGBZg6SVlSinJVaHShnahXo6UyuX2557rmSZeqid1EaBxZcTrkS68X2icCB8Pbo2rpjyYThSK5pwk8I8sZ3fkT14qnJKmYOGi3YyEa/g77xKxsfow== Received: from MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:14c::12) by SY5P282MB4893.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:26e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 09:10:03 +0000 Received: from MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM ([fe80::4b5:c5db:e39a:e48f]) by MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM ([fe80::4b5:c5db:e39a:e48f%3]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 09:10:03 +0000 From: Jinjian Song To: netdev@vger.kernel.org Cc: chandrashekar.devegowda@intel.com, chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com, m.chetan.kumar@linux.intel.com, ricardo.martinez@linux.intel.com, loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.com, vsankar@lenovo.com, danielwinkler@google.com, nmarupaka@google.com, joey.zhao@fibocom.com, liuqf@fibocom.com, felix.yan@fibocom.com, Jinjian Song Subject: [net-next v5 0/4] net: wwan: t7xx: Add fastboot interface Date: Mon, 22 Jan 2024 17:09:36 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [GiJnRTLBMnhIomBp9hWFeR3P0sfbY8j8] X-ClientProxiedBy: SI2P153CA0010.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::13) To MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:14c::12) X-Microsoft-Original-Message-ID: <20240122090940.10108-1-songjinjian@hotmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MEYP282MB2697:EE_|SY5P282MB4893:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f1f5b14-eab9-4b5d-5fbb-08dc1b29ead8 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2facuYjWFpuBDEmjWxr/8zFTUr30D+V1Ui12Xmm8/TCg9qS4V78Gg9wsL2sXvmYbMVFiUQ6758pMKAFuTcyRcl2NTmtFS7Tb761s630TA/A9Q6P1L12Esn+X5S+NvvtTv8//3xs7Ph4Q02bqw384Q1J3ADOeb38bAGt7coNEOyGkEpYKZIRM/hEZ5XlRl7fm0hR6dlr+Zm+MVVHtt/SsaDqz4q8IA7jgFMbwjIWqbC+nqBeTdNZpv8KORp9EG6GG54JK/B6XwOD5WdROAnLbHH428x2OpS6pE8o6tqRn9J4droLRWjj4K4vM83/o+ETluejoh/rGnv8cDqLKZ9bOo24aJ8YCQfgvNKriZ+xMAmYqiDJu98odzV1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LkqgFHu+lcq2npkQvFsHW2g883bM10go2WnJNy9NBpdeh8dSR5rLnw2gehbzFYLavC3tfVkxbLx18AaymlCw0V1vn4t6MPzNTGmZTR8yz7aSCntsbQEsR+iHLomN0ZPCFk8yVG7yB7yi5Mq2NoDUm25N7XFxdEgOMJQluxUx2V6ZGS618187qCxhaux9hs2l4N8zIpsVyNPjur9LgXyyb6J8V5WwFFf/Tj6Gg5GFBKWZI1rtNKXHI0Dl+FZM+IeeEW21SjCKm3aN57QSKoMxpDPaGkWP1LVNEmq5GCiVRkbjw/8Y8FOHdxYx1hpB+J0W9zzAg/qGlZxZJAGf9XXcASip6nHaE4A/JK0sGfIbvuB22BOiIoCSTVgdjcWyhEN4Y6PJzcgBdRje/EFIb985NMi40JiqEAJ2xJmOHHI= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 7f1f5b14-eab9-4b5d-5fbb-08dc1b29ead8 X-MS-Exchange-CrossTenant-AuthSource: MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 09:10:03.6791 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SY5P282MB4893 X-Patchwork-Delegate: kuba@kernel.org From: Jinjian Song Add support for t7xx WWAN device firmware flashing & coredump collection using fastboot interface. Using fastboot protocol command through /dev/wwan0fastboot0 WWAN port to support firmware flashing and coredump collection, userspace get device mode from /sys/bus/pci/devices/${bdf}/t7xx_mode. Jinjian Song (4): wwan: core: Add WWAN fastboot port type net: wwan: t7xx: Add sysfs attribute for device state machine net: wwan: t7xx: Infrastructure for early port configuration net: wwan: t7xx: Add fastboot WWAN port .../networking/device_drivers/wwan/t7xx.rst | 42 +++++ drivers/net/wwan/t7xx/Makefile | 1 + drivers/net/wwan/t7xx/t7xx_hif_cldma.c | 47 ++++-- drivers/net/wwan/t7xx/t7xx_hif_cldma.h | 18 +- drivers/net/wwan/t7xx/t7xx_modem_ops.c | 10 +- drivers/net/wwan/t7xx/t7xx_modem_ops.h | 1 + drivers/net/wwan/t7xx/t7xx_pci.c | 98 ++++++++++- drivers/net/wwan/t7xx/t7xx_pci.h | 14 +- drivers/net/wwan/t7xx/t7xx_port.h | 4 + drivers/net/wwan/t7xx/t7xx_port_fastboot.c | 155 ++++++++++++++++++ drivers/net/wwan/t7xx/t7xx_port_proxy.c | 108 ++++++++++-- drivers/net/wwan/t7xx/t7xx_port_proxy.h | 12 ++ drivers/net/wwan/t7xx/t7xx_port_wwan.c | 5 +- drivers/net/wwan/t7xx/t7xx_reg.h | 24 ++- drivers/net/wwan/t7xx/t7xx_state_monitor.c | 128 +++++++++++++-- drivers/net/wwan/t7xx/t7xx_state_monitor.h | 1 + drivers/net/wwan/wwan_core.c | 4 + include/linux/wwan.h | 2 + 18 files changed, 613 insertions(+), 61 deletions(-) create mode 100644 drivers/net/wwan/t7xx/t7xx_port_fastboot.c