Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3972779pxb; Tue, 25 Jan 2022 00:20:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3BPpcCKftiV0IT9LaMbtKc1X8+5xJnkgFceKI4Zw/SgkHsAuwrrmtPyn+v/pb0pZYx4CS X-Received: by 2002:a05:6402:424e:: with SMTP id g14mr19347238edb.399.1643098838613; Tue, 25 Jan 2022 00:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643098838; cv=none; d=google.com; s=arc-20160816; b=ie2WSX4DvLyBB466rIpQrzi0N7FqhuslBfBkT7hIhE+q5wqf5jRDMr+0zCJRWznS6+ EU3X5CUTfSPkyAvQquZv8Zm666ICJ3myARz0Ak5y1Om8S91HL9y2NKQV+g+876nk1k2V S4vAiX3q6E5xflg4uVz+tMM9MWKgMb4SXzUMPNZ4WCQ0Ttwq5pT1mVG3SqJfYgY8K6ia /UnwH/hJSbOD2JVA5QpjsqGWE6mbbuR/Dg6JaiJFkz+MHhkBzGyw7qtkEqoxV65HD9y2 j/nNvaG+l0YPdRIVjoEQoeUkogGG7/E+Ww1trbuhcpGJi1Tx//ZSSqPF2OwJhQ2F7zOG ITew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N6LXw7K+cWPmw6RLMP8XDnRh2s5XhGtY+DVix1kG+IU=; b=N4nh/DVyrAzq5I6kwePoGfV+bvjBED83bW8rCvPYjgtFVdyUdfjSuNycIssds0Z3Du 4g1e1SEBarva4VAEAMsIl4IvhMjma2UM5I9AMi4OKGPL7vTntlYfs4v9Ocnlby7ZyrsI lCIH1cY9hvVvvMSFR+U5/7YGbKnaSv1L2ERJkYP5ctne3/TjrUc28iZqnB9PeOlFsPQa hT2WoAmdZM3bWw3oGysRRojlxulXzOT/fFFeWcN889XBCHKyk2R2YZdLoYDtPEzdXzko y6b3N9HT2689l3TWInPaRrs5ABJvVSdNSqtVQiRwCoydqmVO4lWLesqqHwgUn0ht5F2S P1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XWmW4FTv; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cr17si9764781ejc.951.2022.01.25.00.20.10; Tue, 25 Jan 2022 00:20:38 -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=@linuxfoundation.org header.s=korg header.b=XWmW4FTv; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3412661AbiAYAh0 (ORCPT + 99 others); Mon, 24 Jan 2022 19:37:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2366209AbiAXXwa (ORCPT ); Mon, 24 Jan 2022 18:52:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 960EBC07A961; Mon, 24 Jan 2022 13:45:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3443C60917; Mon, 24 Jan 2022 21:45:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E76FDC340E7; Mon, 24 Jan 2022 21:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060727; bh=U9D2LDGgbCHgBmgg2XL78R/VmCn/04O+TxeC8NuJNJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XWmW4FTvwnZ6SLJoetVnPCEisw8xvs7vsMGqiSRZzJSIa+jUU/+ECelTEV+plGwDE iNsrTlcp8kqSkTHU0uWpWiScERQI44HPoNscCIIT++EwZJ5plPfZZwYU4sBx6gZSzr UPI3bjx7ejskLemKrk8wBjuOBR8qvReUFygfl/aA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shujun Wang , Slark Xiao , Loic Poulain , "David S. Miller" Subject: [PATCH 5.16 1015/1039] net: wwan: Fix MRU mismatch issue which may lead to data connection lost Date: Mon, 24 Jan 2022 19:46:44 +0100 Message-Id: <20220124184159.412744533@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Slark Xiao commit f542cdfa3083a309e3caafbbdf41490c4935492a upstream. 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 Signed-off-by: Slark Xiao Reviewed-by: Loic Poulain Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/wwan/mhi_wwan_mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 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(struc 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;