From patchwork Mon Apr 29 21:45:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Halaney X-Patchwork-Id: 13647798 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBB71C4345F for ; Mon, 29 Apr 2024 21:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yDdk5+qvMIvAIPQHPfJpJrbwpR+5Lum1sRwyVbAVYow=; b=lkwDbS6uaYtU0l Lu7R1Sng8anD/O4+K83VfAyfnnZaOUzkkkFkm9pNJL1VFK2LF1OmOOPf6wAXHGymXtAH4hP6Al3uQ qVEDsCEuUOK2vtebJobafscZAliyTpyptcEvvcc196PK09WZBXCawM3iL5nieS6yw3fvXTjdDQD/i xyt8vFhevAOrMRKzN+egkdVQ0xYVSO/bwa6y1O7EPwAGOXBp/sbyxRdLLZPhN392buC0hjVCEOQf1 PQsHLZF7ox3h0CX/80yNQ3vRnHdLamzq0duN1Z9vLuf2WIWDBRqbWwZ/UjJ9JbgSdvmRqoxKsmoSm fXk2vVOfa/H1AY0CnUZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1YoK-00000004J3c-2e7W; Mon, 29 Apr 2024 21:45:20 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1YoH-00000004J25-3Jvl for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 21:45:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714427113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QdU3RyAhhNJtPcn7BJGK9yJoXLvf1QCQv7HYg0QISNs=; b=IjwFzcWCeFZXXEhVubskF/7Hl8gSXFYfH8HVjSNZRaHNssH41kdT6QIAIBpb2KeTeLdqvy d1b83KmiiT2aJMo4H25kbHWWcVPieMwEATQKnE+5ncgwLiXcAIzfk6Sw7A03RjiHiRu+Yg BERvRzGw2FZlgbEEhJ094ILbBq6UQlE= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-33-zGMDNFJENLaPfbQEUdd-lg-1; Mon, 29 Apr 2024 17:45:10 -0400 X-MC-Unique: zGMDNFJENLaPfbQEUdd-lg-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1e4ad1c0fc8so66088865ad.2 for ; Mon, 29 Apr 2024 14:45:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714427109; x=1715031909; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QdU3RyAhhNJtPcn7BJGK9yJoXLvf1QCQv7HYg0QISNs=; b=rXdV9GXyHXzDai7znhZLSd1ridsKEZs3vU8k/mioOms4pZMSnLaPDoGveweyDCY1jC zgXvxXsKQ2KAXmU6XRz4hxKajoff+lHvr+B+SPRyUxlkrekjVvdhAspg7dUyw3RCtLDR Blq7I4YvULtauUHS0Gt4Bd/e2xViW6FVWwReTyIXO6gLLTZUk6uRcDoBkmqZpd0d0J8o xK526qiIllhGSSVWToB5+NqJpY02//XLgkzHj2C4IfymIhcUGK2sy1Ew5zJnqJUYnavV K72ykKM9bSvdXHKLzmSctp20ZjGI/IjFKraZ/uFhVwXWBUVyGsBRaazXJTe1fGxOTVR5 zMkQ== X-Forwarded-Encrypted: i=1; AJvYcCVeL6OrYR9+Sd0gWg8nt1drpmFbg0PAlNfCrgjOSHcOCk2KAilwXqIeTkUaSTXGAKaDe8Tv8oxfEQQA4EE2RxEr9vv5TxF6imv8MoLx13DSUYGU0pA= X-Gm-Message-State: AOJu0Yzd4l9AHKpwE7bGzGADGJWK79MzU4+gNFeUpIlsLawQBighsfwR x2Yx+V75x40gGOi/rc4EROwQxuQmfP/oP1xaRhbMZBs/29H9JAN9YD+lTqGIL9kq4DI8aSaNTl4 S6qDgTk4sj4iXkkM7yGBZmwnvT4ewS3Pmk6D60sJ4yPkb2AFVBn4NXi/LJtqvxHPNwHqiHDCSIY Zg53S5XAmFvf9UvPBOWS+xHIXt5S6TB8bzJQbBRC25U1XztAcRLOKRRCYA X-Received: by 2002:a17:902:ce87:b0:1eb:7285:d6fe with SMTP id f7-20020a170902ce8700b001eb7285d6femr9045693plg.23.1714427108793; Mon, 29 Apr 2024 14:45:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGRQ9LT7NJkVOb6GUEq9lwThklv0tGP954t0tZVLJEW83PPF8uBigHzkBa6EHJUPWcRTTkqQ== X-Received: by 2002:a17:902:ce87:b0:1eb:7285:d6fe with SMTP id f7-20020a170902ce8700b001eb7285d6femr9045663plg.23.1714427108354; Mon, 29 Apr 2024 14:45:08 -0700 (PDT) Received: from [192.168.1.111] ([2600:1700:1ff0:d0e0::33]) by smtp.gmail.com with ESMTPSA id q5-20020a170902bd8500b001db8145a1a2sm20731655pls.274.2024.04.29.14.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 14:45:07 -0700 (PDT) From: Andrew Halaney Date: Mon, 29 Apr 2024 16:45:05 -0500 Subject: [PATCH RFC/RFT net-next] net: stmmac: drop the ethtool begin() callback MIME-Version: 1.0 Message-Id: <20240429-stmmac-no-ethtool-begin-v1-1-04c629c1c142@redhat.com> X-B4-Tracking: v=1; b=H4sIAOAUMGYC/x2MsQqDMBBAfyXc3MMYg0PXgh8g3YqD1Yse1EtJj iKI/27o8IY3vHdApsSU4W4OSPTjzFGK1DcD0zrKQshzcXDWeeudx6zbNk4oEUlXjfGDb1pYMDS 2DS7UBQ+l/iYKvP/PL+i7R9V3TyOkKLQrDOd5AQ+jaCR7AAAA To: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Abhishek Chauhan , Sagar Cheluvegowda Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Halaney X-Mailer: b4 0.13.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_144517_941576_20C13F48 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This callback doesn't seem to serve much purpose, and prevents things like: - systemd.link files from disabling autonegotiation - carrier detection in NetworkManager prior to userspace bringing the link up. The only fear I can think of is accessing unclocked resources due to pm_runtime, but ethtool ioctls handle that as of commit f32a21376573 ("ethtool: runtime-resume netdev parent before ethtool ioctl ops") Signed-off-by: Andrew Halaney Reviewed-by: Dmitry Dolenko Tested-by: Dmitry Dolenko --- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 8 -------- 1 file changed, 8 deletions(-) --- base-commit: a59668a9397e7245b26e9be85d23f242ff757ae8 change-id: 20240424-stmmac-no-ethtool-begin-f306f2f1f2f4 Best regards, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 542e2633a6f5..c2e2723f7c6a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -438,13 +438,6 @@ static void stmmac_ethtool_setmsglevel(struct net_device *dev, u32 level) } -static int stmmac_check_if_running(struct net_device *dev) -{ - if (!netif_running(dev)) - return -EBUSY; - return 0; -} - static int stmmac_ethtool_get_regs_len(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); @@ -1273,7 +1266,6 @@ static int stmmac_set_tunable(struct net_device *dev, static const struct ethtool_ops stmmac_ethtool_ops = { .supported_coalesce_params = ETHTOOL_COALESCE_USECS | ETHTOOL_COALESCE_MAX_FRAMES, - .begin = stmmac_check_if_running, .get_drvinfo = stmmac_ethtool_getdrvinfo, .get_msglevel = stmmac_ethtool_getmsglevel, .set_msglevel = stmmac_ethtool_setmsglevel,