aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAyaz Abdulla <aabdulla@nvidia.com>2007-07-15 06:50:28 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-16 18:29:16 -0400
commit14a67f3c6ca319edd011db4edad63dd686426ae2 (patch)
treed68d0d3038397777132b8eaeb7184ee35c6161bb /drivers/net
parent05ffdd7bf364c456ffd51f0c2bf0f41b8e110f49 (diff)
forcedeth bug fix: cicada phy
This patch contains errata fixes for the cicada phy. It only renamed the defines to be phy specific. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/forcedeth.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 42ba1c012ee2..998afb927d44 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -557,12 +557,12 @@ union ring_type {
557#define PHYID2_MODEL_MASK 0x03f0 557#define PHYID2_MODEL_MASK 0x03f0
558#define PHY_MODEL_MARVELL_E3016 0x220 558#define PHY_MODEL_MARVELL_E3016 0x220
559#define PHY_MARVELL_E3016_INITMASK 0x0300 559#define PHY_MARVELL_E3016_INITMASK 0x0300
560#define PHY_INIT1 0x0f000 560#define PHY_CICADA_INIT1 0x0f000
561#define PHY_INIT2 0x0e00 561#define PHY_CICADA_INIT2 0x0e00
562#define PHY_INIT3 0x01000 562#define PHY_CICADA_INIT3 0x01000
563#define PHY_INIT4 0x0200 563#define PHY_CICADA_INIT4 0x0200
564#define PHY_INIT5 0x0004 564#define PHY_CICADA_INIT5 0x0004
565#define PHY_INIT6 0x02000 565#define PHY_CICADA_INIT6 0x02000
566#define PHY_GIGABIT 0x0100 566#define PHY_GIGABIT 0x0100
567 567
568#define PHY_TIMEOUT 0x1 568#define PHY_TIMEOUT 0x1
@@ -1141,14 +1141,14 @@ static int phy_init(struct net_device *dev)
1141 /* phy vendor specific configuration */ 1141 /* phy vendor specific configuration */
1142 if ((np->phy_oui == PHY_OUI_CICADA) && (phyinterface & PHY_RGMII) ) { 1142 if ((np->phy_oui == PHY_OUI_CICADA) && (phyinterface & PHY_RGMII) ) {
1143 phy_reserved = mii_rw(dev, np->phyaddr, MII_RESV1, MII_READ); 1143 phy_reserved = mii_rw(dev, np->phyaddr, MII_RESV1, MII_READ);
1144 phy_reserved &= ~(PHY_INIT1 | PHY_INIT2); 1144 phy_reserved &= ~(PHY_CICADA_INIT1 | PHY_CICADA_INIT2);
1145 phy_reserved |= (PHY_INIT3 | PHY_INIT4); 1145 phy_reserved |= (PHY_CICADA_INIT3 | PHY_CICADA_INIT4);
1146 if (mii_rw(dev, np->phyaddr, MII_RESV1, phy_reserved)) { 1146 if (mii_rw(dev, np->phyaddr, MII_RESV1, phy_reserved)) {
1147 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); 1147 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev));
1148 return PHY_ERROR; 1148 return PHY_ERROR;
1149 } 1149 }
1150 phy_reserved = mii_rw(dev, np->phyaddr, MII_NCONFIG, MII_READ); 1150 phy_reserved = mii_rw(dev, np->phyaddr, MII_NCONFIG, MII_READ);
1151 phy_reserved |= PHY_INIT5; 1151 phy_reserved |= PHY_CICADA_INIT5;
1152 if (mii_rw(dev, np->phyaddr, MII_NCONFIG, phy_reserved)) { 1152 if (mii_rw(dev, np->phyaddr, MII_NCONFIG, phy_reserved)) {
1153 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); 1153 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev));
1154 return PHY_ERROR; 1154 return PHY_ERROR;
@@ -1156,7 +1156,7 @@ static int phy_init(struct net_device *dev)
1156 } 1156 }
1157 if (np->phy_oui == PHY_OUI_CICADA) { 1157 if (np->phy_oui == PHY_OUI_CICADA) {
1158 phy_reserved = mii_rw(dev, np->phyaddr, MII_SREVISION, MII_READ); 1158 phy_reserved = mii_rw(dev, np->phyaddr, MII_SREVISION, MII_READ);
1159 phy_reserved |= PHY_INIT6; 1159 phy_reserved |= PHY_CICADA_INIT6;
1160 if (mii_rw(dev, np->phyaddr, MII_SREVISION, phy_reserved)) { 1160 if (mii_rw(dev, np->phyaddr, MII_SREVISION, phy_reserved)) {
1161 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); 1161 printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev));
1162 return PHY_ERROR; 1162 return PHY_ERROR;