diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2011-04-27 16:52:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-27 16:52:22 -0400 |
commit | 15ecd039b7182d725f4294e01f2fb12c3a88db17 (patch) | |
tree | 66ba7a844dacbf061a2aa62396f49640a81213cb /drivers | |
parent | da0420bee24a1ba54e55a61e95b1a53205d7e62d (diff) |
r8169: fix merge conflict fix.
- use adequate MAC_VER id
(see 01dc7fec4025f6bb72b6b98ec88b375346b6dbbb)
- remove duplicate rtl_firmware_info record
- remove duplicate functions
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/r8169.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 025dedda40a0..6364e0b03fdd 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -191,9 +191,8 @@ static const struct rtl_firmware_info { | |||
191 | { .mac_version = RTL_GIGA_MAC_VER_26, .fw_name = FIRMWARE_8168D_2 }, | 191 | { .mac_version = RTL_GIGA_MAC_VER_26, .fw_name = FIRMWARE_8168D_2 }, |
192 | { .mac_version = RTL_GIGA_MAC_VER_29, .fw_name = FIRMWARE_8105E_1 }, | 192 | { .mac_version = RTL_GIGA_MAC_VER_29, .fw_name = FIRMWARE_8105E_1 }, |
193 | { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 }, | 193 | { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 }, |
194 | { .mac_version = RTL_GIGA_MAC_VER_30, .fw_name = FIRMWARE_8105E_1 }, | 194 | { .mac_version = RTL_GIGA_MAC_VER_32, .fw_name = FIRMWARE_8168E_1 }, |
195 | { .mac_version = RTL_GIGA_MAC_VER_31, .fw_name = FIRMWARE_8168E_1 }, | 195 | { .mac_version = RTL_GIGA_MAC_VER_33, .fw_name = FIRMWARE_8168E_2 } |
196 | { .mac_version = RTL_GIGA_MAC_VER_32, .fw_name = FIRMWARE_8168E_2 } | ||
197 | }; | 196 | }; |
198 | 197 | ||
199 | enum cfg_version { | 198 | enum cfg_version { |
@@ -2535,6 +2534,8 @@ static void rtl8168e_hw_phy_config(struct rtl8169_private *tp) | |||
2535 | { 0x1f, 0x0000 } | 2534 | { 0x1f, 0x0000 } |
2536 | }; | 2535 | }; |
2537 | 2536 | ||
2537 | rtl_apply_firmware(tp); | ||
2538 | |||
2538 | rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init)); | 2539 | rtl_writephy_batch(tp, phy_reg_init, ARRAY_SIZE(phy_reg_init)); |
2539 | 2540 | ||
2540 | /* DCO enable for 10M IDLE Power */ | 2541 | /* DCO enable for 10M IDLE Power */ |
@@ -2576,20 +2577,6 @@ static void rtl8168e_hw_phy_config(struct rtl8169_private *tp) | |||
2576 | rtl_writephy(tp, 0x0d, 0x0000); | 2577 | rtl_writephy(tp, 0x0d, 0x0000); |
2577 | } | 2578 | } |
2578 | 2579 | ||
2579 | static void rtl8168e_1_hw_phy_config(struct rtl8169_private *tp) | ||
2580 | { | ||
2581 | rtl_apply_firmware(tp); | ||
2582 | |||
2583 | rtl8168e_hw_phy_config(tp); | ||
2584 | } | ||
2585 | |||
2586 | static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp) | ||
2587 | { | ||
2588 | rtl_apply_firmware(tp); | ||
2589 | |||
2590 | rtl8168e_hw_phy_config(tp); | ||
2591 | } | ||
2592 | |||
2593 | static void rtl8102e_hw_phy_config(struct rtl8169_private *tp) | 2580 | static void rtl8102e_hw_phy_config(struct rtl8169_private *tp) |
2594 | { | 2581 | { |
2595 | static const struct phy_reg phy_reg_init[] = { | 2582 | static const struct phy_reg phy_reg_init[] = { |
@@ -2705,10 +2692,8 @@ static void rtl_hw_phy_config(struct net_device *dev) | |||
2705 | rtl8105e_hw_phy_config(tp); | 2692 | rtl8105e_hw_phy_config(tp); |
2706 | break; | 2693 | break; |
2707 | case RTL_GIGA_MAC_VER_32: | 2694 | case RTL_GIGA_MAC_VER_32: |
2708 | rtl8168e_1_hw_phy_config(tp); | ||
2709 | break; | ||
2710 | case RTL_GIGA_MAC_VER_33: | 2695 | case RTL_GIGA_MAC_VER_33: |
2711 | rtl8168e_2_hw_phy_config(tp); | 2696 | rtl8168e_hw_phy_config(tp); |
2712 | break; | 2697 | break; |
2713 | 2698 | ||
2714 | default: | 2699 | default: |