Fix MRU mismatch issue which may lead to data connection lost
Subsystems (3)
PATCH 1/1 Fix MRU mismatch issue which may lead to data connection lost
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.
--- drivers/net/wwan/mhi_wwan_mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wwan/mhi_wwan_mbim.c +2 -2
@@ -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 ;
Signature · 1 line
2.25.1
Quoted 6 lines · Slark Xiao
In
pci_generic.cthere is a 'mru_default' in structmhi_pci_dev_info.
This value shall be used for whole mhi if it's given a value for a specific product. But in functionmhi_net_rx_refill_work(), it's still using hard code valueMHI_DEFAULT_MRU. 'mru_default' shall have higher priority thanMHI_DEFAULT_MRU.
And after checking, this change could help fix a data connection lost issue.
Interesting, not sure why it fixes data issues, since the device should comply with any size.Can you add a Fixes tag then? and add the correct [PATCH net] suffix in the subject:
https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html
With that:
Thanks,
Loic
Quoted 30 lines
Signed-off-by Shujun Wang <[email protected]>Signed-off-by Slark Xiao <[email protected]>--- drivers/net/wwan/mhi_wwan_mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/wwan/mhi_wwan_mbim.c +2
-3@@ -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
Quoted 13 lines · Loic Poulain
Quoted 6 lines · Slark Xiao
In
pci_generic.cthere is a 'mru_default' in structmhi_pci_dev_info.
This value shall be used for whole mhi if it's given a value for a specific product. But in functionmhi_net_rx_refill_work(), it's still using hard code valueMHI_DEFAULT_MRU. 'mru_default' shall have higher priority thanMHI_DEFAULT_MRU.
And after checking, this change could help fix a data connection lost issue.Interesting, not sure why it fixes data issues, since the device should comply with any size.Can you add a Fixes tag then? and add the correct [PATCH net] suffix in the subject:
https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html
Quoted 7 lines
With that:
Reviewed-by Loic Poulain <[email protected]>Thanks,
Loic
Hi Loic,
Actually, for our Foxconn device SDX55, it has been confirmed that MRU 3500
would lead to a IPA stuck. IPA stuck would make the data connection lost. For other MRU value, like 4000, 4096,32768, we can't reproduce it.
We also have report this issue in https://bugzilla.kernel.org/show_bug.cgi?id=215433 . I will send a new patch later.
Thanks
Slark
Quoted 33 lines
Quoted 33 lines
Signed-off-by Shujun Wang <[email protected]>Signed-off-by Slark Xiao <[email protected]>--- drivers/net/wwan/mhi_wwan_mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/wwan/mhi_wwan_mbim.c +2
-3@@ -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