]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: wwan: iosm: fixes 7560 modem crash
authorM Chetan Kumar <m.chetan.kumar@linux.intel.com>
Tue, 28 Mar 2023 06:28:44 +0000 (11:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:12:38 +0000 (12:12 +0200)
[ Upstream commit 5f70bcbca469a087b54ad2d934185ed69a098576 ]

ModemManger/Apps probing the wwan0xmmrpc0 port for 7560 Modem results in
modem crash.

7560 Modem FW uses the MBIM interface for control command communication
whereas 7360 uses Intel RPC interface so disable wwan0xmmrpc0 port for
7560.

Fixes: d08b0f8f46e4 ("net: wwan: iosm: add rpc interface for xmm modems")
Reported-and-tested-by: Martin <mwolf@adiumentum.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217200
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Signed-off-by: Shane Parslow <shaneparslow808@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_imem.c

index 1e6a47976642907ef9d2e606f4d07a485146ab55..c066b0040a3fe5fb6668bd35d45694495dc1647a 100644 (file)
@@ -587,6 +587,13 @@ static void ipc_imem_run_state_worker(struct work_struct *instance)
        while (ctrl_chl_idx < IPC_MEM_MAX_CHANNELS) {
                if (!ipc_chnl_cfg_get(&chnl_cfg_port, ctrl_chl_idx)) {
                        ipc_imem->ipc_port[ctrl_chl_idx] = NULL;
+
+                       if (ipc_imem->pcie->pci->device == INTEL_CP_DEVICE_7560_ID &&
+                           chnl_cfg_port.wwan_port_type == WWAN_PORT_XMMRPC) {
+                               ctrl_chl_idx++;
+                               continue;
+                       }
+
                        if (ipc_imem->pcie->pci->device == INTEL_CP_DEVICE_7360_ID &&
                            chnl_cfg_port.wwan_port_type == WWAN_PORT_MBIM) {
                                ctrl_chl_idx++;