aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIshizaki Kou <kou.ishizaki@toshiba.co.jp>2008-04-11 12:27:34 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:06:50 -0400
commit81971bef4c4fce8571b7a31c09f94ee90eb738ec (patch)
treed6e2eb3b3c1c08869dd879751fe34b4495363f1e
parent7f225b427be7d3f2940fdebf5d79f753f38d3083 (diff)
downloadkernel_samsung_tuna-81971bef4c4fce8571b7a31c09f94ee90eb738ec.zip
kernel_samsung_tuna-81971bef4c4fce8571b7a31c09f94ee90eb738ec.tar.gz
kernel_samsung_tuna-81971bef4c4fce8571b7a31c09f94ee90eb738ec.tar.bz2
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 <kou.ishizaki@toshiba.co.jp> Acked-by: Jens Osterkamp <jens@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/spider_net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index bccae7e..f7781ec 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);