bool dsa = netdev_uses_dsa(dev);
struct dsa_tag tag;
- last = (u32 *)KSEG1ADDR(sw_r32(priv->r->dma_if_rx_cur + r * 4));
pr_debug("---------------------------------------------------------- RX - %d\n", r);
+ spin_lock_irqsave(&priv->lock, flags);
+ last = (u32 *)KSEG1ADDR(sw_r32(priv->r->dma_if_rx_cur + r * 4));
do {
if ((ring->rx_r[r][ring->c_rx[r]] & 0x1)) {
}
/* Reset header structure */
- spin_lock_irqsave(&priv->lock, flags);
memset(h, 0, sizeof(struct p_hdr));
h->buf = data;
h->size = RING_BUFFER;
| (ring->c_rx[r] == (priv->rxringlen - 1) ? WRAP : 0x1);
ring->c_rx[r] = (ring->c_rx[r] + 1) % priv->rxringlen;
last = (u32 *)KSEG1ADDR(sw_r32(priv->r->dma_if_rx_cur + r * 4));
- spin_unlock_irqrestore(&priv->lock, flags);
} while (&ring->rx_r[r][ring->c_rx[r]] != last && work_done < budget);
// Update counters
priv->r->update_cntr(r, 0);
+ spin_unlock_irqrestore(&priv->lock, flags);
+
return work_done;
}