]> err.no Git - linux-2.6/blobdiff - drivers/net/arm/ixp4xx_eth.c
ixp4xx_eth: fix dma_mapping_error() compile errors
[linux-2.6] / drivers / net / arm / ixp4xx_eth.c
index c617b64c288e4d1a883a2e845610f64418c057aa..7d5db2ece1bd0f2bc3335dd340cb46ee296cee64 100644 (file)
@@ -522,7 +522,6 @@ static int eth_poll(struct napi_struct *napi, int budget)
 #endif
 
                if ((n = queue_get_desc(rxq, port, 0)) < 0) {
-                       received = 0; /* No packet received */
 #if DEBUG_RX
                        printk(KERN_DEBUG "%s: eth_poll netif_rx_complete\n",
                               dev->name);
@@ -543,7 +542,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
                        printk(KERN_DEBUG "%s: eth_poll all done\n",
                               dev->name);
 #endif
-                       return 0; /* all work done */
+                       return received; /* all work done */
                }
 
                desc = rx_desc_ptr(port, n);
@@ -552,7 +551,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
                if ((skb = netdev_alloc_skb(dev, RX_BUFF_SIZE))) {
                        phys = dma_map_single(&dev->dev, skb->data,
                                              RX_BUFF_SIZE, DMA_FROM_DEVICE);
-                       if (dma_mapping_error(phys)) {
+                       if (dma_mapping_error(&dev->dev, phys)) {
                                dev_kfree_skb(skb);
                                skb = NULL;
                        }
@@ -699,7 +698,7 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
 #endif
 
        phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE);
-       if (dma_mapping_error(phys)) {
+       if (dma_mapping_error(&dev->dev, phys)) {
 #ifdef __ARMEB__
                dev_kfree_skb(skb);
 #else
@@ -884,7 +883,7 @@ static int init_queues(struct port *port)
                desc->buf_len = MAX_MRU;
                desc->data = dma_map_single(&port->netdev->dev, data,
                                            RX_BUFF_SIZE, DMA_FROM_DEVICE);
-               if (dma_mapping_error(desc->data)) {
+               if (dma_mapping_error(&port->netdev->dev, desc->data)) {
                        free_buffer(buff);
                        return -EIO;
                }