|
@@ -1355,6 +1355,7 @@ static int init_dma_tx_desc_rings(struct net_device *dev)
|
|
|
|
|
|
tx_q->dirty_tx = 0;
|
|
|
tx_q->cur_tx = 0;
|
|
|
+ tx_q->mss = 0;
|
|
|
|
|
|
netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, queue));
|
|
|
}
|
|
@@ -1946,6 +1947,7 @@ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
|
|
|
(i == DMA_TX_SIZE - 1));
|
|
|
tx_q->dirty_tx = 0;
|
|
|
tx_q->cur_tx = 0;
|
|
|
+ tx_q->mss = 0;
|
|
|
netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, chan));
|
|
|
stmmac_start_tx_dma(priv, chan);
|
|
|
|
|
@@ -2430,7 +2432,7 @@ static void stmmac_mac_config_rx_queues_routing(struct stmmac_priv *priv)
|
|
|
continue;
|
|
|
|
|
|
packet = priv->plat->rx_queues_cfg[queue].pkt_route;
|
|
|
- priv->hw->mac->rx_queue_prio(priv->hw, packet, queue);
|
|
|
+ priv->hw->mac->rx_queue_routing(priv->hw, packet, queue);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2632,7 +2634,6 @@ static int stmmac_open(struct net_device *dev)
|
|
|
|
|
|
priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
|
|
|
priv->rx_copybreak = STMMAC_RX_COPYBREAK;
|
|
|
- priv->mss = 0;
|
|
|
|
|
|
ret = alloc_dma_desc_resources(priv);
|
|
|
if (ret < 0) {
|
|
@@ -2793,6 +2794,7 @@ static void stmmac_tso_allocator(struct stmmac_priv *priv, unsigned int des,
|
|
|
|
|
|
while (tmp_len > 0) {
|
|
|
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, DMA_TX_SIZE);
|
|
|
+ WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
|
|
desc = tx_q->dma_tx + tx_q->cur_tx;
|
|
|
|
|
|
desc->des0 = cpu_to_le32(des + (total_len - tmp_len));
|
|
@@ -2872,11 +2874,12 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
mss = skb_shinfo(skb)->gso_size;
|
|
|
|
|
|
/* set new MSS value if needed */
|
|
|
- if (mss != priv->mss) {
|
|
|
+ if (mss != tx_q->mss) {
|
|
|
mss_desc = tx_q->dma_tx + tx_q->cur_tx;
|
|
|
priv->hw->desc->set_mss(mss_desc, mss);
|
|
|
- priv->mss = mss;
|
|
|
+ tx_q->mss = mss;
|
|
|
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, DMA_TX_SIZE);
|
|
|
+ WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
|
|
|
}
|
|
|
|
|
|
if (netif_msg_tx_queued(priv)) {
|
|
@@ -2887,6 +2890,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
}
|
|
|
|
|
|
first_entry = tx_q->cur_tx;
|
|
|
+ WARN_ON(tx_q->tx_skbuff[first_entry]);
|
|
|
|
|
|
desc = tx_q->dma_tx + first_entry;
|
|
|
first = desc;
|
|
@@ -2926,7 +2930,6 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
|
|
|
tx_q->tx_skbuff_dma[tx_q->cur_tx].buf = des;
|
|
|
tx_q->tx_skbuff_dma[tx_q->cur_tx].len = skb_frag_size(frag);
|
|
|
- tx_q->tx_skbuff[tx_q->cur_tx] = NULL;
|
|
|
tx_q->tx_skbuff_dma[tx_q->cur_tx].map_as_page = true;
|
|
|
}
|
|
|
|
|
@@ -3062,6 +3065,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
|
|
|
entry = tx_q->cur_tx;
|
|
|
first_entry = entry;
|
|
|
+ WARN_ON(tx_q->tx_skbuff[first_entry]);
|
|
|
|
|
|
csum_insertion = (skb->ip_summed == CHECKSUM_PARTIAL);
|
|
|
|
|
@@ -3090,6 +3094,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
bool last_segment = (i == (nfrags - 1));
|
|
|
|
|
|
entry = STMMAC_GET_ENTRY(entry, DMA_TX_SIZE);
|
|
|
+ WARN_ON(tx_q->tx_skbuff[entry]);
|
|
|
|
|
|
if (likely(priv->extend_desc))
|
|
|
desc = (struct dma_desc *)(tx_q->dma_etx + entry);
|
|
@@ -3101,8 +3106,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
if (dma_mapping_error(priv->device, des))
|
|
|
goto dma_map_err; /* should reuse desc w/o issues */
|
|
|
|
|
|
- tx_q->tx_skbuff[entry] = NULL;
|
|
|
-
|
|
|
tx_q->tx_skbuff_dma[entry].buf = des;
|
|
|
if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00))
|
|
|
desc->des0 = cpu_to_le32(des);
|
|
@@ -4436,6 +4439,7 @@ static void stmmac_reset_queues_param(struct stmmac_priv *priv)
|
|
|
|
|
|
tx_q->cur_tx = 0;
|
|
|
tx_q->dirty_tx = 0;
|
|
|
+ tx_q->mss = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4481,11 +4485,6 @@ int stmmac_resume(struct device *dev)
|
|
|
|
|
|
stmmac_reset_queues_param(priv);
|
|
|
|
|
|
- /* reset private mss value to force mss context settings at
|
|
|
- * next tso xmit (only used for gmac4).
|
|
|
- */
|
|
|
- priv->mss = 0;
|
|
|
-
|
|
|
stmmac_clear_descriptors(priv);
|
|
|
|
|
|
stmmac_hw_setup(ndev, false);
|