Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp711897pxb; Fri, 14 Jan 2022 14:43:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnH7Ad1RhCDDsYL08wGoMzL6XZFQ3/wobN956cjOHmoudMDsw6U55a2k9El53hbVpUI7t/ X-Received: by 2002:a17:902:eccb:b0:14a:4176:e8ed with SMTP id a11-20020a170902eccb00b0014a4176e8edmr11383592plh.54.1642200212584; Fri, 14 Jan 2022 14:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642200212; cv=none; d=google.com; s=arc-20160816; b=MSOVHcr0wOpCeMjRpu77WmDHRCMiLV1NCCVPkyQbVFH509dU/zczErPC9PD7XBZ6TE z0OhuYTvmk4rYCX/cRxD7SOUneUcTxnF2s/PeSQj9IHVXzqXK7LsiUEzVl3u6iKGN4AK Bxuv9CdnYqb/SBrJSE4xrbIXYAoDJtq15of/oVF1XAg8E5TQ+EL8TuO4l6/85WI8Ig1L XQjA5IRmeOlO+9KWkbf9jgCpKC6Sbqd+i1dFtBDi2BPUNHEaLcDXU/EzN+i/qje/PCgm ECX77eeOjA2PTO7vi67i+QgkV/CP4GVEve3A4hwcNGR7uo7ukN4xRKugBlJBqJxFm/Cv xIUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jNaxVdqcvxk4ig8CiPTI/3ybr3pqmqtJQMGQjw9Y0e4=; b=cwqJR3eTyjBQTQmnParMxsqkRklHgmuK3eAzR8un7JjyDqkisUP2zewNOdu9VX06en moWQUUfg4SOskCJboIDbJK/ZjmHFlYHOQy1jVjSjTmhY4JfEY022Lc7xfOxZ6e3KaeA9 YCgPZpifNspTfK7MSI+ohLmDDBXdN9cMkW5y6c7ZtqAA6aGuiyXXhPLhtVCHYmTmEhGu 4wkkkadHo+Oa2P5dmwDH4hGBOSMneQ1qRtl3KnitDHSj71FpviX4vtPfDVpQPJqZ7e3M zfL6RZWsvN4M7XS72IVwuu6eBoPJbIRez9zSzqaS/GnZ0JPNrLnjL4diVmRBLxynHBDu Redw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zvo62ixu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si1560666plg.257.2022.01.14.14.43.20; Fri, 14 Jan 2022 14:43:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zvo62ixu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242987AbiANPvw (ORCPT + 99 others); Fri, 14 Jan 2022 10:51:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235921AbiANPvw (ORCPT ); Fri, 14 Jan 2022 10:51:52 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CC8C06161C for ; Fri, 14 Jan 2022 07:51:51 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id f144so2323968pfa.6 for ; Fri, 14 Jan 2022 07:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jNaxVdqcvxk4ig8CiPTI/3ybr3pqmqtJQMGQjw9Y0e4=; b=Zvo62ixuU8bmNF6Y5DE2DlhCbe5x4+tyC0ye65STw4lO4Ah8L9UYJk+zp8t55vM6ZD GN+fwIJz3c7F4cmvcdxjlrZ4S/98M78y1JgqeJ969ySE1bOBR8uC57y1PBg75jrkb6mf HjqKBtKe31DVfoQilcoDIJhlboTPE7XsZYlU4uZchLeUHmVZrUB3XJbSG2t6GlMsN3ag bLC0ZgPjRtdp6FX3VJpiWiA2jmO6oRS9CKk8KPH0EOn7TgHRjvKEF1RVqLumID/bv7cc Ze6zX1RAzbquCMJTFGy4JqtLA7nfdKBKH9eZ3JHJJmmfj7r/G0JrTLuPdLd4Guky8GKK VYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jNaxVdqcvxk4ig8CiPTI/3ybr3pqmqtJQMGQjw9Y0e4=; b=1hlOCGYq3Bd4QrKRwzL3wDHzV94YJ3kyfUpIIPcLdji0gSy6+chS1ftaaxTqrP0LS7 4KGG9J/Bi3VO9oYeQ0C3Q1mPuNWknwenv1YHExOjVo2NtGNdetTj1XjbO627vrRQmsfg wMptS2GkHhy5Qm47fiWPnXeqigtMwLh1Fw+Eni/zhVrKmxVnr0dPVHpd0pS4JEvebdd5 FVmLdGL+Woh7DNI69eGDwpZ1pUZqHDUZJCExI1WoTyownsYrlOeNd5lIY9o63RzS2gKN pEDmymmNozBuXCdZHceqiikpSZW7Of9IkySjEsAlm0kWpxhZ02CIeAUSC7bXpxTqSx6L 3goA== X-Gm-Message-State: AOAM531IF1fPlMkDmcLdxfYIqJe2JPYMsCqWif5muB4Mg6oSNafoerb5 x5mrN1d2/nJPKjGE5RUbym2fJjSHYsQUZnSXgb2O0qFs/gQ= X-Received: by 2002:a63:255:: with SMTP id 82mr8575780pgc.167.1642175510948; Fri, 14 Jan 2022 07:51:50 -0800 (PST) MIME-Version: 1.0 References: <20220114100731.4033-1-slark_xiao@163.com> In-Reply-To: <20220114100731.4033-1-slark_xiao@163.com> From: Loic Poulain Date: Fri, 14 Jan 2022 17:03:39 +0100 Message-ID: Subject: Re: [PATCH] Fix MRU mismatch issue which may lead to data connection lost To: Slark Xiao 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 14 Jan 2022 at 11:07, Slark Xiao 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 Thanks, Loic > > Signed-off-by: Shujun Wang > Signed-off-by: Slark Xiao > --- > 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 >