From: Ishizaki Kou Date: Fri, 11 Apr 2008 03:27:34 +0000 (+0900) Subject: spidernet: add missing initialization X-Git-Tag: v2.6.26-rc1~1138^2~8^2~37 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=81971bef4c4fce8571b7a31c09f94ee90eb738ec;p=linux-2.6-omap-h63xx.git spidernet: add missing initialization 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 Acked-by: Jens Osterkamp Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index bccae7e5c6a..f7781ec181f 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -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);