[PATCH] net: stmmac: add set_mac to the stmmac_ops

2017-03-22 Thread Corentin Labbe
Two different set_mac functions exists but stmmac_dwmac4_set_mac() is only used for enabling and never for disabling. So on dwmac4, the MAC RX/TX is never disabled. This patch add a generic function pointer set_mac() to stmmac_ops and replace all call to stmmac_set_mac/stmmac_dwmac4_set_mac by a c

Re: [PATCH] net: stmmac: add set_mac to the stmmac_ops

2017-03-22 Thread David Miller
From: Corentin Labbe Date: Wed, 22 Mar 2017 14:29:04 +0100 > @@ -2224,7 +,8 @@ static int stmmac_release(struct net_device *dev) > free_dma_desc_resources(priv); > > /* Disable the MAC Rx/Tx */ > - stmmac_set_mac(priv->ioaddr, false); > + if (priv->hw->mac->set_mac) > +