public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Timur Tabi <timur@codeaurora•org>
To: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: [PATCH 3/5] [net-next] net: qcom/emac: do not call emac_mac_start twice
Date: Fri, 27 Jan 2017 16:43:45 -0600	[thread overview]
Message-ID: <1485557028-32510-4-git-send-email-timur@codeaurora.org> (raw)
In-Reply-To: <1485557028-32510-1-git-send-email-timur@codeaurora.org>

emac_mac_start() uses information from the external PHY to program
the MAC, so it makes no sense to call it before the link is up.

Signed-off-by: Timur Tabi <timur@codeaurora•org>
---
 drivers/net/ethernet/qualcomm/emac/emac-mac.c | 2 +-
 drivers/net/ethernet/qualcomm/emac/emac-mac.h | 1 -
 drivers/net/ethernet/qualcomm/emac/emac.c     | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.c b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
index 155e273..3f3cd00 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-mac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-mac.c
@@ -556,7 +556,7 @@ void emac_mac_reset(struct emac_adapter *adpt)
 	emac_reg_update32(adpt->base + EMAC_DMA_MAS_CTRL, 0, INT_RD_CLR_EN);
 }
 
-void emac_mac_start(struct emac_adapter *adpt)
+static void emac_mac_start(struct emac_adapter *adpt)
 {
 	struct phy_device *phydev = adpt->phydev;
 	u32 mac, csr1;
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.h b/drivers/net/ethernet/qualcomm/emac/emac-mac.h
index f3aa24d..5028fb4 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-mac.h
+++ b/drivers/net/ethernet/qualcomm/emac/emac-mac.h
@@ -230,7 +230,6 @@ struct emac_tx_queue {
 int  emac_mac_up(struct emac_adapter *adpt);
 void emac_mac_down(struct emac_adapter *adpt);
 void emac_mac_reset(struct emac_adapter *adpt);
-void emac_mac_start(struct emac_adapter *adpt);
 void emac_mac_stop(struct emac_adapter *adpt);
 void emac_mac_mode_config(struct emac_adapter *adpt);
 void emac_mac_rx_process(struct emac_adapter *adpt, struct emac_rx_queue *rx_q,
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index 3e1be91..75305ad 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -280,8 +280,6 @@ static int emac_open(struct net_device *netdev)
 		return ret;
 	}
 
-	emac_mac_start(adpt);
-
 	return 0;
 }
 
-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

  parent reply	other threads:[~2017-01-27 22:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 22:43 [PATCH 0/5] [net-next] net: qcom/emac: Timur Tabi
2017-01-27 22:43 ` [PATCH 1/5] [net-next] net: qcom/emac: display the phy driver info after we connect Timur Tabi
2017-01-27 22:43 ` [PATCH 2/5] [net-next] net: qcom/emac: always use autonegotiation to configure the SGMII link Timur Tabi
2017-01-27 22:43 ` Timur Tabi [this message]
2017-01-27 22:43 ` [PATCH 4/4] [net-next] net: qcom/emac: add an error interrupt handler for the sgmii Timur Tabi
2017-01-27 23:21   ` Timur Tabi
2017-01-27 22:43 ` [PATCH 4/5] [net-next] net: qcom/emac: remove extraneous wake-on-lan code Timur Tabi
2017-01-27 22:43 ` [PATCH 5/5] [net-next] net: qcom/emac: add an error interrupt handler for the sgmii Timur Tabi
2017-01-30  0:07 ` [PATCH 0/5] [net-next] net: qcom/emac: David Miller

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=1485557028-32510-4-git-send-email-timur@codeaurora.org \
    --to=timur@codeaurora$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox