Skip to content

Commit

Permalink
[PATCH] sis190: compare the lpa to the local advertisement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Francois Romieu authored and Jeff Garzik committed Jul 30, 2005
1 parent 560d3d5 commit 8348b4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/sis190.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8348b4d

Please sign in to comment.