Zynq macb

From: SÃren Brinkmann
Date: Thu Mar 13 2014 - 18:17:14 EST


Hi Nicolas,

I did some testing on the current linux-next tree and ran iperf on Zynq.
It seems that network and even the whole system can collapse when doing
that.
I don't really know what's going on, but once I saw the message:
"inconsistent Rx descriptor chain"
printed twice (system frozen afterwards).

I don't know what exactly is going wrong, but suspect something around
memory/DMA. I have no clue whether it makes any sense or not, but I
tried using the macb_* functions instead of the gem_* ones (see diff below).
That seems to result in a stable system and working Ethernet.

So, I guess my questions are:
Does any of this make sense?
Is it reasonable for the Zynq GEM to use the macb_* routines (are there
any implementation options to check whether one or the other are
appropriate for an macb implementation?)?
Any other hints?

Thanks,
SÃren

-----------8<-------------8<---------------8<--------------8<----------------8<--------
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index d0c38e01e99f..8c73cd43457e 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -1905,17 +1905,10 @@ static int __init macb_probe(struct platform_device *pdev)
dev->base_addr = regs->start;

/* setup appropriated routines according to adapter type */
- if (macb_is_gem(bp)) {
- bp->macbgem_ops.mog_alloc_rx_buffers = gem_alloc_rx_buffers;
- bp->macbgem_ops.mog_free_rx_buffers = gem_free_rx_buffers;
- bp->macbgem_ops.mog_init_rings = gem_init_rings;
- bp->macbgem_ops.mog_rx = gem_rx;
- } else {
- bp->macbgem_ops.mog_alloc_rx_buffers = macb_alloc_rx_buffers;
- bp->macbgem_ops.mog_free_rx_buffers = macb_free_rx_buffers;
- bp->macbgem_ops.mog_init_rings = macb_init_rings;
- bp->macbgem_ops.mog_rx = macb_rx;
- }
+ bp->macbgem_ops.mog_alloc_rx_buffers = macb_alloc_rx_buffers;
+ bp->macbgem_ops.mog_free_rx_buffers = macb_free_rx_buffers;
+ bp->macbgem_ops.mog_init_rings = macb_init_rings;
+ bp->macbgem_ops.mog_rx = macb_rx;

/* Set MII management clock divider */
config = macb_mdc_clk_div(bp);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/