diff options
| author | Timur Tabi <timur@codeaurora.org> | 2017-01-27 17:43:45 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-01-29 19:07:02 -0500 |
| commit | 0f20276dd51bf4b74c7ba961c32fffb5a155fb1e (patch) | |
| tree | 21f7a5b3d071f91d0918d3971971bb149238cea6 /drivers/net/ethernet/qualcomm/emac | |
| parent | 3db5d555eaec44ee0e1c80194963c4256b23f6ee (diff) | |
net: qcom/emac: do not call emac_mac_start twice
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac')
| -rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac-mac.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac-mac.h | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac.c | 2 |
3 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.c b/drivers/net/ethernet/qualcomm/emac/emac-mac.c index 155e273ab3de..3f3cd0008449 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) | |||
| 556 | emac_reg_update32(adpt->base + EMAC_DMA_MAS_CTRL, 0, INT_RD_CLR_EN); | 556 | emac_reg_update32(adpt->base + EMAC_DMA_MAS_CTRL, 0, INT_RD_CLR_EN); |
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | void emac_mac_start(struct emac_adapter *adpt) | 559 | static void emac_mac_start(struct emac_adapter *adpt) |
| 560 | { | 560 | { |
| 561 | struct phy_device *phydev = adpt->phydev; | 561 | struct phy_device *phydev = adpt->phydev; |
| 562 | u32 mac, csr1; | 562 | u32 mac, csr1; |
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.h b/drivers/net/ethernet/qualcomm/emac/emac-mac.h index f3aa24dc4a29..5028fb4bec2b 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_adapter; | |||
| 230 | int emac_mac_up(struct emac_adapter *adpt); | 230 | int emac_mac_up(struct emac_adapter *adpt); |
| 231 | void emac_mac_down(struct emac_adapter *adpt); | 231 | void emac_mac_down(struct emac_adapter *adpt); |
| 232 | void emac_mac_reset(struct emac_adapter *adpt); | 232 | void emac_mac_reset(struct emac_adapter *adpt); |
| 233 | void emac_mac_start(struct emac_adapter *adpt); | ||
| 234 | void emac_mac_stop(struct emac_adapter *adpt); | 233 | void emac_mac_stop(struct emac_adapter *adpt); |
| 235 | void emac_mac_mode_config(struct emac_adapter *adpt); | 234 | void emac_mac_mode_config(struct emac_adapter *adpt); |
| 236 | void emac_mac_rx_process(struct emac_adapter *adpt, struct emac_rx_queue *rx_q, | 235 | 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 3e1be9107d55..75305ad436d5 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) | |||
| 280 | return ret; | 280 | return ret; |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | emac_mac_start(adpt); | ||
| 284 | |||
| 285 | return 0; | 283 | return 0; |
| 286 | } | 284 | } |
| 287 | 285 | ||
