From patchwork Mon Jan 16 09:14:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1726950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NwRGP0YTyz23fp for ; Mon, 16 Jan 2023 20:16:12 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pHLav-0005I1-GH; Mon, 16 Jan 2023 09:15:57 +0000 Received: from mail-pf1-f174.google.com ([209.85.210.174]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pHLat-0005Ha-Gv for kernel-team@lists.ubuntu.com; Mon, 16 Jan 2023 09:15:55 +0000 Received: by mail-pf1-f174.google.com with SMTP id 20so15066606pfu.13 for ; Mon, 16 Jan 2023 01:15:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CHC4vp+iG/+9A1jaU78NrCT3gYzi8hJ91XA24EdccAM=; b=oCAYCQeh+PDxC12zJASS/Ccq9nIxlub9XrQk/FtJilQA6MrdbSJv5/M3p+jXXvL5Cd fM844LDZpC5fF4UhmFB/qIPdxJjF0s336iSpFUzZQ7fqHNt5XP45SEODhDjELxWrQqkK P/dj1Su3YvVia7aPkNx7b9URyeDF3l5ouY1CcXlIN98QeG6wmEespCW+vLcdJaQ4Auw8 IdV5jHEYv1yBm5yQBWLMQ4EmHqS2nc7xh32kEVS2KHp8bhH8roVqB6wf+5JzxjxspmQi vF3C7DK0AG0q0Igm+ef3vt8BH+eSyr4cSjvVrfA/COxOJBVesNAlpPaCU6R36fRJttKk qM5Q== X-Gm-Message-State: AFqh2kqnS81OIbv2v9hiVYxYZFwD9itHid2N9XnCz56kDqaytomeuf/Y UVkYMlzKLCXcIaTTUAQu7/hYg4eq8EU= X-Google-Smtp-Source: AMrXdXtgP2p3sN00XYSSuDlkgnekWkRHhySbIQ1fpDTV28RE0EOw2oi6hoC0/EMvPU0lW/EKpj+XHw== X-Received: by 2002:a05:6a00:3217:b0:581:7430:aba with SMTP id bm23-20020a056a00321700b0058174300abamr62297720pfb.10.1673860553125; Mon, 16 Jan 2023 01:15:53 -0800 (PST) Received: from localhost.localdomain (61-227-102-162.dynamic-ip.hinet.net. [61.227.102.162]) by smtp.gmail.com with ESMTPSA id z4-20020aa79484000000b005823b7da05asm2456355pfk.122.2023.01.16.01.15.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 01:15:52 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/6][SRU][Unstable/Lunar/OEM-6.1] Mediatek FM350-GL wwan module failed to init Date: Mon, 16 Jan 2023 17:14:56 +0800 Message-Id: <20230116091504.1361157-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.174; envelope-from=vicamo@gmail.com; helo=mail-pf1-f174.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "You-Sheng Yang (vicamo)" BugLink: https://bugs.launchpad.net/bugs/2002089 [Impact] Mediatek FM350-GL wwan module failed to init: Invalid device status 0x1: [ 1.623253] mtk_t7xx 0000:71:00.0: enabling device (0000 -> 0002) [ 3.632963] mtk_t7xx 0000:71:00.0: Invalid device status 0x1 [Fix] The t7xx driver once received following fixes to complete its functions in v6.1-rc1: d20ef656f994 net: wwan: t7xx: Add AP CLDMA 007f26f0d68e net: wwan: t7xx: Infrastructure for early port configuration 140424d90165 net: wwan: t7xx: PCIe reset rescan 87dae9e70bf7 net: wwan: t7xx: Enable devlink based fw flashing and coredump collection b0bc1709b768 net: wwan: t7xx: Devlink documentation However it was soon reverted for a second revision. Before that, in bug 1990700 we need the first (reverted) patch "net: wwan: t7xx: Add AP CLDMA" to fix device suspend in a minimum level for development. Then, in this bug 2002089, a fully revised resubmission is now available. An additional patch from v6.1, commit bb67012331f7 ("net: devlink: extend info_get() version put to indicate a flash component"), is necessary for oem-6.0 backport. [Test Case] Modprobe on new platforms that suffers this invalid device status issue, and run suspend/resume tests to ensure bug 1990700 is still in a good state. [Where problems could occur] This re-introduce the device firmware update support via devlink, so far it has been tested many times from 3rd party/vendor, but might still bump into platform compatibility issue as we have here. [Other Info] While this is only planned for oem-6.0/oem-6.1 and on, only U/L/OEM-6.x are nominated for fix. Haijun Liu (1): UBUNTU: SAUCE: net: wwan: t7xx: Add AP CLDMA M Chetan Kumar (4): UBUNTU: SAUCE: net: wwan: t7xx: Infrastructure for early port configuration UBUNTU: SAUCE: net: wwan: t7xx: PCIe reset rescan UBUNTU: SAUCE: net: wwan: t7xx: Enable devlink based fw flashing and coredump collection UBUNTU: SAUCE: net: wwan: t7xx: Devlink documentation You-Sheng Yang (vicamo) (1): UBUNTU: SAUCE: Revert "net: wwan: t7xx: Add AP CLDMA" Documentation/networking/devlink/index.rst | 1 + Documentation/networking/devlink/t7xx.rst | 161 +++++ drivers/net/wwan/Kconfig | 1 + drivers/net/wwan/t7xx/Makefile | 5 +- 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 | 18 +- drivers/net/wwan/t7xx/t7xx_modem_ops.h | 1 - drivers/net/wwan/t7xx/t7xx_pci.c | 72 ++- drivers/net/wwan/t7xx/t7xx_pci.h | 2 + drivers/net/wwan/t7xx/t7xx_pci_rescan.c | 96 +++ drivers/net/wwan/t7xx/t7xx_pci_rescan.h | 28 + drivers/net/wwan/t7xx/t7xx_port.h | 8 +- drivers/net/wwan/t7xx/t7xx_port_ap_msg.c | 78 +++ drivers/net/wwan/t7xx/t7xx_port_ap_msg.h | 11 + drivers/net/wwan/t7xx/t7xx_port_devlink.c | 665 +++++++++++++++++++++ drivers/net/wwan/t7xx/t7xx_port_devlink.h | 86 +++ drivers/net/wwan/t7xx/t7xx_port_proxy.c | 125 +++- drivers/net/wwan/t7xx/t7xx_port_proxy.h | 16 +- drivers/net/wwan/t7xx/t7xx_port_wwan.c | 25 +- drivers/net/wwan/t7xx/t7xx_reg.h | 30 +- drivers/net/wwan/t7xx/t7xx_state_monitor.c | 123 +++- drivers/net/wwan/t7xx/t7xx_state_monitor.h | 1 + 23 files changed, 1525 insertions(+), 93 deletions(-) create mode 100644 Documentation/networking/devlink/t7xx.rst create mode 100644 drivers/net/wwan/t7xx/t7xx_pci_rescan.c create mode 100644 drivers/net/wwan/t7xx/t7xx_pci_rescan.h create mode 100644 drivers/net/wwan/t7xx/t7xx_port_ap_msg.c create mode 100644 drivers/net/wwan/t7xx/t7xx_port_ap_msg.h create mode 100644 drivers/net/wwan/t7xx/t7xx_port_devlink.c create mode 100644 drivers/net/wwan/t7xx/t7xx_port_devlink.h