Skip to content

Commit

Permalink
net: qcom/emac: do not call emac_mac_start twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Timur Tabi authored and David S. Miller committed Jan 30, 2017
1 parent 3db5d55 commit 0f20276
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qualcomm/emac/emac-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/qualcomm/emac/emac-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ struct emac_adapter;
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,
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/qualcomm/emac/emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ static int emac_open(struct net_device *netdev)
return ret;
}

emac_mac_start(adpt);

return 0;
}

Expand Down

0 comments on commit 0f20276

Please sign in to comment.