diff options
author | David S. Miller <davem@davemloft.net> | 2008-01-16 01:50:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-17 04:49:30 -0500 |
commit | e415e6ea0cd36ece29c7b12232286b5ca097ac96 (patch) | |
tree | b7c792dca2765965647acc93501268d8e563b9c8 /drivers/net/niu.c | |
parent | d2c7ddd6261eb885091cf6ddbcfae01f4216fb8e (diff) |
[NIU]: Fix 1G PHY link state handling.
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>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 3bbcea11329f..5f6beabf2d17 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -1319,6 +1319,7 @@ static int link_status_10g(struct niu *np, int *link_up_p) | |||
1319 | 1319 | ||
1320 | static int link_status_1g(struct niu *np, int *link_up_p) | 1320 | static int link_status_1g(struct niu *np, int *link_up_p) |
1321 | { | 1321 | { |
1322 | struct niu_link_config *lp = &np->link_config; | ||
1322 | u16 current_speed, bmsr; | 1323 | u16 current_speed, bmsr; |
1323 | unsigned long flags; | 1324 | unsigned long flags; |
1324 | u8 current_duplex; | 1325 | u8 current_duplex; |
@@ -1386,6 +1387,8 @@ static int link_status_1g(struct niu *np, int *link_up_p) | |||
1386 | link_up = 0; | 1387 | link_up = 0; |
1387 | } | 1388 | } |
1388 | } | 1389 | } |
1390 | lp->active_speed = current_speed; | ||
1391 | lp->active_duplex = current_duplex; | ||
1389 | err = 0; | 1392 | err = 0; |
1390 | 1393 | ||
1391 | out: | 1394 | out: |