All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost
@ 2022-01-15  2:34 Slark Xiao
  2022-01-15 14:18 ` Loic Poulain
  2022-01-15 22:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Slark Xiao @ 2022-01-15  2:34 UTC (permalink / raw)
  To: loic.poulain, ryazanov.s.a, johannes, davem, kuba
  Cc: netdev, linux-kernel, Slark Xiao, Shujun Wang

In pci_generic.c there is a 'mru_default' in struct mhi_pci_dev_info.
This value shall be used for whole mhi if it's given a value for a specific product.
But in function mhi_net_rx_refill_work(), it's still using hard code value MHI_DEFAULT_MRU.
'mru_default' shall have higher priority than MHI_DEFAULT_MRU.
And after checking, this change could help fix a data connection lost issue.

Fixes: 5c2c85315948 ("bus: mhi: pci-generic: configurable network interface MRU")
Signed-off-by: Shujun Wang <wsj20369@163.com>
Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
 drivers/net/wwan/mhi_wwan_mbim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
index 71bf9b4f769f..6872782e8dd8 100644
--- a/drivers/net/wwan/mhi_wwan_mbim.c
+++ b/drivers/net/wwan/mhi_wwan_mbim.c
@@ -385,13 +385,13 @@ static void mhi_net_rx_refill_work(struct work_struct *work)
 	int err;
 
 	while (!mhi_queue_is_full(mdev, DMA_FROM_DEVICE)) {
-		struct sk_buff *skb = alloc_skb(MHI_DEFAULT_MRU, GFP_KERNEL);
+		struct sk_buff *skb = alloc_skb(mbim->mru, GFP_KERNEL);
 
 		if (unlikely(!skb))
 			break;
 
 		err = mhi_queue_skb(mdev, DMA_FROM_DEVICE, skb,
-				    MHI_DEFAULT_MRU, MHI_EOT);
+				    mbim->mru, MHI_EOT);
 		if (unlikely(err)) {
 			kfree_skb(skb);
 			break;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost
  2022-01-15  2:34 [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost Slark Xiao
@ 2022-01-15 14:18 ` Loic Poulain
  2022-01-15 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Loic Poulain @ 2022-01-15 14:18 UTC (permalink / raw)
  To: Slark Xiao
  Cc: Shujun Wang, davem, johannes, kuba, linux-kernel, netdev, ryazanov.s.a

Le sam. 15 janv. 2022 à 03:35, Slark Xiao <slark_xiao@163.com> a écrit :
>
> In pci_generic.c there is a 'mru_default' in struct mhi_pci_dev_info.
> This value shall be used for whole mhi if it's given a value for a specific product.
> But in function mhi_net_rx_refill_work(), it's still using hard code value MHI_DEFAULT_MRU.
> 'mru_default' shall have higher priority than MHI_DEFAULT_MRU.
> And after checking, this change could help fix a data connection lost issue.
>
> Fixes: 5c2c85315948 ("bus: mhi: pci-generic: configurable network interface MRU")
> Signed-off-by: Shujun Wang <wsj20369@163.com>
> Signed-off-by: Slark Xiao <slark_xiao@163.com>
> ---

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost
  2022-01-15  2:34 [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost Slark Xiao
  2022-01-15 14:18 ` Loic Poulain
@ 2022-01-15 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-15 22:50 UTC (permalink / raw)
  To: Slark Xiao
  Cc: loic.poulain, ryazanov.s.a, johannes, davem, kuba, netdev,
	linux-kernel, wsj20369

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Sat, 15 Jan 2022 10:34:30 +0800 you wrote:
> In pci_generic.c there is a 'mru_default' in struct mhi_pci_dev_info.
> This value shall be used for whole mhi if it's given a value for a specific product.
> But in function mhi_net_rx_refill_work(), it's still using hard code value MHI_DEFAULT_MRU.
> 'mru_default' shall have higher priority than MHI_DEFAULT_MRU.
> And after checking, this change could help fix a data connection lost issue.
> 
> Fixes: 5c2c85315948 ("bus: mhi: pci-generic: configurable network interface MRU")
> Signed-off-by: Shujun Wang <wsj20369@163.com>
> Signed-off-by: Slark Xiao <slark_xiao@163.com>
> 
> [...]

Here is the summary with links:
  - [net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost
    https://git.kernel.org/netdev/net/c/f542cdfa3083

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-15 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15  2:34 [PATCH net] net: wwan: Fix MRU mismatch issue which may lead to data connection lost Slark Xiao
2022-01-15 14:18 ` Loic Poulain
2022-01-15 22:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.