UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor xiaohouye
Visitor
1,979 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