]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NIU]: Fix 1G PHY link state handling.
authorDavid S. Miller <davem@davemloft.net>
Wed, 16 Jan 2008 06:50:08 +0000 (22:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2008 09:49:30 +0000 (01:49 -0800)
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>
drivers/net/niu.c

index 3bbcea11329fae91de2941d1299f40f41721d8b2..5f6beabf2d179d71e399d85a0f75af84c36b189a 100644 (file)
@@ -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;
@@ -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: