linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: Slark Xiao <slark_xiao@163.com>
Cc: ryazanov.s.a@gmail.com, johannes@sipsolutions.net,
	davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Shujun Wang <wsj20369@163.com>
Subject: Re: [PATCH] Fix MRU mismatch issue which may lead to data connection lost
Date: Fri, 14 Jan 2022 17:03:39 +0100	[thread overview]
Message-ID: <CAMZdPi8g2VxBFzS7Lw=TAN_NPQSuzwLuhEGB2akqn-Tjqer7vQ@mail.gmail.com> (raw)
In-Reply-To: <20220114100731.4033-1-slark_xiao@163.com>

On Fri, 14 Jan 2022 at 11:07, Slark Xiao <slark_xiao@163.com> 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.

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:

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

Thanks,
Loic




>
> 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
>

  reply	other threads:[~2022-01-14 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 10:07 [PATCH] Fix MRU mismatch issue which may lead to data connection lost Slark Xiao
2022-01-14 16:03 ` Loic Poulain [this message]
2022-01-15  2:10   ` Slark Xiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMZdPi8g2VxBFzS7Lw=TAN_NPQSuzwLuhEGB2akqn-Tjqer7vQ@mail.gmail.com' \
    --to=loic.poulain@linaro.org \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ryazanov.s.a@gmail.com \
    --cc=slark_xiao@163.com \
    --cc=wsj20369@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).