diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2005-07-30 13:16:14 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-07-30 18:21:01 -0400 |
commit | 8348b4db5f56d2c0d3849db06055225ec15b255a (patch) | |
tree | f98fc7c7cee7c04f88d24c0cafcae0c628ace260 | |
parent | 560d3d521decc6d05dc0d6e007f1d2e1d3048102 (diff) | |
download | op-kernel-dev-8348b4db5f56d2c0d3849db06055225ec15b255a.zip op-kernel-dev-8348b4db5f56d2c0d3849db06055225ec15b255a.tar.gz |
[PATCH] sis190: compare the lpa to the local advertisement
The station control register must depend on both the advertisement and the lpa
The link partner ability has better be intersected with the current
advertised value before it is feed to the station control register.
Sight-catched-by: Lars Vahlenberg <lars.vahlenberg@gmail.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/net/sis190.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 84bc229..915ff00 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -952,12 +952,17 @@ static void sis190_phy_task(void * data) 0x01 | _10bpsH }, { 0, "unknown", 0x0000 } }, *p; + u16 adv; val = mdio_read(ioaddr, phy_id, 0x1f); net_link(tp, KERN_INFO "%s: mii ext = %04x.\n", dev->name, val); val = mdio_read(ioaddr, phy_id, MII_LPA); - net_link(tp, KERN_INFO "%s: mii lpa = %04x.\n", dev->name, val); + adv = mdio_read(ioaddr, phy_id, MII_ADVERTISE); + net_link(tp, KERN_INFO "%s: mii lpa = %04x adv = %04x.\n", + dev->name, val, adv); + + val &= adv; for (p = reg31; p->ctl; p++) { if ((val & p->val) == p->val) |