aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2005-07-30 07:15:01 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-07-30 18:21:00 -0400
commitfc10c39d7920b1db9ad2d80fa845896e529355dc (patch)
tree4835f69f454be1677094a95da85c65a7cdaef1fb
parent9ede109bbe93d5bbe4271e346106847fbfea95a1 (diff)
[PATCH] sis190: dummy read is required by the status register
Add a dummy read before accessing the status register SiS driver suggests it. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r--drivers/net/sis190.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index f78799c4235e..392110ede7b7 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -383,6 +383,12 @@ static int __mdio_read(struct net_device *dev, int phy_id, int reg)
383 return mdio_read(tp->mmio_addr, phy_id, reg); 383 return mdio_read(tp->mmio_addr, phy_id, reg);
384} 384}
385 385
386static u16 mdio_read_latched(void __iomem *ioaddr, int phy_id, int reg)
387{
388 mdio_read(ioaddr, phy_id, reg);
389 return mdio_read(ioaddr, phy_id, reg);
390}
391
386static u16 __devinit sis190_read_eeprom(void __iomem *ioaddr, u32 reg) 392static u16 __devinit sis190_read_eeprom(void __iomem *ioaddr, u32 reg)
387{ 393{
388 u16 data = 0xffff; 394 u16 data = 0xffff;
@@ -881,7 +887,8 @@ static void sis190_phy_task(void * data)
881 if (val & BMCR_RESET) { 887 if (val & BMCR_RESET) {
882 // FIXME: needlessly high ? -- FR 02/07/2005 888 // FIXME: needlessly high ? -- FR 02/07/2005
883 mod_timer(&tp->timer, jiffies + HZ/10); 889 mod_timer(&tp->timer, jiffies + HZ/10);
884 } else if (!(mdio_read(ioaddr, phy_id, MII_BMSR) & BMSR_ANEGCOMPLETE)) { 890 } else if (!(mdio_read_latched(ioaddr, phy_id, MII_BMSR) &
891 BMSR_ANEGCOMPLETE)) {
885 net_link(tp, KERN_WARNING "%s: PHY reset until link up.\n", 892 net_link(tp, KERN_WARNING "%s: PHY reset until link up.\n",
886 dev->name); 893 dev->name);
887 mdio_write(ioaddr, phy_id, MII_BMCR, val | BMCR_RESET); 894 mdio_write(ioaddr, phy_id, MII_BMCR, val | BMCR_RESET);