From patchwork Sun Jun 9 16:41:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166228 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp51040ilk; Sun, 9 Jun 2019 09:45:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIGdlpbO2/VVdUe+L6tzYbmd+nb1firdTd4zwK+fby/PtDSH1KIYibXNqsHLhSZZowoD30 X-Received: by 2002:a63:2325:: with SMTP id j37mr12028595pgj.137.1560098727853; Sun, 09 Jun 2019 09:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560098727; cv=none; d=google.com; s=arc-20160816; b=1A7wlJfwW8q7R5Kpb6dwtfvhcXbP58vNBuWZ48AnB2aETwrQFIr2ahas2z43m6vARh g38WQo/XXlZpoi7u9AjfPmWtACh1KtKtYozxywbmALpyP1XCtfuMzVwZTVTmEw/wdBQU Vl/vjZWCj5GLEWx68Tw3DlYoK+/i9zfKd1x7hfG9OjDbRyNfIqT65O8NktqTCk/I36+T gZRFuudXktv8cTMV3qXq+O+eya+B4pRW3BtEsHSOXhRfufEzs1Yk0lVoWwfGLxOQp18P 9jVnZoD2c4iY6tSLJxVEWc5cdfzXLbF61c4M5OIwVnqWLs+f/HoqqsbvxrpYGtfKke1r eLLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=axCyRxPH9QkYROM7Y7LDybeicZ3oaini45r2vlJYxio=; b=VP/0hgg57weN9Vr7Fhm2I/0v4rEW4HXzQXM3i7FAkiML3vW24TjOEQgU9IPaZN48sw zeID2CT37W6FlYNdXi5+UrhtAWzn8xvEDtqfhcLzjjySP4lFCgRR4+4aHL5qB+4Ka/Rn hMqVfMRsusBFhHE2R50SI2c1qUHn+MGZkNTEIOo1BprbY6Z9ppPemKx4kgQM9EcbGJKb qJ71e3qsfq0EJxcxAkhnyurrApoaopOgUAJEbHauZTuEoN/WuZ84hVbCk8E0ltakFIvs xBHPwM5EbQPzJhyBGyYKzFhJ7cot5ouF0igcjOZlHfBMdUD+tTmqji2Zy/O56NnKvCvb rq1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kgBl2MWZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j185si4202841pfb.107.2019.06.09.09.45.27; Sun, 09 Jun 2019 09:45:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kgBl2MWZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729860AbfFIQp0 (ORCPT + 30 others); Sun, 9 Jun 2019 12:45:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:43112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729819AbfFIQpX (ORCPT ); Sun, 9 Jun 2019 12:45:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57DC1208C0; Sun, 9 Jun 2019 16:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560098722; bh=+ELwdBOFtrzvOaBRNKfhVZazyTXF5oPZNYlHypdAi38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgBl2MWZEYY0ZHbfODcEi3UWmnvwbRNIN6kuY2drKnupqlFCMoMbu3Q6pFn4C0RTp 8KxIm3oMtrTW63lTr/NveXXJBjAi/k/9Axrrl96fl4ZIdvfskWTjVU0Uh7VUziVc6S UGkCzTd5xiC1u7QNBaKo6/CUVnWxH5GEOG1434Ho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Khoronzhuk , Grygorii Strashko , "David S. Miller" Subject: [PATCH 5.1 05/70] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set Date: Sun, 9 Jun 2019 18:41:16 +0200 Message-Id: <20190609164127.808088328@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164127.541128197@linuxfoundation.org> References: <20190609164127.541128197@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ivan Khoronzhuk [ Upstream commit 09faf5a7d7c0bcb07faba072f611937af9dd5788 ] Fix ability to set RX descriptor number, the reason - initially "tx_max_pending" was set incorrectly, but the issue appears after adding sanity check, so fix is for "sanity" patch. Fixes: 37e2d99b59c476 ("ethtool: Ensure new ring parameters are within bounds during SRINGPARAM") Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -3130,6 +3130,7 @@ static void cpsw_get_ringparam(struct ne struct cpsw_common *cpsw = priv->cpsw; /* not supported */ + ering->tx_max_pending = descs_pool_size - CPSW_MAX_QUEUES; ering->tx_max_pending = 0; ering->tx_pending = cpdma_get_num_tx_descs(cpsw->dma); ering->rx_max_pending = descs_pool_size - CPSW_MAX_QUEUES;