Skip to content

Commit

Permalink
[NIU]: Fix 1G PHY link state handling.
Browse files Browse the repository at this point in the history
The code in link_status_1g() computes the active speed
and duplex but does not update the link config state
with those values.

As a result the link speed is not reported correctly
and the XIF is not reprogrammed properly on link up
events.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 17, 2008
1 parent d2c7ddd commit e415e6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ static int link_status_10g(struct niu *np, int *link_up_p)

static int link_status_1g(struct niu *np, int *link_up_p)
{
struct niu_link_config *lp = &np->link_config;
u16 current_speed, bmsr;
unsigned long flags;
u8 current_duplex;
Expand Down Expand Up @@ -1386,6 +1387,8 @@ static int link_status_1g(struct niu *np, int *link_up_p)
link_up = 0;
}
}
lp->active_speed = current_speed;
lp->active_duplex = current_duplex;
err = 0;

out:
Expand Down

0 comments on commit e415e6e

Please sign in to comment.