netxen: remove old flash check.
[safe/jmp/linux-2.6] / drivers / net / sh_eth.c
index 1a04814..7f8e514 100644 (file)
@@ -540,7 +540,6 @@ static int sh_eth_rx(struct net_device *ndev)
                        skb_put(skb, pkt_len);
                        skb->protocol = eth_type_trans(skb, ndev);
                        netif_rx(skb);
-                       ndev->last_rx = jiffies;
                        mdp->stats.rx_packets++;
                        mdp->stats.rx_bytes += pkt_len;
                }
@@ -800,7 +799,7 @@ static int sh_eth_phy_init(struct net_device *ndev)
        char phy_id[BUS_ID_SIZE];
        struct phy_device *phydev = NULL;
 
-       snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT,
+       snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
                mdp->mii_bus->id , mdp->phy_id);
 
        mdp->link = PHY_DOWN;
@@ -927,7 +926,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        struct sh_eth_private *mdp = netdev_priv(ndev);
        struct sh_eth_txdesc *txdesc;
        u32 entry;
-       int flags;
+       unsigned long flags;
 
        spin_lock_irqsave(&mdp->lock, flags);
        if ((mdp->cur_tx - mdp->dirty_tx) >= (TX_RING_SIZE - 4)) {
@@ -1140,8 +1139,8 @@ static int sh_mdio_init(struct net_device *ndev, int id)
 
        /* Hook up MII support for ethtool */
        mdp->mii_bus->name = "sh_mii";
-       mdp->mii_bus->dev = &ndev->dev;
-       mdp->mii_bus->id[0] = id;
+       mdp->mii_bus->parent = &ndev->dev;
+       snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id);
 
        /* PHY IRQ */
        mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
@@ -1166,7 +1165,7 @@ out_free_irq:
        kfree(mdp->mii_bus->irq);
 
 out_free_bus:
-       kfree(mdp->mii_bus);
+       free_mdio_bitbang(mdp->mii_bus);
 
 out_free_bitbang:
        kfree(bitbang);