cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,088 Views
Registered: ‎06-19-2017

A problem about petalinux axi emac dirver for microblaze

There is a problem in the petalinux kernel‘s AXI EMAC dirver. When I build a project of petalinux,
the  ethernet's IP layer can't analysis the  Protocol package .By looking at the petalinux kernel 
source code  in the path:/dirver/net/ethernet/ xilinx_axienet_main.c
the function axienet_dma_bd_init(struct net_device *ndev) :
skb = netdev_alloc_skb(ndev, lp->max_frm_size);
if (!skb)
goto out;

/* Ensure that the skb is completely updated
 * prio to mapping the DMA
 */
wmb();

lp->rx_bd_v[i].sw_id_offset = (phys_addr_t) skb;
lp->rx_bd_v[i].phys = dma_map_single(ndev->dev.parent,
     skb->data,
     lp->max_frm_size,
     DMA_FROM_DEVICE);
lp->rx_bd_v[i].cntrl = lp->max_frm_size;
,I found that when the skb was alloc :skb = netdev_alloc_skb(ndev, lp->max_frm_size):
 need to add the :skb_reserver (skb, 2);following it,  in order to  align MAC addr 16 bytes .
So I think this is a bug , Has anyone ever met?
0 Kudos