summaryrefslogtreecommitdiff
path: root/drivers/staging/et131x/et1310_phy.c
diff options
context:
space:
mode:
authorMark Einon <mark.einon@gmail.com>2011-08-31 17:46:41 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 16:53:37 -0700
commite451d7b22013a95c725e581fd83da0d9c6d79445 (patch)
treee9b0eca6d4f5ec3db11240c882169fc9d05ad054 /drivers/staging/et131x/et1310_phy.c
parentce92b7ad6c718b1e228e83137af87ed8c558d358 (diff)
downloadlinux-3.10-e451d7b22013a95c725e581fd83da0d9c6d79445.tar.gz
linux-3.10-e451d7b22013a95c725e581fd83da0d9c6d79445.tar.bz2
linux-3.10-e451d7b22013a95c725e581fd83da0d9c6d79445.zip
staging: et131x: Use MII register defines from mii.h
Use defines from include/linux/mii.h instead of et131x_phy.h and delete the latter defines. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_phy.c')
-rw-r--r--drivers/staging/et131x/et1310_phy.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index c216bbba4cc..fedde6b2f1e 100644
--- a/drivers/staging/et131x/et1310_phy.c
+++ b/drivers/staging/et131x/et1310_phy.c
@@ -122,7 +122,7 @@ int et131x_mdio_reset(struct mii_bus *bus)
struct net_device *netdev = bus->priv;
struct et131x_adapter *adapter = netdev_priv(netdev);
- et131x_mii_write(adapter, PHY_CONTROL, 0x8000);
+ et131x_mii_write(adapter, MII_BMCR, 0x8000);
return 0;
}
@@ -292,11 +292,11 @@ void et1310_phy_power_down(struct et131x_adapter *adapter, bool down)
{
u16 data;
- et131x_mii_read(adapter, PHY_CONTROL, &data);
+ et131x_mii_read(adapter, MII_BMCR, &data);
data &= ~0x0800; /* Power UP */
if (down) /* Power DOWN */
data |= 0x0800;
- et131x_mii_write(adapter, PHY_CONTROL, data);
+ et131x_mii_write(adapter, MII_BMCR, data);
}
/**
@@ -328,10 +328,10 @@ static void et1310_phy_link_status(struct et131x_adapter *adapter,
u16 vmi_phystatus = 0;
u16 control = 0;
- et131x_mii_read(adapter, PHY_STATUS, &mistatus);
- et131x_mii_read(adapter, PHY_1000_STATUS, &is1000BaseT);
+ et131x_mii_read(adapter, MII_BMSR, &mistatus);
+ et131x_mii_read(adapter, MII_STAT1000, &is1000BaseT);
et131x_mii_read(adapter, PHY_PHY_STATUS, &vmi_phystatus);
- et131x_mii_read(adapter, PHY_CONTROL, &control);
+ et131x_mii_read(adapter, MII_BMCR, &control);
*link_status = (vmi_phystatus & 0x0040) ? 1 : 0;
*autoneg = (control & 0x1000) ? ((vmi_phystatus & 0x0020) ?
@@ -448,8 +448,8 @@ void et131x_mii_check(struct et131x_adapter *adapter,
u32 masterslave;
u32 polarity;
- if (bmsr_ints & MI_BMSR_LINK_STATUS) {
- if (bmsr & MI_BMSR_LINK_STATUS) {
+ if (bmsr_ints & BMSR_LSTATUS) {
+ if (bmsr & BMSR_LSTATUS) {
adapter->boot_coma = 20;
netif_carrier_on(adapter->netdev);
} else {
@@ -505,9 +505,9 @@ void et131x_mii_check(struct et131x_adapter *adapter,
}
}
- if ((bmsr_ints & MI_BMSR_AUTO_NEG_COMPLETE) ||
- (adapter->ai_force_duplex == 3 && (bmsr_ints & MI_BMSR_LINK_STATUS))) {
- if ((bmsr & MI_BMSR_AUTO_NEG_COMPLETE) ||
+ if ((bmsr_ints & BMSR_ANEGCOMPLETE) ||
+ (adapter->ai_force_duplex == 3 && (bmsr_ints & BMSR_LSTATUS))) {
+ if ((bmsr & BMSR_ANEGCOMPLETE) ||
adapter->ai_force_duplex == 3) {
et1310_phy_link_status(adapter,
&link_status, &autoneg_status,