mlx4_core: Support ICM tables in coherent memory
[pandora-kernel.git] / drivers / net / depca.c
index af59466..1834970 100644 (file)
@@ -518,7 +518,7 @@ struct depca_private {
 */
 static int depca_open(struct net_device *dev);
 static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t depca_interrupt(int irq, void *dev_id);
 static int depca_close(struct net_device *dev);
 static int depca_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static void depca_tx_timeout(struct net_device *dev);
@@ -965,7 +965,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
 /*
 ** The DEPCA interrupt handler.
 */
-static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t depca_interrupt(int irq, void *dev_id)
 {
        struct net_device *dev = dev_id;
        struct depca_private *lp;
@@ -1044,7 +1044,6 @@ static int depca_rx(struct net_device *dev)
                                        unsigned char *buf;
                                        skb_reserve(skb, 2);    /* 16 byte align the IP header */
                                        buf = skb_put(skb, pkt_len);
-                                       skb->dev = dev;
                                        if (entry < lp->rx_old) {       /* Wrapped buffer */
                                                len = (lp->rxRingMask - lp->rx_old + 1) * RX_BUFF_SZ;
                                                memcpy_fromio(buf, lp->rx_buff[lp->rx_old], len);
@@ -1252,24 +1251,22 @@ static void set_multicast_list(struct net_device *dev)
        struct depca_private *lp = (struct depca_private *) dev->priv;
        u_long ioaddr = dev->base_addr;
 
-       if (dev) {
-               netif_stop_queue(dev);
-               while (lp->tx_old != lp->tx_new);       /* Wait for the ring to empty */
-
-               STOP_DEPCA;     /* Temporarily stop the depca.  */
-               depca_init_ring(dev);   /* Initialize the descriptor rings */
+       netif_stop_queue(dev);
+       while (lp->tx_old != lp->tx_new);       /* Wait for the ring to empty */
 
-               if (dev->flags & IFF_PROMISC) { /* Set promiscuous mode */
-                       lp->init_block.mode |= PROM;
-               } else {
-                       SetMulticastFilter(dev);
-                       lp->init_block.mode &= ~PROM;   /* Unset promiscuous mode */
-               }
+       STOP_DEPCA;     /* Temporarily stop the depca.  */
+       depca_init_ring(dev);   /* Initialize the descriptor rings */
 
-               LoadCSRs(dev);  /* Reload CSR3 */
-               InitRestartDepca(dev);  /* Resume normal operation. */
-               netif_start_queue(dev); /* Unlock the TX ring */
+       if (dev->flags & IFF_PROMISC) { /* Set promiscuous mode */
+               lp->init_block.mode |= PROM;
+       } else {
+               SetMulticastFilter(dev);
+               lp->init_block.mode &= ~PROM;   /* Unset promiscuous mode */
        }
+
+       LoadCSRs(dev);  /* Reload CSR3 */
+       InitRestartDepca(dev);  /* Resume normal operation. */
+       netif_start_queue(dev); /* Unlock the TX ring */
 }
 
 /*
@@ -1493,8 +1490,9 @@ static void __init depca_platform_probe (void)
                depca_io_ports[i].device = pldev;
 
                if (platform_device_add(pldev)) {
-                       platform_device_put(pldev);
                        depca_io_ports[i].device = NULL;
+                       pldev->dev.platform_data = NULL;
+                       platform_device_put(pldev);
                        continue;
                }