Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[safe/jmp/linux-2.6] / drivers / net / mv643xx_eth.c
index d4d5a56..a56d9d2 100644 (file)
@@ -2289,11 +2289,6 @@ static void port_start(struct mv643xx_eth_private *mp)
        }
 
        /*
-        * Add configured unicast address to address filter table.
-        */
-       mv643xx_eth_program_unicast_filter(mp->dev);
-
-       /*
         * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
         * frames to RX queue #0, and include the pseudo-header when
         * calculating receive checksums.
@@ -2306,6 +2301,11 @@ static void port_start(struct mv643xx_eth_private *mp)
        wrlp(mp, PORT_CONFIG_EXT, 0x00000000);
 
        /*
+        * Add configured unicast addresses to address filter table.
+        */
+       mv643xx_eth_program_unicast_filter(mp->dev);
+
+       /*
         * Enable the receive queues.
         */
        for (i = 0; i < mp->rxq_count; i++) {
@@ -2388,13 +2388,8 @@ static int mv643xx_eth_open(struct net_device *dev)
                }
        }
 
-       netif_carrier_off(dev);
-
        port_start(mp);
 
-       set_rx_coal(mp, 0);
-       set_tx_coal(mp, 0);
-
        wrlp(mp, INT_MASK_EXT, INT_EXT_LINK_PHY | INT_EXT_TX);
        wrlp(mp, INT_MASK, INT_TX_END | INT_RX | INT_EXT);
 
@@ -2861,6 +2856,21 @@ static void init_pscr(struct mv643xx_eth_private *mp, int speed, int duplex)
        wrlp(mp, PORT_SERIAL_CONTROL, pscr);
 }
 
+static const struct net_device_ops mv643xx_eth_netdev_ops = {
+       .ndo_open               = mv643xx_eth_open,
+       .ndo_stop               = mv643xx_eth_stop,
+       .ndo_start_xmit         = mv643xx_eth_xmit,
+       .ndo_set_rx_mode        = mv643xx_eth_set_rx_mode,
+       .ndo_set_mac_address    = mv643xx_eth_set_mac_address,
+       .ndo_do_ioctl           = mv643xx_eth_ioctl,
+       .ndo_change_mtu         = mv643xx_eth_change_mtu,
+       .ndo_tx_timeout         = mv643xx_eth_tx_timeout,
+       .ndo_get_stats          = mv643xx_eth_get_stats,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       .ndo_poll_controller    = mv643xx_eth_netpoll,
+#endif
+};
+
 static int mv643xx_eth_probe(struct platform_device *pdev)
 {
        struct mv643xx_eth_platform_data *pd;
@@ -2932,18 +2942,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
        BUG_ON(!res);
        dev->irq = res->start;
 
-       dev->get_stats = mv643xx_eth_get_stats;
-       dev->hard_start_xmit = mv643xx_eth_xmit;
-       dev->open = mv643xx_eth_open;
-       dev->stop = mv643xx_eth_stop;
-       dev->set_rx_mode = mv643xx_eth_set_rx_mode;
-       dev->set_mac_address = mv643xx_eth_set_mac_address;
-       dev->do_ioctl = mv643xx_eth_ioctl;
-       dev->change_mtu = mv643xx_eth_change_mtu;
-       dev->tx_timeout = mv643xx_eth_tx_timeout;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       dev->poll_controller = mv643xx_eth_netpoll;
-#endif
+       dev->netdev_ops = &mv643xx_eth_netdev_ops;
+
        dev->watchdog_timeo = 2 * HZ;
        dev->base_addr = 0;
 
@@ -2955,6 +2955,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
        if (mp->shared->win_protect)
                wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect);
 
+       netif_carrier_off(dev);
+
+       set_rx_coal(mp, 250);
+       set_tx_coal(mp, 0);
+
        err = register_netdev(dev);
        if (err)
                goto out;