diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/ring_mode.c')
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/ring_mode.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c index 1ef9d8a555a..650a4be6bce 100644 --- a/drivers/net/ethernet/stmicro/stmmac/ring_mode.c +++ b/drivers/net/ethernet/stmicro/stmmac/ring_mode.c @@ -58,6 +58,7 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum)  		priv->hw->desc->prepare_tx_desc(desc, 1, bmax, csum,  						STMMAC_RING_MODE);  		wmb(); +		priv->tx_skbuff[entry] = NULL;  		entry = (++priv->cur_tx) % txsize;  		if (priv->extend_desc) @@ -73,7 +74,6 @@ static unsigned int stmmac_jumbo_frm(void *p, struct sk_buff *skb, int csum)  						STMMAC_RING_MODE);  		wmb();  		priv->hw->desc->set_tx_owner(desc); -		priv->tx_skbuff[entry] = NULL;  	} else {  		desc->des2 = dma_map_single(priv->device, skb->data,  					    nopaged_len, DMA_TO_DEVICE); @@ -100,10 +100,9 @@ static void stmmac_refill_desc3(void *priv_ptr, struct dma_desc *p)  {  	struct stmmac_priv *priv = (struct stmmac_priv *)priv_ptr; -	if (unlikely(priv->plat->has_gmac)) -		/* Fill DES3 in case of RING mode */ -		if (priv->dma_buf_sz >= BUF_SIZE_8KiB) -			p->des3 = p->des2 + BUF_SIZE_8KiB; +	/* Fill DES3 in case of RING mode */ +	if (priv->dma_buf_sz >= BUF_SIZE_8KiB) +		p->des3 = p->des2 + BUF_SIZE_8KiB;  }  /* In ring mode we need to fill the desc3 because it is used as buffer */ @@ -126,7 +125,7 @@ static int stmmac_set_16kib_bfsize(int mtu)  	return ret;  } -const struct stmmac_ring_mode_ops ring_mode_ops = { +const struct stmmac_mode_ops ring_mode_ops = {  	.is_jumbo_frm = stmmac_is_jumbo_frm,  	.jumbo_frm = stmmac_jumbo_frm,  	.refill_desc3 = stmmac_refill_desc3,  | 
