Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3685266pxb; Mon, 24 Jan 2022 15:18:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3SJSSXTM3ZnrYPoi7WgSGmXbpOSCY1s+xHHsQeD/FUHyW3b0xgGhxcAwIoV5cyWEjkNA/ X-Received: by 2002:aa7:961d:0:b0:4ca:b9fc:4f63 with SMTP id q29-20020aa7961d000000b004cab9fc4f63mr1292101pfg.7.1643066330074; Mon, 24 Jan 2022 15:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643066330; cv=none; d=google.com; s=arc-20160816; b=URtFOikMPlwYsULz3ZdlExAURnpFKNLZsKLv/yALTCK1Xii7y/A/CiWWXzl6Bi0yZ1 M++7Ut89k3wyzTSqk0zV9v7Ac1skjsdt8ZkJPtpfPMvMv2CSIu8nvfkiSDY6hTRc8ca+ E2o7A9nX59tLsU05KmT4Bvxwa3gRKP32ta4UbjXquYR0e0QXT6szbrMIxA8K3mJ6Z6ci +P1zySULd5muvnk5Gi41LAsxXixy5vVj3hQbchbANjVLGqo4iPoFaPYTF33AH02ptDH3 49EjgXXiQ1WKL1bNmaKOjLf2JRM+rDOWpGXXHRpnnzO8MYBbJlnMAiiDdsPCWhZJr3iJ 7kng== 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=WDcH1sYfmAsOc04OJWcmPZuLN8Bk8wMjdVlcoEVlcAI=; b=JiapTKP/sz+l0iEz+Qy3n6bqKjcZZxXtFI3mkX4vTE77W6w5O4pKfiKzMaKCx2c+Fw L7B/SvTB1DZRjPgJSvait3zfU7quTqvFgPf8qzoTpfQxcXwf/Ru4jNWuAcr0Z0+JW3vx JmmIdSA5dDdbjVIYCjBFb69Pv4EU20Qhuwxr33vmS8qFljcN3UY1m4ipiJpsBeuz4mEV I2ZpjQNDHvPRdLjWOlfP5bKwVCRK7AR6VnnA3f3IlJbhjIcuPVe83yiYxhm95MC/Gc0/ pVDpq6j9LUnVvAXBnTWNeviri9XL00+ijef3vMCeMRcOQxQ7XTx0ZZPbatEqGnWwycE4 V/aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vRNKmVtX; 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 y3si14843622pgp.711.2022.01.24.15.18.37; Mon, 24 Jan 2022 15:18:50 -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=vRNKmVtX; 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 S1846218AbiAXXPK (ORCPT + 99 others); Mon, 24 Jan 2022 18:15:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1584644AbiAXWVa (ORCPT ); Mon, 24 Jan 2022 17:21:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE896C0424FC; Mon, 24 Jan 2022 12:52:41 -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 ams.source.kernel.org (Postfix) with ESMTPS id B6013B80CCF; Mon, 24 Jan 2022 20:52:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D47EDC340E5; Mon, 24 Jan 2022 20:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057559; bh=cGkIIs7Swic0pBA9MwyHbRPpUVHZFwFdQXV7Danwej8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRNKmVtXr6ufMLI92Qeeul+igG9+BHRTyqkMNRwVilVZXfGEPKXxYP8Nt7+CYsmJ/ 4iASBgoBDZ3HckdPWwDNzNgcihrUXf6xZoStAJN/quOCpN/h2pkpxspEo3nGoDwyKg mO79aYFmBi1eWInt7+4btba5dcR95+OLTcoxYXjo= 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.15 831/846] net: wwan: Fix MRU mismatch issue which may lead to data connection lost Date: Mon, 24 Jan 2022 19:45:48 +0100 Message-Id: <20220124184129.575715171@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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(-) 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.34.1