Skip to content

Commit

Permalink
spidernet: add missing initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ishizaki Kou authored and Jeff Garzik committed Apr 17, 2008
1 parent 7f225b4 commit 81971be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 81971be

Please sign in to comment.