From patchwork Mon Jan 16 09:16:35 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: 1726961 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 4NwRJ50mgqz23fp for ; Mon, 16 Jan 2023 20:17:41 +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 1pHLcT-0007Mj-DH; Mon, 16 Jan 2023 09:17:33 +0000 Received: from mail-pj1-f50.google.com ([209.85.216.50]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pHLcS-0007M7-6Z for kernel-team@lists.ubuntu.com; Mon, 16 Jan 2023 09:17:32 +0000 Received: by mail-pj1-f50.google.com with SMTP id s13-20020a17090a6e4d00b0022900843652so11752893pjm.1 for ; Mon, 16 Jan 2023 01:17:31 -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=zsM6W1WMGzQzLyn2G/arQ3APdEwPI0CcyOw2LFDbTAM=; b=gGM0Zlapaohdga44Lcq2Nfqg1Oy0zm/cAOiJwnzNFt+5ZrNW1llDJmmyjoxVBomggs k/U0OneQ897vOuqC/RAv09K1FadIXnZMICB1RbJ+UxkgR/03jfiku9wBQnoLP08pSD9b yiAr/NpQUdhELixot1QaXcJkwOSDPaOPHQnBKGJHFQUbzIijkz/FsholG9ys34lUO2a/ h/YigR2BS5HoEqsupNGJTRHcIENbysAz13qbBFLT1ykaOp+0tOG208tQJBD8KxNVkNS3 Lwcq63ZnITIcpfcgnobEnJD4bEPIS4ENvvUrvZEyL0CgoieFz1s49qYASgAwA6pA6g1/ XYng== X-Gm-Message-State: AFqh2krWDkafoH1QuZMkpF/SPMJCacaJsq3RvB406TMbnlex3x13YZh+ fG2BsUC6HoeWoDw6HUgMpprVEz0LGSY= X-Google-Smtp-Source: AMrXdXul5AoI2DcFVorU15P0AcUSG21hywAs0Crt+IZ7qx/a//41JAU9pt/IsNi+SG6ZNgOvZfLnBw== X-Received: by 2002:a17:90b:1903:b0:229:1887:1dde with SMTP id mp3-20020a17090b190300b0022918871ddemr13781476pjb.34.1673860650062; Mon, 16 Jan 2023 01:17:30 -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 fa21-20020a17090af0d500b00223f495dc28sm16763637pjb.14.2023.01.16.01.17.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 01:17:29 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/7][SRU][OEM-6.0] Mediatek FM350-GL wwan module failed to init Date: Mon, 16 Jan 2023 17:16:35 +0800 Message-Id: <20230116091642.1364398-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.50; envelope-from=vicamo@gmail.com; helo=mail-pj1-f50.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 Jiri Pirko (1): net: devlink: extend info_get() version put to indicate a flash component 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 + include/net/devlink.h | 16 + net/core/devlink.c | 34 +- 25 files changed, 1571 insertions(+), 97 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