aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-06 03:55:55 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-06 03:55:55 -0500
commit230f9bb701d37ae9b48e96456689452978f5c439 (patch)
tree9d2690917533bbb4498c8c9df838de2d38360912 /drivers/net/e100.c
parent000ba2e43f33901859fd794bb33c885909d53b3b (diff)
parent887e671f324d9898aaedb29a6ece6c853c394067 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/usb/cdc_ether.c All CDC ethernet devices of type USB_CLASS_COMM need to use '&mbm_info'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r--drivers/net/e100.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index f428c5f72f18..7462fdfd7f92 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1438,19 +1438,31 @@ static int e100_phy_init(struct nic *nic)
1438 } else 1438 } else
1439 DPRINTK(HW, DEBUG, "phy_addr = %d\n", nic->mii.phy_id); 1439 DPRINTK(HW, DEBUG, "phy_addr = %d\n", nic->mii.phy_id);
1440 1440
1441 /* Isolate all the PHY ids */
1442 for (addr = 0; addr < 32; addr++)
1443 mdio_write(netdev, addr, MII_BMCR, BMCR_ISOLATE);
1444 /* Select the discovered PHY */
1445 bmcr &= ~BMCR_ISOLATE;
1446 mdio_write(netdev, nic->mii.phy_id, MII_BMCR, bmcr);
1447
1448 /* Get phy ID */ 1441 /* Get phy ID */
1449 id_lo = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID1); 1442 id_lo = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID1);
1450 id_hi = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID2); 1443 id_hi = mdio_read(netdev, nic->mii.phy_id, MII_PHYSID2);
1451 nic->phy = (u32)id_hi << 16 | (u32)id_lo; 1444 nic->phy = (u32)id_hi << 16 | (u32)id_lo;
1452 DPRINTK(HW, DEBUG, "phy ID = 0x%08X\n", nic->phy); 1445 DPRINTK(HW, DEBUG, "phy ID = 0x%08X\n", nic->phy);
1453 1446
1447 /* Select the phy and isolate the rest */
1448 for (addr = 0; addr < 32; addr++) {
1449 if (addr != nic->mii.phy_id) {
1450 mdio_write(netdev, addr, MII_BMCR, BMCR_ISOLATE);
1451 } else if (nic->phy != phy_82552_v) {
1452 bmcr = mdio_read(netdev, addr, MII_BMCR);
1453 mdio_write(netdev, addr, MII_BMCR,
1454 bmcr & ~BMCR_ISOLATE);
1455 }
1456 }
1457 /*
1458 * Workaround for 82552:
1459 * Clear the ISOLATE bit on selected phy_id last (mirrored on all
1460 * other phy_id's) using bmcr value from addr discovery loop above.
1461 */
1462 if (nic->phy == phy_82552_v)
1463 mdio_write(netdev, nic->mii.phy_id, MII_BMCR,
1464 bmcr & ~BMCR_ISOLATE);
1465
1454 /* Handle National tx phys */ 1466 /* Handle National tx phys */
1455#define NCS_PHY_MODEL_MASK 0xFFF0FFFF 1467#define NCS_PHY_MODEL_MASK 0xFFF0FFFF
1456 if ((nic->phy & NCS_PHY_MODEL_MASK) == phy_nsc_tx) { 1468 if ((nic->phy & NCS_PHY_MODEL_MASK) == phy_nsc_tx) {