mirror of https://gitee.com/openkylin/linux.git
net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit
We either have .enable_dma_transmission or .set_tx_tail_ptr in the HW table callbacks, we can never have both so there is no need to check for GMAC version. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joao Pinto <jpinto@synopsys.com> Cc: Vitor Soares <soares@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
24aaed0cc0
commit
f1565c6021
|
@ -184,7 +184,6 @@
|
|||
#define DMA_CHAN0_DBG_STAT_RPS_SHIFT 8
|
||||
|
||||
int dwmac4_dma_reset(void __iomem *ioaddr);
|
||||
void dwmac4_enable_dma_transmission(void __iomem *ioaddr, u32 tail_ptr);
|
||||
void dwmac4_enable_dma_irq(void __iomem *ioaddr, u32 chan);
|
||||
void dwmac410_enable_dma_irq(void __iomem *ioaddr, u32 chan);
|
||||
void dwmac4_disable_dma_irq(void __iomem *ioaddr, u32 chan);
|
||||
|
|
|
@ -3166,11 +3166,8 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
|
||||
netdev_tx_sent_queue(netdev_get_tx_queue(dev, queue), skb->len);
|
||||
|
||||
if (priv->synopsys_id < DWMAC_CORE_4_00)
|
||||
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
||||
else
|
||||
stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr,
|
||||
queue);
|
||||
stmmac_enable_dma_transmission(priv, priv->ioaddr);
|
||||
stmmac_set_tx_tail_ptr(priv, priv->ioaddr, tx_q->tx_tail_addr, queue);
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
|
|
Loading…
Reference in New Issue