]> err.no Git - linux-2.6/commitdiff
spidernet: add missing initialization
authorIshizaki Kou <kou.ishizaki@toshiba.co.jp>
Fri, 11 Apr 2008 03:27:34 +0000 (12:27 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Apr 2008 00:06:50 +0000 (20:06 -0400)
This patch fixes initialization of "aneg_count" and "medium" fields in
spider_net_card to make spidernet driver correctly sets "link status".

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/spider_net.c

index bccae7e5c6ad5ad6df1b79fc16a9b314275b97c1..f7781ec181f38919d1dd9f1beed925b5ebadd9b5 100644 (file)
@@ -1399,6 +1399,8 @@ spider_net_link_reset(struct net_device *netdev)
        spider_net_write_reg(card, SPIDER_NET_GMACINTEN, 0);
 
        /* reset phy and setup aneg */
+       card->aneg_count = 0;
+       card->medium = BCM54XX_COPPER;
        spider_net_setup_aneg(card);
        mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER);
 
@@ -1982,6 +1984,8 @@ spider_net_open(struct net_device *netdev)
                goto init_firmware_failed;
 
        /* start probing with copper */
+       card->aneg_count = 0;
+       card->medium = BCM54XX_COPPER;
        spider_net_setup_aneg(card);
        if (card->phy.def->phy_id)
                mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER);