Skip to contentSkip to conversation

Revert "net: wwan: iosm: firmware flashing and coredump collection"

PATCH Applied Jakub Kicinski 3 participants 4 messages Sep 15, 2021 – Sep 16, 2021

Subsystems (4)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 Revert "net: wwan: iosm: firmware flashing and coredump collection"

The devlink parameters are not the right mechanism to pass extra parameters to device flashing. The params added are also undocumented.

This reverts commit 13bb8429ca98 ("net: wwan: iosm: firmware flashing and coredump collection").

---
 drivers/net/wwan/Kconfig                  |   1 -
 drivers/net/wwan/iosm/Makefile            |   5 +-
 drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c |   6 +-
 drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.h |   1 -
 drivers/net/wwan/iosm/iosm_ipc_coredump.c | 110 -----
 drivers/net/wwan/iosm/iosm_ipc_coredump.h |  75 ---
 drivers/net/wwan/iosm/iosm_ipc_devlink.c  | 360 --------------
 drivers/net/wwan/iosm/iosm_ipc_devlink.h  | 207 --------
 drivers/net/wwan/iosm/iosm_ipc_flash.c    | 562 ----------------------
 drivers/net/wwan/iosm/iosm_ipc_flash.h    | 271 -----------
 drivers/net/wwan/iosm/iosm_ipc_imem.c     | 103 +---
 drivers/net/wwan/iosm/iosm_ipc_imem.h     |  18 +-
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 317 ------------
 drivers/net/wwan/iosm/iosm_ipc_imem_ops.h |  49 +-
 14 files changed, 31 insertions(+), 2054 deletions(-)
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_coredump.c
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_coredump.h
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_devlink.c
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_devlink.h
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_flash.c
 delete mode 100644 drivers/net/wwan/iosm/iosm_ipc_flash.h
drivers/net/wwan/Kconfig +0 -1
index 17543be14665..77dbfc418bce 100644
@@ -71,7 +71,6 @@ config RPMSG_WWAN_CTRL
 config IOSM
 	tristate "IOSM Driver for Intel M.2 WWAN Device"
 	depends on INTEL_IOMMU
-	select NET_DEVLINK
 	help
 	  This driver enables Intel M.2 WWAN Device communication.
 
drivers/net/wwan/iosm/Makefile +1 -4
index b838034bb120..4f9f0ae398e1 100644
@@ -18,9 +18,6 @@ iosm-y = \
 	iosm_ipc_protocol.o		\
 	iosm_ipc_protocol_ops.o	\
 	iosm_ipc_mux.o			\
-	iosm_ipc_mux_codec.o		\
-	iosm_ipc_devlink.o		\
-	iosm_ipc_flash.o		\
-	iosm_ipc_coredump.o
+	iosm_ipc_mux_codec.o
 
 obj-$(CONFIG_IOSM) := iosm.o
drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c +1 -5
index 128c999e08bb..519361ec40df 100644
@@ -8,7 +8,7 @@
 #include "iosm_ipc_chnl_cfg.h"
 
 /* Max. sizes of a downlink buffers */
-#define IPC_MEM_MAX_DL_FLASH_BUF_SIZE (64 * 1024)
+#define IPC_MEM_MAX_DL_FLASH_BUF_SIZE (16 * 1024)
 #define IPC_MEM_MAX_DL_LOOPBACK_SIZE (1 * 1024 * 1024)
 #define IPC_MEM_MAX_DL_AT_BUF_SIZE 2048
 #define IPC_MEM_MAX_DL_RPC_BUF_SIZE (32 * 1024)
@@ -60,10 +60,6 @@ static struct ipc_chnl_cfg modem_cfg[] = {
 	{ IPC_MEM_CTRL_CHL_ID_6, IPC_MEM_PIPE_12, IPC_MEM_PIPE_13,
 	  IPC_MEM_MAX_TDS_MBIM, IPC_MEM_MAX_TDS_MBIM,
 	  IPC_MEM_MAX_DL_MBIM_BUF_SIZE, WWAN_PORT_MBIM },
-	/* Flash Channel/Coredump Channel */
-	{ IPC_MEM_CTRL_CHL_ID_7, IPC_MEM_PIPE_0, IPC_MEM_PIPE_1,
-	  IPC_MEM_MAX_TDS_FLASH_UL, IPC_MEM_MAX_TDS_FLASH_DL,
-	  IPC_MEM_MAX_DL_FLASH_BUF_SIZE, WWAN_PORT_UNKNOWN },
 };
 
 int ipc_chnl_cfg_get(struct ipc_chnl_cfg *chnl_cfg, int index)
drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.h +0 -1
index e77084e76718..422471367f78 100644
@@ -23,7 +23,6 @@ enum ipc_channel_id {
 	IPC_MEM_CTRL_CHL_ID_4,
 	IPC_MEM_CTRL_CHL_ID_5,
 	IPC_MEM_CTRL_CHL_ID_6,
-	IPC_MEM_CTRL_CHL_ID_7,
 };
 
 /**
drivers/net/wwan/iosm/iosm_ipc_coredump.c deleted +0 -110

110 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_coredump.h deleted +0 -75

75 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_devlink.c deleted +0 -360

360 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_devlink.h deleted +0 -207

207 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_flash.c deleted +0 -562

562 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_flash.h deleted +0 -271

271 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_imem.c +25 -78

162 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_imem.h +3 -15
index 6be6708b4eec..dc65b0712261 100644
@@ -69,7 +69,7 @@ struct ipc_chnl_cfg;
 
 #define IMEM_IRQ_DONT_CARE (-1)
 
-#define IPC_MEM_MAX_CHANNELS 8
+#define IPC_MEM_MAX_CHANNELS 7
 
 #define IPC_MEM_MUX_IP_SESSION_ENTRIES 8
 
@@ -98,7 +98,6 @@ struct ipc_chnl_cfg;
 #define IPC_MEM_DL_ETH_OFFSET 16
 
 #define IPC_CB(skb) ((struct ipc_skb_cb *)((skb)->cb))
-#define IOSM_CHIP_INFO_SIZE_MAX 100
 
 #define FULLY_FUNCTIONAL 0
 
@@ -305,9 +304,9 @@ enum ipc_phase {
  * @ipc_port:			IPC PORT data structure pointer
  * @pcie:			IPC PCIe
  * @dev:			Pointer to device structure
+ * @flash_channel_id:		Reserved channel id for flashing to RAM.
  * @ipc_requested_state:	Expected IPC state on CP.
  * @channels:			Channel list with UL/DL pipe pairs.
- * @ipc_devlink:		IPC Devlink data structure pointer
  * @ipc_status:			local ipc_status
  * @nr_of_channels:		number of configured channels
  * @startup_timer:		startup timer for NAND support.
@@ -350,9 +349,9 @@ struct iosm_imem {
 	struct iosm_cdev *ipc_port[IPC_MEM_MAX_CHANNELS];
 	struct iosm_pcie *pcie;
 	struct device *dev;
+	int flash_channel_id;
 	enum ipc_mem_device_ipc_state ipc_requested_state;
 	struct ipc_mem_channel channels[IPC_MEM_MAX_CHANNELS];
-	struct iosm_devlink *ipc_devlink;
 	u32 ipc_status;
 	u32 nr_of_channels;
 	struct hrtimer startup_timer;
@@ -576,15 +575,4 @@ void ipc_imem_ipc_init_check(struct iosm_imem *ipc_imem);
  */
 void ipc_imem_channel_init(struct iosm_imem *ipc_imem, enum ipc_ctype ctype,
 			   struct ipc_chnl_cfg chnl_cfg, u32 irq_moderation);
-
-/**
- * ipc_imem_devlink_trigger_chip_info - Inform devlink that the chip
- *					information are available if the
- *					flashing to RAM interworking shall be
- *					executed.
- * @ipc_imem:	Pointer to imem structure
- *
- * Returns: 0 on success, -1 on failure
- */
-int ipc_imem_devlink_trigger_chip_info(struct iosm_imem *ipc_imem);
 #endif
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +0 -317

326 lines not on this page · raw message

drivers/net/wwan/iosm/iosm_ipc_imem_ops.h +1 -48

59 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Thursday, September 16, 2021 3:28 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Kumar, M Chetan <[email protected]>; Jakub Kicinski <[email protected]>
Subject: [PATCH net-next] Revert "net: wwan: iosm: firmware flashing and coredump collection"

Quoted 3 lines

The devlink parameters are not the right mechanism to pass extra parameters to device flashing. The params added are also undocumented.

Could you please suggest us how should we pass extra parameters ? Also I was about to submit the patch for documentation!!

author maintainer
#2 lore raw
Quoted 10 lines · M Chetan
Quoted 10 lines

-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Thursday, September 16, 2021 3:28 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Kumar, M Chetan <[email protected]>; Jakub Kicinski <[email protected]>
Subject: [PATCH net-next] Revert "net: wwan: iosm: firmware flashing and coredump collection"

Quoted 5 lines
Quoted 3 lines

The devlink parameters are not the right mechanism to pass extra parameters to device flashing. The params added are also undocumented.

Could you please suggest us how should we pass extra parameters ?

Once you document them, we'll know what they are, why they are needed etc.

Quoted 1 line

Also I was about to submit the patch for documentation!!

2 days later. I'd much rather have the code reverted and then it's on you to fix it, not on me to chase you.

#3 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Wed, 15 Sep 2021 14:58:23 -0700 you wrote:

The devlink parameters are not the right mechanism to pass extra parameters to device flashing. The params added are also undocumented.

This reverts commit 13bb8429ca98 ("net: wwan: iosm: firmware flashing and coredump collection").

[...]

Here is the summary with links:
- [net-next] Revert "net: wwan: iosm: firmware flashing and coredump collection"

    https://git.kernel.org/netdev/net-next/c/d1ab2647de32

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html