Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[deliverable/linux.git] / drivers / net / smsc911x.c
index 783c1a7b869e62c20ccf1981cbe3000f5eaddf56..ae4c74b51827ab2252dfc328a34b17d144b0d965 100644 (file)
@@ -769,7 +769,7 @@ static int smsc911x_mii_probe(struct net_device *dev)
                return -ENODEV;
        }
 
-       phydev = phy_connect(dev, phydev->dev.bus_id,
+       phydev = phy_connect(dev, dev_name(&phydev->dev),
                &smsc911x_phy_adjust_link, 0, pdata->config.phy_interface);
 
        if (IS_ERR(phydev)) {
@@ -778,7 +778,8 @@ static int smsc911x_mii_probe(struct net_device *dev)
        }
 
        pr_info("%s: attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
-               dev->name, phydev->drv->name, phydev->dev.bus_id, phydev->irq);
+               dev->name, phydev->drv->name,
+               dev_name(&phydev->dev), phydev->irq);
 
        /* mask with MAC supported features */
        phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
@@ -984,7 +985,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget)
                        /* We processed all packets available.  Tell NAPI it can
                         * stop polling then re-enable rx interrupts */
                        smsc911x_reg_write(pdata, INT_STS, INT_STS_RSFL_);
-                       netif_rx_complete(napi);
+                       napi_complete(napi);
                        temp = smsc911x_reg_read(pdata, INT_EN);
                        temp |= INT_EN_RSFL_EN_;
                        smsc911x_reg_write(pdata, INT_EN, temp);
@@ -1246,7 +1247,7 @@ static int smsc911x_open(struct net_device *dev)
        napi_enable(&pdata->napi);
 
        temp = smsc911x_reg_read(pdata, INT_EN);
-       temp |= (INT_EN_TDFA_EN_ | INT_EN_RSFL_EN_);
+       temp |= (INT_EN_TDFA_EN_ | INT_EN_RSFL_EN_ | INT_EN_RXSTOP_INT_EN_);
        smsc911x_reg_write(pdata, INT_EN, temp);
 
        spin_lock_irq(&pdata->mac_lock);
@@ -1418,11 +1419,6 @@ static void smsc911x_set_multicast_list(struct net_device *dev)
 
                        /* Request the hardware to stop, then perform the
                         * update when we get an RX_STOP interrupt */
-                       smsc911x_reg_write(pdata, INT_STS, INT_STS_RXSTOP_INT_);
-                       temp = smsc911x_reg_read(pdata, INT_EN);
-                       temp |= INT_EN_RXSTOP_INT_EN_;
-                       smsc911x_reg_write(pdata, INT_EN, temp);
-
                        temp = smsc911x_mac_read(pdata, MAC_CR);
                        temp &= ~(MAC_CR_RXEN_);
                        smsc911x_mac_write(pdata, MAC_CR, temp);
@@ -1461,11 +1457,9 @@ static irqreturn_t smsc911x_irqhandler(int irq, void *dev_id)
                /* Called when there is a multicast update scheduled and
                 * it is now safe to complete the update */
                SMSC_TRACE(INTR, "RX Stop interrupt");
-               temp = smsc911x_reg_read(pdata, INT_EN);
-               temp &= (~INT_EN_RXSTOP_INT_EN_);
-               smsc911x_reg_write(pdata, INT_EN, temp);
                smsc911x_reg_write(pdata, INT_STS, INT_STS_RXSTOP_INT_);
-               smsc911x_rx_multicast_update_workaround(pdata);
+               if (pdata->multicast_update_pending)
+                       smsc911x_rx_multicast_update_workaround(pdata);
                serviced = IRQ_HANDLED;
        }
 
@@ -1485,16 +1479,16 @@ static irqreturn_t smsc911x_irqhandler(int irq, void *dev_id)
        }
 
        if (likely(intsts & inten & INT_STS_RSFL_)) {
-               if (likely(netif_rx_schedule_prep(&pdata->napi))) {
+               if (likely(napi_schedule_prep(&pdata->napi))) {
                        /* Disable Rx interrupts */
                        temp = smsc911x_reg_read(pdata, INT_EN);
                        temp &= (~INT_EN_RSFL_EN_);
                        smsc911x_reg_write(pdata, INT_EN, temp);
                        /* Schedule a NAPI poll */
-                       __netif_rx_schedule(&pdata->napi);
+                       __napi_schedule(&pdata->napi);
                } else {
                        SMSC_WARNING(RX_ERR,
-                               "netif_rx_schedule_prep failed");
+                               "napi_schedule_prep failed");
                }
                serviced = IRQ_HANDLED;
        }
@@ -1545,7 +1539,7 @@ static void smsc911x_ethtool_getdrvinfo(struct net_device *dev,
 {
        strlcpy(info->driver, SMSC_CHIPNAME, sizeof(info->driver));
        strlcpy(info->version, SMSC_DRV_VERSION, sizeof(info->version));
-       strlcpy(info->bus_info, dev->dev.parent->bus_id,
+       strlcpy(info->bus_info, dev_name(dev->dev.parent),
                sizeof(info->bus_info));
 }
 
This page took 0.027716 seconds and 5 git commands to generate.