Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / net / dnet.c
index 4b96974..2346852 100644 (file)
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/version.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
@@ -21,7 +21,6 @@
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
 #include <linux/phy.h>
-#include <linux/platform_device.h>
 
 #include "dnet.h"
 
@@ -280,11 +279,11 @@ static int dnet_mii_probe(struct net_device *dev)
 
        /* attach the mac to the phy */
        if (bp->capabilities & DNET_HAS_RMII) {
-               phydev = phy_connect(dev, phydev->dev.bus_id,
+               phydev = phy_connect(dev, dev_name(&phydev->dev),
                                     &dnet_handle_link_change, 0,
                                     PHY_INTERFACE_MODE_RMII);
        } else {
-               phydev = phy_connect(dev, phydev->dev.bus_id,
+               phydev = phy_connect(dev, dev_name(&phydev->dev),
                                     &dnet_handle_link_change, 0,
                                     PHY_INTERFACE_MODE_MII);
        }
@@ -408,7 +407,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
                 * packets waiting
                 */
                if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) {
-                       netif_rx_complete(napi);
+                       napi_complete(napi);
                        int_enable = dnet_readl(bp, INTR_ENB);
                        int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
                        dnet_writel(bp, int_enable, INTR_ENB);
@@ -447,7 +446,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
        if (npackets < budget) {
                /* We processed all packets available.  Tell NAPI it can
                 * stop polling then re-enable rx interrupts */
-               netif_rx_complete(napi);
+               napi_complete(napi);
                int_enable = dnet_readl(bp, INTR_ENB);
                int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
                dnet_writel(bp, int_enable, INTR_ENB);
@@ -507,7 +506,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
        }
 
        if (int_current & DNET_INTR_SRC_RX_CMDFIFOAF) {
-               if (netif_rx_schedule_prep(&bp->napi)) {
+               if (napi_schedule_prep(&bp->napi)) {
                        /*
                         * There's no point taking any more interrupts
                         * until we have processed the buffers
@@ -516,7 +515,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
                        int_enable = dnet_readl(bp, INTR_ENB);
                        int_enable &= ~DNET_INTR_SRC_RX_CMDFIFOAF;
                        dnet_writel(bp, int_enable, INTR_ENB);
-                       __netif_rx_schedule(&bp->napi);
+                       __napi_schedule(&bp->napi);
                }
                handled = 1;
        }
@@ -542,7 +541,7 @@ static inline void dnet_print_skb(struct sk_buff *skb)
 #define dnet_print_skb(skb)    do {} while (0)
 #endif
 
-static int dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 
        struct dnet *bp = netdev_priv(dev);
@@ -597,7 +596,7 @@ static int dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        dev->trans_start = jiffies;
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 static void dnet_reset_hw(struct dnet *bp)
@@ -927,7 +926,7 @@ static int __devinit dnet_probe(struct platform_device *pdev)
        phydev = bp->phy_dev;
        dev_info(&pdev->dev, "attached PHY driver [%s] "
               "(mii_bus:phy_addr=%s, irq=%d)\n",
-              phydev->drv->name, phydev->dev.bus_id, phydev->irq);
+              phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
 
        return 0;