All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Sasha Neftin <sasha.neftin@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Aaron Brown <aaron.f.brown@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 11/13] igc: Refactor the igc_power_down_link()
Date: Fri, 26 Jun 2020 18:54:29 -0700	[thread overview]
Message-ID: <20200627015431.3579234-12-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20200627015431.3579234-1-jeffrey.t.kirsher@intel.com>

From: Sasha Neftin <sasha.neftin@intel.com>

Currently the implementation of igc_power_down_link()
method was just calling igc_power_down_phy_copper_base()
method.
We can just call igc_power_down_phy_copper_base()
method directly.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 6a11f897aa62..555c6633f1c3 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -61,16 +61,6 @@ enum latency_range {
 	latency_invalid = 255
 };
 
-/**
- * igc_power_down_link - Power down the phy/serdes link
- * @adapter: address of board private structure
- */
-static void igc_power_down_link(struct igc_adapter *adapter)
-{
-	if (adapter->hw.phy.media_type == igc_media_type_copper)
-		igc_power_down_phy_copper_base(&adapter->hw);
-}
-
 void igc_reset(struct igc_adapter *adapter)
 {
 	struct net_device *dev = adapter->netdev;
@@ -106,7 +96,7 @@ void igc_reset(struct igc_adapter *adapter)
 	igc_set_eee_i225(hw, true, true, true);
 
 	if (!netif_running(adapter->netdev))
-		igc_power_down_link(adapter);
+		igc_power_down_phy_copper_base(&adapter->hw);
 
 	/* Re-enable PTP, where applicable. */
 	igc_ptp_reset(adapter);
@@ -4615,7 +4605,7 @@ static int __igc_open(struct net_device *netdev, bool resuming)
 	igc_free_irq(adapter);
 err_req_irq:
 	igc_release_hw_control(adapter);
-	igc_power_down_link(adapter);
+	igc_power_down_phy_copper_base(&adapter->hw);
 	igc_free_all_rx_resources(adapter);
 err_setup_rx:
 	igc_free_all_tx_resources(adapter);
@@ -5313,7 +5303,7 @@ static int __igc_shutdown(struct pci_dev *pdev, bool *enable_wake,
 
 	wake = wufc || adapter->en_mng_pt;
 	if (!wake)
-		igc_power_down_link(adapter);
+		igc_power_down_phy_copper_base(&adapter->hw);
 	else
 		igc_power_up_link(adapter);
 
-- 
2.26.2


  parent reply	other threads:[~2020-06-27  1:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27  1:54 [net-next 00/13][pull request] 1GbE Intel Wired LAN Driver Updates 2020-06-26 Jeff Kirsher
2020-06-27  1:54 ` [net-next 01/13] igc: Add initial EEE support Jeff Kirsher
2020-06-28  0:28   ` David Miller
2020-06-27  1:54 ` [net-next 02/13] igc: Add initial LTR support Jeff Kirsher
2020-06-27  1:54 ` [net-next 03/13] igc: Clean up Rx timestamping logic Jeff Kirsher
2020-06-27  1:54 ` [net-next 04/13] igc: Remove duplicate code in Tx timestamp handling Jeff Kirsher
2020-06-27  1:54 ` [net-next 05/13] igc: Check __IGC_PTP_TX_IN_PROGRESS instead of ptp_tx_skb Jeff Kirsher
2020-06-27  4:30   ` Jakub Kicinski
2020-06-29 20:51     ` Andre Guedes
2020-06-29 22:11       ` Jakub Kicinski
2020-06-30  0:07         ` Andre Guedes
2020-06-30  0:19           ` Jakub Kicinski
2020-06-30  0:23             ` Kirsher, Jeffrey T
2020-06-27  1:54 ` [net-next 06/13] igc: Remove UDP filter setup in PTP code Jeff Kirsher
2020-06-27  1:54 ` [net-next 07/13] igc: Refactor igc_ptp_set_timestamp_mode() Jeff Kirsher
2020-06-27  1:54 ` [net-next 08/13] igc: Fix Rx timestamp disabling Jeff Kirsher
2020-06-27  1:54 ` [net-next 09/13] igc: Add LPI counters Jeff Kirsher
2020-06-27  1:54 ` [net-next 10/13] igc: Remove TCP segmentation TX fail counter Jeff Kirsher
2020-06-27  1:54 ` Jeff Kirsher [this message]
2020-06-27  1:54 ` [net-next 12/13] igc: Remove unneeded check for copper media type Jeff Kirsher
2020-06-27  1:54 ` [net-next 13/13] igc: Remove checking media type during MAC initialization Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200627015431.3579234-12-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=aaron.f.brown@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sasha.neftin@intel.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.