[PATCH 0/4] net: wwan: iosm: fixes

STALE1826d

Revision v1 of 4 in this series.

9 messages, 3 authors, 2021-08-05 · open the first message on its own page

[PATCH 0/4] net: wwan: iosm: fixes

From: M Chetan Kumar <hidden>
Date: 2021-08-04 16:13:12

This patch series contains IOSM Driver fixes. Below is the patch
series breakdown.

PATCH1:
* Correct the td buffer type casting & format specifier to fix lkp buildbot
warning.

PATCH2:
* Endianness type correction for nr_of_bytes. This field is exchanged
as part of host-device protocol communication.

PATCH3:
* Correct ul/dl data protocol mask bit to know which protocol capability
does device implement.

PATCH4:
* Calling unregister_netdevice() inside wwan del link is trying to
acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
be unregistered later.

--
M Chetan Kumar (4):
  net: wwan: iosm: fix lkp buildbot warning
  net: wwan: iosm: endianness type correction
  net: wwan: iosm: correct data protocol mask bit
  net: wwan: iosm: fix recursive lock acquire in unregister

 drivers/net/wwan/iosm/iosm_ipc_mmio.h         | 4 ++--
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c    | 4 ++--
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.h    | 2 +-
 drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c | 4 ++--
 drivers/net/wwan/iosm/iosm_ipc_wwan.c         | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.25.1

[PATCH 1/4] net: wwan: iosm: fix lkp buildbot warning

From: M Chetan Kumar <hidden>
Date: 2021-08-04 16:13:22

Correct td buffer type casting & format specifier to fix lkp buildbot
warning.

Reported-by: kernel test robot <redacted>
Signed-off-by: M Chetan Kumar <redacted>
---
 drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c b/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
index 91109e27efd3..35d590743d3a 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c
@@ -412,8 +412,8 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol,
 	}
 
 	if (p_td->buffer.address != IPC_CB(skb)->mapping) {
-		dev_err(ipc_protocol->dev, "invalid buf=%p or skb=%p",
-			(void *)p_td->buffer.address, skb->data);
+		dev_err(ipc_protocol->dev, "invalid buf=%llx or skb=%p",
+			(unsigned long long)p_td->buffer.address, skb->data);
 		ipc_pcie_kfree_skb(ipc_protocol->pcie, skb);
 		skb = NULL;
 		goto ret;
-- 
2.25.1

[PATCH 2/4] net: wwan: iosm: endianness type correction

From: M Chetan Kumar <hidden>
Date: 2021-08-04 16:13:23

Endianness type correction for nr_of_bytes. This field is exchanged
as part of host-device protocol communication.

Signed-off-by: M Chetan Kumar <redacted>
---
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 4 ++--
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
index 562de275797a..bdb2d32cdb6d 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
@@ -320,7 +320,7 @@ static void ipc_mux_dl_fcth_decode(struct iosm_mux *ipc_mux,
 		return;
 	}
 
-	ul_credits = fct->vfl.nr_of_bytes;
+	ul_credits = le32_to_cpu(fct->vfl.nr_of_bytes);
 
 	dev_dbg(ipc_mux->dev, "Flow_Credit:: if_id[%d] Old: %d Grants: %d",
 		if_id, ipc_mux->session[if_id].ul_flow_credits, ul_credits);
@@ -586,7 +586,7 @@ static bool ipc_mux_lite_send_qlt(struct iosm_mux *ipc_mux)
 		qlt->reserved[0] = 0;
 		qlt->reserved[1] = 0;
 
-		qlt->vfl.nr_of_bytes = session->ul_list.qlen;
+		qlt->vfl.nr_of_bytes = cpu_to_le32(session->ul_list.qlen);
 
 		/* Add QLT to the transfer list. */
 		skb_queue_tail(&ipc_mux->channel->ul_list,
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.h b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.h
index 4a74e3c9457f..aae83db5cbb8 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.h
+++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.h
@@ -106,7 +106,7 @@ struct mux_lite_cmdh {
  * @nr_of_bytes:	Number of bytes available to transmit in the queue.
  */
 struct mux_lite_vfl {
-	u32 nr_of_bytes;
+	__le32 nr_of_bytes;
 };
 
 /**
-- 
2.25.1

[PATCH 4/4] net: wwan: iosm: fix recursive lock acquire in unregister

From: M Chetan Kumar <hidden>
Date: 2021-08-04 16:13:28

Calling unregister_netdevice() inside wwan del link is trying to
acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
be unregistered later.

Signed-off-by: M Chetan Kumar <redacted>
---
 drivers/net/wwan/iosm/iosm_ipc_wwan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
index b2357ad5d517..b571d9cedba4 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c
@@ -228,7 +228,7 @@ static void ipc_wwan_dellink(void *ctxt, struct net_device *dev,
 
 	RCU_INIT_POINTER(ipc_wwan->sub_netlist[if_id], NULL);
 	/* unregistering includes synchronize_net() */
-	unregister_netdevice(dev);
+	unregister_netdevice_queue(dev, head);
 
 unlock:
 	mutex_unlock(&ipc_wwan->if_mutex);
-- 
2.25.1

[PATCH 3/4] net: wwan: iosm: correct data protocol mask bit

From: M Chetan Kumar <hidden>
Date: 2021-08-04 16:13:28

Correct ul/dl data protocol mask bit to know which protocol capability
does device implement.

Signed-off-by: M Chetan Kumar <redacted>
---
 drivers/net/wwan/iosm/iosm_ipc_mmio.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_mmio.h b/drivers/net/wwan/iosm/iosm_ipc_mmio.h
index 45e6923da78f..f861994a6d90 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_mmio.h
+++ b/drivers/net/wwan/iosm/iosm_ipc_mmio.h
@@ -10,10 +10,10 @@
 #define IOSM_CP_VERSION 0x0100UL
 
 /* DL dir Aggregation support mask */
-#define DL_AGGR BIT(23)
+#define DL_AGGR BIT(9)
 
 /* UL dir Aggregation support mask */
-#define UL_AGGR BIT(22)
+#define UL_AGGR BIT(8)
 
 /* UL flow credit support mask */
 #define UL_FLOW_CREDIT BIT(21)
-- 
2.25.1

Re: [PATCH 2/4] net: wwan: iosm: endianness type correction

From: Loic Poulain <hidden>
Date: 2021-08-04 16:59:47

On Wed, 4 Aug 2021 at 18:11, M Chetan Kumar
[off-list ref] wrote:
Endianness type correction for nr_of_bytes. This field is exchanged
as part of host-device protocol communication.

Signed-off-by: M Chetan Kumar <redacted>
Reviewed-by: Loic Poulain <redacted>

Re: [PATCH 4/4] net: wwan: iosm: fix recursive lock acquire in unregister

From: Loic Poulain <hidden>
Date: 2021-08-04 17:00:12

On Wed, 4 Aug 2021 at 18:11, M Chetan Kumar
[off-list ref] wrote:
Calling unregister_netdevice() inside wwan del link is trying to
acquire the held lock in ndo_stop_cb(). Instead, queue net dev to
be unregistered later.

Signed-off-by: M Chetan Kumar <redacted>
Reviewed-by: Loic Poulain <redacted>

Re: [PATCH 3/4] net: wwan: iosm: correct data protocol mask bit

From: Loic Poulain <hidden>
Date: 2021-08-04 17:00:55

On Wed, 4 Aug 2021 at 18:11, M Chetan Kumar
[off-list ref] wrote:
Correct ul/dl data protocol mask bit to know which protocol capability
does device implement.

Signed-off-by: M Chetan Kumar <redacted>
Reviewed-by: Loic Poulain <redacted>

Re: [PATCH 0/4] net: wwan: iosm: fixes

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-08-05 10:30:08

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Wed,  4 Aug 2021 21:39:48 +0530 you wrote:
This patch series contains IOSM Driver fixes. Below is the patch
series breakdown.

PATCH1:
* Correct the td buffer type casting & format specifier to fix lkp buildbot
warning.

[...]
Here is the summary with links:
  - [1/4] net: wwan: iosm: fix lkp buildbot warning
    https://git.kernel.org/netdev/net/c/5a7c1b2a5bb4
  - [2/4] net: wwan: iosm: endianness type correction
    https://git.kernel.org/netdev/net/c/b46c5795d641
  - [3/4] net: wwan: iosm: correct data protocol mask bit
    https://git.kernel.org/netdev/net/c/c98f5220e970
  - [4/4] net: wwan: iosm: fix recursive lock acquire in unregister
    https://git.kernel.org/netdev/net/c/679505baaaab

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help