Commit 8348b4db authored by Francois Romieu's avatar Francois Romieu Committed by Jeff Garzik

[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: default avatarLars Vahlenberg <lars.vahlenberg@gmail.com>
Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 560d3d52
...@@ -952,12 +952,17 @@ static void sis190_phy_task(void * data) ...@@ -952,12 +952,17 @@ static void sis190_phy_task(void * data)
0x01 | _10bpsH }, 0x01 | _10bpsH },
{ 0, "unknown", 0x0000 } { 0, "unknown", 0x0000 }
}, *p; }, *p;
u16 adv;
val = mdio_read(ioaddr, phy_id, 0x1f); val = mdio_read(ioaddr, phy_id, 0x1f);
net_link(tp, KERN_INFO "%s: mii ext = %04x.\n", dev->name, val); net_link(tp, KERN_INFO "%s: mii ext = %04x.\n", dev->name, val);
val = mdio_read(ioaddr, phy_id, MII_LPA); 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++) { for (p = reg31; p->ctl; p++) {
if ((val & p->val) == p->val) if ((val & p->val) == p->val)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment