From patchwork Tue Mar 10 02:15:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 708DCC10F27 for ; Tue, 10 Mar 2020 02:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 417ED24676 for ; Tue, 10 Mar 2020 02:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806529; bh=G6vvPWKbYx9e8RUVzw5sRQCo1554TGd8JMnHv1JkSTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0woJOn3as9RePaLNp+jL80l0Lojl9bgLdQSiiXE+ltFXe97iRNQ/0De6j88QrHoXC aiJqRP2EB6meCXX5Kyx1O3WhecvDeJj3qsjMyZtc8AAO+a1vaoDbQV/DN2xKMHkjI7 panbP0UYxchpDj8CMAWS+yrdBxurWhJjBg2s1FdQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbgCJCP2 (ORCPT ); Mon, 9 Mar 2020 22:15:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35660 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgCJCPY (ORCPT ); Mon, 9 Mar 2020 22:15:24 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.128]) (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 5F45D24679; Tue, 10 Mar 2020 02:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583806524; bh=G6vvPWKbYx9e8RUVzw5sRQCo1554TGd8JMnHv1JkSTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zjf+77aZ81R9jGlhpARsClt3U1MjZanHLyBetWhEEH9xrUpDSOV+epFrwVppyFRuP /AqXMM+s3vaiWN2c76yuIxcwXITzfP9xWbZvhRl9u/7gE3oPOI7XpH1oVhBmtJZzyk 0Bx37A6yRJFuW+E+rj3RSF29eO0hvo08cOlmN7Jg= From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, akiyano@amazon.com, netanel@amazon.com, gtzalik@amazon.com, irusskikh@marvell.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, rmody@marvell.com, GR-Linux-NIC-Dev@marvell.com, aelior@marvell.com, skalluru@marvell.com, GR-everest-linux-l2@marvell.com, opendmb@gmail.com, siva.kallam@broadcom.com, prashant@broadcom.com, mchan@broadcom.com, dchickles@marvell.com, sburla@marvell.com, fmanlunas@marvell.com, tariqt@mellanox.com, vishal@chelsio.com, leedom@chelsio.com, ulli.kroll@googlemail.com, linus.walleij@linaro.org, Jakub Kicinski Subject: [PATCH net-next 07/15] net: tg3: reject unsupported coalescing params Date: Mon, 9 Mar 2020 19:15:04 -0700 Message-Id: <20200310021512.1861626-8-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200310021512.1861626-1-kuba@kernel.org> References: <20200310021512.1861626-1-kuba@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters. This driver did not previously reject unsupported parameters. Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/broadcom/tg3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 16c1c9f150f1..ff98a82b7bc4 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -14153,6 +14153,11 @@ static int tg3_get_eee(struct net_device *dev, struct ethtool_eee *edata) } static const struct ethtool_ops tg3_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES | + ETHTOOL_COALESCE_USECS_IRQ | + ETHTOOL_COALESCE_MAX_FRAMES_IRQ | + ETHTOOL_COALESCE_STATS_BLOCK_USECS, .get_drvinfo = tg3_get_drvinfo, .get_regs_len = tg3_get_regs_len, .get_regs = tg3_get_regs,