Commit 76719ee2 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: change type of member mac_version in rtl8169_private

Use the appropriate enum type for member mac_version. And don't assign
a fixed value to RTL_GIGA_MAC_NONE, there's no benefit in it.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7160be2d
...@@ -132,7 +132,7 @@ enum mac_version { ...@@ -132,7 +132,7 @@ enum mac_version {
RTL_GIGA_MAC_VER_49, RTL_GIGA_MAC_VER_49,
RTL_GIGA_MAC_VER_50, RTL_GIGA_MAC_VER_50,
RTL_GIGA_MAC_VER_51, RTL_GIGA_MAC_VER_51,
RTL_GIGA_MAC_NONE = 0xff, RTL_GIGA_MAC_NONE
}; };
#define JUMBO_1K ETH_DATA_LEN #define JUMBO_1K ETH_DATA_LEN
...@@ -639,7 +639,7 @@ struct rtl8169_private { ...@@ -639,7 +639,7 @@ struct rtl8169_private {
struct phy_device *phydev; struct phy_device *phydev;
struct napi_struct napi; struct napi_struct napi;
u32 msg_enable; u32 msg_enable;
u16 mac_version; enum mac_version mac_version;
u32 cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ u32 cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */
u32 cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */ u32 cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */
u32 dirty_tx; u32 dirty_tx;
...@@ -4203,6 +4203,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp) ...@@ -4203,6 +4203,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
rtl_eri_clear_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000); rtl_eri_clear_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000);
RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~0x80); RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~0x80);
break; break;
default:
break;
} }
} }
...@@ -4230,6 +4232,8 @@ static void r8168_pll_power_up(struct rtl8169_private *tp) ...@@ -4230,6 +4232,8 @@ static void r8168_pll_power_up(struct rtl8169_private *tp)
RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | 0xc0); RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | 0xc0);
rtl_eri_set_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000); rtl_eri_set_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000);
break; break;
default:
break;
} }
phy_resume(tp->phydev); phy_resume(tp->phydev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment