]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
ethernet: xilinx: Allow unaligned transfers
authorKedareswara rao Appana <appanad@xilinx.com>
Mon, 18 Sep 2017 08:41:01 +0000 (14:11 +0530)
committerMichal Simek <monstr@monstr.eu>
Tue, 3 Oct 2017 15:26:27 +0000 (17:26 +0200)
Replace netdev_alloc_skb_ip_align with netdev_alloc_skb.
This is needed to support all configurations of AXIDMA.
If DRE in AXIDMA is not selected, the alignment of IP will cause failures.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index 6c95355ba1cd50b72e4bee0229ff858d88ad0c40..e46d537ceb6392076de0d1968162c97b1e8d6b5b 100644 (file)
@@ -262,7 +262,7 @@ static int axienet_dma_bd_init(struct net_device *ndev)
                                      sizeof(*lp->rx_bd_v) *
                                      ((i + 1) % RX_BD_NUM);
 
-               skb = netdev_alloc_skb_ip_align(ndev, lp->max_frm_size);
+               skb = netdev_alloc_skb(ndev, lp->max_frm_size);
                if (!skb)
                        goto out;
 
@@ -1176,7 +1176,7 @@ static int axienet_recv(struct net_device *ndev, int budget)
                size += length;
                packets++;
 
-               new_skb = netdev_alloc_skb_ip_align(ndev, lp->max_frm_size);
+               new_skb = netdev_alloc_skb(ndev, lp->max_frm_size);
                if (new_skb == NULL) {
                        dev_err(lp->dev, "No memory for new_skb\n\r");
                        break;