Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2982217lqp; Mon, 25 Mar 2024 15:33:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVEJcjD0lKQVmHJGB1EBnmEyEpwm1xe3vHOeZum1tDdAMBpYD2k5MuIf8gDz+0nv/V98WxgSpjpN0rpp77L0ou+gsexQDXxt8xy4WV++g== X-Google-Smtp-Source: AGHT+IGL9gmBB5KaBEmIfbGQqrAkEQykm21xHaK1MTSjPSJH/OuHOgwhFNbPZfPKIOOB0AR7An4f X-Received: by 2002:a5b:c0b:0:b0:dcf:6122:ccec with SMTP id f11-20020a5b0c0b000000b00dcf6122ccecmr6517736ybq.36.1711405998120; Mon, 25 Mar 2024 15:33:18 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id eq10-20020ad4596a000000b00696890f0f89si3735651qvb.145.2024.03.25.15.33.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 15:33:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=hGczMVKU; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-118116-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D71A61C37675 for ; Mon, 25 Mar 2024 22:33:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60E78128839; Mon, 25 Mar 2024 22:30:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hGczMVKU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83AB41292EA; Mon, 25 Mar 2024 22:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711405805; cv=none; b=a1xp7dvjsN7Eh+5wi/XYgB9TU7WcgKKG9xk4Y4xbsR+vEdQ4jv49uye4qr6jKMUI32vQA6kPN3tkvtS1TLVZnjQlPI/MSB8diWkXXpIGK0A7c8oK2gd4Yjs9lmN/nW+GPiqNk7RW0b1EwfMBH2kcy8pdXNyhYoOuAbsx/ZpPhXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711405805; c=relaxed/simple; bh=4AJOQf5vgvqX5cAii8ibKLW+VtEtnKWwBG0U8INKPUk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MJKg21rWLotSTwDJsfGVTDMkJr3543yJYzFqr0h7YTifWsWi2eQOuOwOHjhyFNKhEy2YbTeeebhkGPuOrgFr9pcW2cX+qB6ZDkvZT5JMdY0kNpoZ9V5alJw9up3b5PfkhDNb5yDBGzzuKCwAeCOsWEWC0Z+AGYZm2zritpKSgD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hGczMVKU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA65DC43394; Mon, 25 Mar 2024 22:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711405805; bh=4AJOQf5vgvqX5cAii8ibKLW+VtEtnKWwBG0U8INKPUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hGczMVKUkELSV29AyRnwTX8hePyzeb2qCzy6G4mjg61tAQG1npyzMJ83lMum8liUr +S5FJejZQADYnJOttLOrD59NH6dqgcRIy9xr1dd9vqusmN/6NXPJMgcj96ECn+LxMr XukBPnXyDvoUbfsjRVKMPa6M+8HZK+tA1DvWCEVxF5pJx5+hCWl9kBU+O2qpXoTdOf 8nF+Z+h2sDJXUj8J8iloxoW9iMkHgXVvatM+iujOAD8Hktn0ay8QIuz2YeMWcvKrXp q3x+UNRas8WznH3e0LmXZNwbQtsynz7GKRZISSv3AazXVPEGSKCTRCu0uNvL5A1fVk sW4I0FoCUhZEQ== From: Bjorn Helgaas To: Jesse Brandeburg , Tony Nguyen , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Heiner Kallweit , Konstantin Khlebnikov , Zheng Yan , Sasha Neftin , "Rafael J . Wysocki" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 3/3] igc: Remove redundant runtime resume for ethtool ops Date: Mon, 25 Mar 2024 17:29:51 -0500 Message-Id: <20240325222951.1460656-4-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240325222951.1460656-1-helgaas@kernel.org> References: <20240325222951.1460656-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bjorn Helgaas 8c5ad0dae93c ("igc: Add ethtool support") added ethtool_ops.begin() and complete(), which used pm_runtime_get_sync() to resume suspended devices before any ethtool_ops callback and allow suspend after it completed. Subsequently, f32a21376573 ("ethtool: runtime-resume netdev parent before ethtool ioctl ops") added pm_runtime_get_sync() in the dev_ethtool() path, so the device is resumed before any ethtool_ops callback even if the driver didn't supply a .begin() callback. Remove the .begin() and .complete() callbacks, which are now redundant because dev_ethtool() already resumes the device. Signed-off-by: Bjorn Helgaas --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 1a64f1ca6ca8..f2c4f1966bb0 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1711,21 +1711,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev, return 0; } -static int igc_ethtool_begin(struct net_device *netdev) -{ - struct igc_adapter *adapter = netdev_priv(netdev); - - pm_runtime_get_sync(&adapter->pdev->dev); - return 0; -} - -static void igc_ethtool_complete(struct net_device *netdev) -{ - struct igc_adapter *adapter = netdev_priv(netdev); - - pm_runtime_put(&adapter->pdev->dev); -} - static int igc_ethtool_get_link_ksettings(struct net_device *netdev, struct ethtool_link_ksettings *cmd) { @@ -2025,8 +2010,6 @@ static const struct ethtool_ops igc_ethtool_ops = { .set_priv_flags = igc_ethtool_set_priv_flags, .get_eee = igc_ethtool_get_eee, .set_eee = igc_ethtool_set_eee, - .begin = igc_ethtool_begin, - .complete = igc_ethtool_complete, .get_link_ksettings = igc_ethtool_get_link_ksettings, .set_link_ksettings = igc_ethtool_set_link_ksettings, .self_test = igc_ethtool_diag_test, -- 2.34.1