- 2.6.17 port work build breaks, but the patch set is relativly stable
[linux-flexiantxendom0-3.2.10.git] / drivers / net / spider_net.c
index 1f5975a..394339d 100644 (file)
@@ -1442,7 +1442,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
        case SPIDER_NET_GRFAFLLINT: /* fallthrough */
        case SPIDER_NET_GRMFLLINT:
                if (netif_msg_intr(card) && net_ratelimit())
-                       pr_err("Spider RX RAM full, incoming packets "
+                       pr_debug("Spider RX RAM full, incoming packets "
                               "might be discarded!\n");
                spider_net_rx_irq_off(card);
                tasklet_schedule(&card->rxram_full_tl);
@@ -1652,6 +1652,8 @@ spider_net_enable_card(struct spider_net_card *card)
                { SPIDER_NET_GFTRESTRT, SPIDER_NET_RESTART_VALUE },
 
                { SPIDER_NET_GMRWOLCTRL, 0 },
+               { SPIDER_NET_GTESTMD, 0x10000000 },
+               { SPIDER_NET_GTTQMSK, 0x00400040 },
                { SPIDER_NET_GTESTMD, 0 },
 
                { SPIDER_NET_GMACINTEN, 0 },
@@ -1792,15 +1794,7 @@ spider_net_setup_phy(struct spider_net_card *card)
        if (phy->def->ops->setup_forced)
                phy->def->ops->setup_forced(phy, SPEED_1000, DUPLEX_FULL);
 
-       /* the following two writes could be moved to sungem_phy.c */
-       /* enable fiber mode */
-       spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x9020);
-       /* LEDs active in both modes, autosense prio = fiber */
-       spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x945f);
-
-       /* switch off fibre autoneg */
-       spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0xfc01);
-       spider_net_write_phy(card->netdev, 1, 0x0b, 0x0004);
+       phy->def->ops->enable_fiber(phy);
 
        phy->def->ops->read_link(phy);
        pr_info("Found %s with %i Mbps, %s-duplex.\n", phy->def->name,
@@ -2086,7 +2080,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
 
        spider_net_setup_netdev_ops(netdev);
 
-       netdev->features = 0;
+       netdev->features = NETIF_F_HW_CSUM;
        /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
         *              NETIF_F_HW_VLAN_FILTER */