Commit 81971bef authored by Ishizaki Kou's avatar Ishizaki Kou Committed by Jeff Garzik

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: default avatarKou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: default avatarJens Osterkamp <jens@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 7f225b42
...@@ -1399,6 +1399,8 @@ spider_net_link_reset(struct net_device *netdev) ...@@ -1399,6 +1399,8 @@ spider_net_link_reset(struct net_device *netdev)
spider_net_write_reg(card, SPIDER_NET_GMACINTEN, 0); spider_net_write_reg(card, SPIDER_NET_GMACINTEN, 0);
/* reset phy and setup aneg */ /* reset phy and setup aneg */
card->aneg_count = 0;
card->medium = BCM54XX_COPPER;
spider_net_setup_aneg(card); spider_net_setup_aneg(card);
mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER); mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER);
...@@ -1982,6 +1984,8 @@ spider_net_open(struct net_device *netdev) ...@@ -1982,6 +1984,8 @@ spider_net_open(struct net_device *netdev)
goto init_firmware_failed; goto init_firmware_failed;
/* start probing with copper */ /* start probing with copper */
card->aneg_count = 0;
card->medium = BCM54XX_COPPER;
spider_net_setup_aneg(card); spider_net_setup_aneg(card);
if (card->phy.def->phy_id) if (card->phy.def->phy_id)
mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER); mod_timer(&card->aneg_timer, jiffies + SPIDER_NET_ANEG_TIMER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment