diff options
Diffstat (limited to 'drivers/net/igb/e1000_mac.c')
-rw-r--r-- | drivers/net/igb/e1000_mac.c | 141 |
1 files changed, 70 insertions, 71 deletions
diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c index 3e84a3f0c1d8..47ad2c4277c3 100644 --- a/drivers/net/igb/e1000_mac.c +++ b/drivers/net/igb/e1000_mac.c | |||
@@ -39,7 +39,7 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw); | |||
39 | static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr); | 39 | static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr); |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * e1000_remove_device - Free device specific structure | 42 | * igb_remove_device - Free device specific structure |
43 | * @hw: pointer to the HW structure | 43 | * @hw: pointer to the HW structure |
44 | * | 44 | * |
45 | * If a device specific structure was allocated, this function will | 45 | * If a device specific structure was allocated, this function will |
@@ -73,7 +73,7 @@ static s32 igb_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * e1000_get_bus_info_pcie - Get PCIe bus information | 76 | * igb_get_bus_info_pcie - Get PCIe bus information |
77 | * @hw: pointer to the HW structure | 77 | * @hw: pointer to the HW structure |
78 | * | 78 | * |
79 | * Determines and stores the system bus information for a particular | 79 | * Determines and stores the system bus information for a particular |
@@ -113,7 +113,7 @@ s32 igb_get_bus_info_pcie(struct e1000_hw *hw) | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * e1000_clear_vfta - Clear VLAN filter table | 116 | * igb_clear_vfta - Clear VLAN filter table |
117 | * @hw: pointer to the HW structure | 117 | * @hw: pointer to the HW structure |
118 | * | 118 | * |
119 | * Clears the register array which contains the VLAN filter table by | 119 | * Clears the register array which contains the VLAN filter table by |
@@ -130,7 +130,7 @@ void igb_clear_vfta(struct e1000_hw *hw) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | /** | 132 | /** |
133 | * e1000_write_vfta - Write value to VLAN filter table | 133 | * igb_write_vfta - Write value to VLAN filter table |
134 | * @hw: pointer to the HW structure | 134 | * @hw: pointer to the HW structure |
135 | * @offset: register offset in VLAN filter table | 135 | * @offset: register offset in VLAN filter table |
136 | * @value: register value written to VLAN filter table | 136 | * @value: register value written to VLAN filter table |
@@ -145,7 +145,7 @@ void igb_write_vfta(struct e1000_hw *hw, u32 offset, u32 value) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | /** | 147 | /** |
148 | * e1000_init_rx_addrs - Initialize receive address's | 148 | * igb_init_rx_addrs - Initialize receive address's |
149 | * @hw: pointer to the HW structure | 149 | * @hw: pointer to the HW structure |
150 | * @rar_count: receive address registers | 150 | * @rar_count: receive address registers |
151 | * | 151 | * |
@@ -158,12 +158,12 @@ void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count) | |||
158 | u32 i; | 158 | u32 i; |
159 | 159 | ||
160 | /* Setup the receive address */ | 160 | /* Setup the receive address */ |
161 | hw_dbg(hw, "Programming MAC Address into RAR[0]\n"); | 161 | hw_dbg("Programming MAC Address into RAR[0]\n"); |
162 | 162 | ||
163 | hw->mac.ops.rar_set(hw, hw->mac.addr, 0); | 163 | hw->mac.ops.rar_set(hw, hw->mac.addr, 0); |
164 | 164 | ||
165 | /* Zero out the other (rar_entry_count - 1) receive addresses */ | 165 | /* Zero out the other (rar_entry_count - 1) receive addresses */ |
166 | hw_dbg(hw, "Clearing RAR[1-%u]\n", rar_count-1); | 166 | hw_dbg("Clearing RAR[1-%u]\n", rar_count-1); |
167 | for (i = 1; i < rar_count; i++) { | 167 | for (i = 1; i < rar_count; i++) { |
168 | array_wr32(E1000_RA, (i << 1), 0); | 168 | array_wr32(E1000_RA, (i << 1), 0); |
169 | wrfl(); | 169 | wrfl(); |
@@ -173,7 +173,7 @@ void igb_init_rx_addrs(struct e1000_hw *hw, u16 rar_count) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * e1000_check_alt_mac_addr - Check for alternate MAC addr | 176 | * igb_check_alt_mac_addr - Check for alternate MAC addr |
177 | * @hw: pointer to the HW structure | 177 | * @hw: pointer to the HW structure |
178 | * | 178 | * |
179 | * Checks the nvm for an alternate MAC address. An alternate MAC address | 179 | * Checks the nvm for an alternate MAC address. An alternate MAC address |
@@ -193,7 +193,7 @@ s32 igb_check_alt_mac_addr(struct e1000_hw *hw) | |||
193 | ret_val = hw->nvm.ops.read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1, | 193 | ret_val = hw->nvm.ops.read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1, |
194 | &nvm_alt_mac_addr_offset); | 194 | &nvm_alt_mac_addr_offset); |
195 | if (ret_val) { | 195 | if (ret_val) { |
196 | hw_dbg(hw, "NVM Read Error\n"); | 196 | hw_dbg("NVM Read Error\n"); |
197 | goto out; | 197 | goto out; |
198 | } | 198 | } |
199 | 199 | ||
@@ -209,7 +209,7 @@ s32 igb_check_alt_mac_addr(struct e1000_hw *hw) | |||
209 | offset = nvm_alt_mac_addr_offset + (i >> 1); | 209 | offset = nvm_alt_mac_addr_offset + (i >> 1); |
210 | ret_val = hw->nvm.ops.read_nvm(hw, offset, 1, &nvm_data); | 210 | ret_val = hw->nvm.ops.read_nvm(hw, offset, 1, &nvm_data); |
211 | if (ret_val) { | 211 | if (ret_val) { |
212 | hw_dbg(hw, "NVM Read Error\n"); | 212 | hw_dbg("NVM Read Error\n"); |
213 | goto out; | 213 | goto out; |
214 | } | 214 | } |
215 | 215 | ||
@@ -233,7 +233,7 @@ out: | |||
233 | } | 233 | } |
234 | 234 | ||
235 | /** | 235 | /** |
236 | * e1000_rar_set - Set receive address register | 236 | * igb_rar_set - Set receive address register |
237 | * @hw: pointer to the HW structure | 237 | * @hw: pointer to the HW structure |
238 | * @addr: pointer to the receive address | 238 | * @addr: pointer to the receive address |
239 | * @index: receive address array register | 239 | * @index: receive address array register |
@@ -263,7 +263,7 @@ void igb_rar_set(struct e1000_hw *hw, u8 *addr, u32 index) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | /** | 265 | /** |
266 | * e1000_mta_set - Set multicast filter table address | 266 | * igb_mta_set - Set multicast filter table address |
267 | * @hw: pointer to the HW structure | 267 | * @hw: pointer to the HW structure |
268 | * @hash_value: determines the MTA register and bit to set | 268 | * @hash_value: determines the MTA register and bit to set |
269 | * | 269 | * |
@@ -298,7 +298,7 @@ static void igb_mta_set(struct e1000_hw *hw, u32 hash_value) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | /** | 300 | /** |
301 | * e1000_update_mc_addr_list - Update Multicast addresses | 301 | * igb_update_mc_addr_list - Update Multicast addresses |
302 | * @hw: pointer to the HW structure | 302 | * @hw: pointer to the HW structure |
303 | * @mc_addr_list: array of multicast addresses to program | 303 | * @mc_addr_list: array of multicast addresses to program |
304 | * @mc_addr_count: number of multicast addresses to program | 304 | * @mc_addr_count: number of multicast addresses to program |
@@ -336,7 +336,7 @@ void igb_update_mc_addr_list(struct e1000_hw *hw, | |||
336 | } | 336 | } |
337 | 337 | ||
338 | /* Clear the old settings from the MTA */ | 338 | /* Clear the old settings from the MTA */ |
339 | hw_dbg(hw, "Clearing MTA\n"); | 339 | hw_dbg("Clearing MTA\n"); |
340 | for (i = 0; i < hw->mac.mta_reg_count; i++) { | 340 | for (i = 0; i < hw->mac.mta_reg_count; i++) { |
341 | array_wr32(E1000_MTA, i, 0); | 341 | array_wr32(E1000_MTA, i, 0); |
342 | wrfl(); | 342 | wrfl(); |
@@ -345,14 +345,14 @@ void igb_update_mc_addr_list(struct e1000_hw *hw, | |||
345 | /* Load any remaining multicast addresses into the hash table. */ | 345 | /* Load any remaining multicast addresses into the hash table. */ |
346 | for (; mc_addr_count > 0; mc_addr_count--) { | 346 | for (; mc_addr_count > 0; mc_addr_count--) { |
347 | hash_value = igb_hash_mc_addr(hw, mc_addr_list); | 347 | hash_value = igb_hash_mc_addr(hw, mc_addr_list); |
348 | hw_dbg(hw, "Hash value = 0x%03X\n", hash_value); | 348 | hw_dbg("Hash value = 0x%03X\n", hash_value); |
349 | igb_mta_set(hw, hash_value); | 349 | igb_mta_set(hw, hash_value); |
350 | mc_addr_list += ETH_ALEN; | 350 | mc_addr_list += ETH_ALEN; |
351 | } | 351 | } |
352 | } | 352 | } |
353 | 353 | ||
354 | /** | 354 | /** |
355 | * e1000_hash_mc_addr - Generate a multicast hash value | 355 | * igb_hash_mc_addr - Generate a multicast hash value |
356 | * @hw: pointer to the HW structure | 356 | * @hw: pointer to the HW structure |
357 | * @mc_addr: pointer to a multicast address | 357 | * @mc_addr: pointer to a multicast address |
358 | * | 358 | * |
@@ -423,7 +423,7 @@ static u32 igb_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | /** | 425 | /** |
426 | * e1000_clear_hw_cntrs_base - Clear base hardware counters | 426 | * igb_clear_hw_cntrs_base - Clear base hardware counters |
427 | * @hw: pointer to the HW structure | 427 | * @hw: pointer to the HW structure |
428 | * | 428 | * |
429 | * Clears the base hardware counters by reading the counter registers. | 429 | * Clears the base hardware counters by reading the counter registers. |
@@ -472,7 +472,7 @@ void igb_clear_hw_cntrs_base(struct e1000_hw *hw) | |||
472 | } | 472 | } |
473 | 473 | ||
474 | /** | 474 | /** |
475 | * e1000_check_for_copper_link - Check for link (Copper) | 475 | * igb_check_for_copper_link - Check for link (Copper) |
476 | * @hw: pointer to the HW structure | 476 | * @hw: pointer to the HW structure |
477 | * | 477 | * |
478 | * Checks to see of the link status of the hardware has changed. If a | 478 | * Checks to see of the link status of the hardware has changed. If a |
@@ -540,14 +540,14 @@ s32 igb_check_for_copper_link(struct e1000_hw *hw) | |||
540 | */ | 540 | */ |
541 | ret_val = igb_config_fc_after_link_up(hw); | 541 | ret_val = igb_config_fc_after_link_up(hw); |
542 | if (ret_val) | 542 | if (ret_val) |
543 | hw_dbg(hw, "Error configuring flow control\n"); | 543 | hw_dbg("Error configuring flow control\n"); |
544 | 544 | ||
545 | out: | 545 | out: |
546 | return ret_val; | 546 | return ret_val; |
547 | } | 547 | } |
548 | 548 | ||
549 | /** | 549 | /** |
550 | * e1000_setup_link - Setup flow control and link settings | 550 | * igb_setup_link - Setup flow control and link settings |
551 | * @hw: pointer to the HW structure | 551 | * @hw: pointer to the HW structure |
552 | * | 552 | * |
553 | * Determines which flow control settings to use, then configures flow | 553 | * Determines which flow control settings to use, then configures flow |
@@ -578,7 +578,7 @@ s32 igb_setup_link(struct e1000_hw *hw) | |||
578 | */ | 578 | */ |
579 | hw->fc.original_type = hw->fc.type; | 579 | hw->fc.original_type = hw->fc.type; |
580 | 580 | ||
581 | hw_dbg(hw, "After fix-ups FlowControl is now = %x\n", hw->fc.type); | 581 | hw_dbg("After fix-ups FlowControl is now = %x\n", hw->fc.type); |
582 | 582 | ||
583 | /* Call the necessary media_type subroutine to configure the link. */ | 583 | /* Call the necessary media_type subroutine to configure the link. */ |
584 | ret_val = hw->mac.ops.setup_physical_interface(hw); | 584 | ret_val = hw->mac.ops.setup_physical_interface(hw); |
@@ -591,8 +591,7 @@ s32 igb_setup_link(struct e1000_hw *hw) | |||
591 | * control is disabled, because it does not hurt anything to | 591 | * control is disabled, because it does not hurt anything to |
592 | * initialize these registers. | 592 | * initialize these registers. |
593 | */ | 593 | */ |
594 | hw_dbg(hw, | 594 | hw_dbg("Initializing the Flow Control address, type and timer regs\n"); |
595 | "Initializing the Flow Control address, type and timer regs\n"); | ||
596 | wr32(E1000_FCT, FLOW_CONTROL_TYPE); | 595 | wr32(E1000_FCT, FLOW_CONTROL_TYPE); |
597 | wr32(E1000_FCAH, FLOW_CONTROL_ADDRESS_HIGH); | 596 | wr32(E1000_FCAH, FLOW_CONTROL_ADDRESS_HIGH); |
598 | wr32(E1000_FCAL, FLOW_CONTROL_ADDRESS_LOW); | 597 | wr32(E1000_FCAL, FLOW_CONTROL_ADDRESS_LOW); |
@@ -606,7 +605,7 @@ out: | |||
606 | } | 605 | } |
607 | 606 | ||
608 | /** | 607 | /** |
609 | * e1000_config_collision_dist - Configure collision distance | 608 | * igb_config_collision_dist - Configure collision distance |
610 | * @hw: pointer to the HW structure | 609 | * @hw: pointer to the HW structure |
611 | * | 610 | * |
612 | * Configures the collision distance to the default value and is used | 611 | * Configures the collision distance to the default value and is used |
@@ -627,7 +626,7 @@ void igb_config_collision_dist(struct e1000_hw *hw) | |||
627 | } | 626 | } |
628 | 627 | ||
629 | /** | 628 | /** |
630 | * e1000_set_fc_watermarks - Set flow control high/low watermarks | 629 | * igb_set_fc_watermarks - Set flow control high/low watermarks |
631 | * @hw: pointer to the HW structure | 630 | * @hw: pointer to the HW structure |
632 | * | 631 | * |
633 | * Sets the flow control high/low threshold (watermark) registers. If | 632 | * Sets the flow control high/low threshold (watermark) registers. If |
@@ -665,7 +664,7 @@ static s32 igb_set_fc_watermarks(struct e1000_hw *hw) | |||
665 | } | 664 | } |
666 | 665 | ||
667 | /** | 666 | /** |
668 | * e1000_set_default_fc - Set flow control default values | 667 | * igb_set_default_fc - Set flow control default values |
669 | * @hw: pointer to the HW structure | 668 | * @hw: pointer to the HW structure |
670 | * | 669 | * |
671 | * Read the EEPROM for the default values for flow control and store the | 670 | * Read the EEPROM for the default values for flow control and store the |
@@ -689,7 +688,7 @@ static s32 igb_set_default_fc(struct e1000_hw *hw) | |||
689 | &nvm_data); | 688 | &nvm_data); |
690 | 689 | ||
691 | if (ret_val) { | 690 | if (ret_val) { |
692 | hw_dbg(hw, "NVM Read Error\n"); | 691 | hw_dbg("NVM Read Error\n"); |
693 | goto out; | 692 | goto out; |
694 | } | 693 | } |
695 | 694 | ||
@@ -706,7 +705,7 @@ out: | |||
706 | } | 705 | } |
707 | 706 | ||
708 | /** | 707 | /** |
709 | * e1000_force_mac_fc - Force the MAC's flow control settings | 708 | * igb_force_mac_fc - Force the MAC's flow control settings |
710 | * @hw: pointer to the HW structure | 709 | * @hw: pointer to the HW structure |
711 | * | 710 | * |
712 | * Force the MAC's flow control settings. Sets the TFCE and RFCE bits in the | 711 | * Force the MAC's flow control settings. Sets the TFCE and RFCE bits in the |
@@ -740,7 +739,7 @@ s32 igb_force_mac_fc(struct e1000_hw *hw) | |||
740 | * 3: Both Rx and TX flow control (symmetric) is enabled. | 739 | * 3: Both Rx and TX flow control (symmetric) is enabled. |
741 | * other: No other values should be possible at this point. | 740 | * other: No other values should be possible at this point. |
742 | */ | 741 | */ |
743 | hw_dbg(hw, "hw->fc.type = %u\n", hw->fc.type); | 742 | hw_dbg("hw->fc.type = %u\n", hw->fc.type); |
744 | 743 | ||
745 | switch (hw->fc.type) { | 744 | switch (hw->fc.type) { |
746 | case e1000_fc_none: | 745 | case e1000_fc_none: |
@@ -758,7 +757,7 @@ s32 igb_force_mac_fc(struct e1000_hw *hw) | |||
758 | ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE); | 757 | ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE); |
759 | break; | 758 | break; |
760 | default: | 759 | default: |
761 | hw_dbg(hw, "Flow control param set incorrectly\n"); | 760 | hw_dbg("Flow control param set incorrectly\n"); |
762 | ret_val = -E1000_ERR_CONFIG; | 761 | ret_val = -E1000_ERR_CONFIG; |
763 | goto out; | 762 | goto out; |
764 | } | 763 | } |
@@ -770,7 +769,7 @@ out: | |||
770 | } | 769 | } |
771 | 770 | ||
772 | /** | 771 | /** |
773 | * e1000_config_fc_after_link_up - Configures flow control after link | 772 | * igb_config_fc_after_link_up - Configures flow control after link |
774 | * @hw: pointer to the HW structure | 773 | * @hw: pointer to the HW structure |
775 | * | 774 | * |
776 | * Checks the status of auto-negotiation after link up to ensure that the | 775 | * Checks the status of auto-negotiation after link up to ensure that the |
@@ -801,7 +800,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
801 | } | 800 | } |
802 | 801 | ||
803 | if (ret_val) { | 802 | if (ret_val) { |
804 | hw_dbg(hw, "Error forcing flow control settings\n"); | 803 | hw_dbg("Error forcing flow control settings\n"); |
805 | goto out; | 804 | goto out; |
806 | } | 805 | } |
807 | 806 | ||
@@ -827,7 +826,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
827 | goto out; | 826 | goto out; |
828 | 827 | ||
829 | if (!(mii_status_reg & MII_SR_AUTONEG_COMPLETE)) { | 828 | if (!(mii_status_reg & MII_SR_AUTONEG_COMPLETE)) { |
830 | hw_dbg(hw, "Copper PHY and Auto Neg " | 829 | hw_dbg("Copper PHY and Auto Neg " |
831 | "has not completed.\n"); | 830 | "has not completed.\n"); |
832 | goto out; | 831 | goto out; |
833 | } | 832 | } |
@@ -893,11 +892,11 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
893 | */ | 892 | */ |
894 | if (hw->fc.original_type == e1000_fc_full) { | 893 | if (hw->fc.original_type == e1000_fc_full) { |
895 | hw->fc.type = e1000_fc_full; | 894 | hw->fc.type = e1000_fc_full; |
896 | hw_dbg(hw, "Flow Control = FULL.\r\n"); | 895 | hw_dbg("Flow Control = FULL.\r\n"); |
897 | } else { | 896 | } else { |
898 | hw->fc.type = e1000_fc_rx_pause; | 897 | hw->fc.type = e1000_fc_rx_pause; |
899 | hw_dbg(hw, "Flow Control = " | 898 | hw_dbg("Flow Control = " |
900 | "RX PAUSE frames only.\r\n"); | 899 | "RX PAUSE frames only.\r\n"); |
901 | } | 900 | } |
902 | } | 901 | } |
903 | /* | 902 | /* |
@@ -913,7 +912,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
913 | (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && | 912 | (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && |
914 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { | 913 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { |
915 | hw->fc.type = e1000_fc_tx_pause; | 914 | hw->fc.type = e1000_fc_tx_pause; |
916 | hw_dbg(hw, "Flow Control = TX PAUSE frames only.\r\n"); | 915 | hw_dbg("Flow Control = TX PAUSE frames only.\r\n"); |
917 | } | 916 | } |
918 | /* | 917 | /* |
919 | * For transmitting PAUSE frames ONLY. | 918 | * For transmitting PAUSE frames ONLY. |
@@ -928,7 +927,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
928 | !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && | 927 | !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && |
929 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { | 928 | (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { |
930 | hw->fc.type = e1000_fc_rx_pause; | 929 | hw->fc.type = e1000_fc_rx_pause; |
931 | hw_dbg(hw, "Flow Control = RX PAUSE frames only.\r\n"); | 930 | hw_dbg("Flow Control = RX PAUSE frames only.\r\n"); |
932 | } | 931 | } |
933 | /* | 932 | /* |
934 | * Per the IEEE spec, at this point flow control should be | 933 | * Per the IEEE spec, at this point flow control should be |
@@ -955,10 +954,10 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
955 | hw->fc.original_type == e1000_fc_tx_pause) || | 954 | hw->fc.original_type == e1000_fc_tx_pause) || |
956 | hw->fc.strict_ieee) { | 955 | hw->fc.strict_ieee) { |
957 | hw->fc.type = e1000_fc_none; | 956 | hw->fc.type = e1000_fc_none; |
958 | hw_dbg(hw, "Flow Control = NONE.\r\n"); | 957 | hw_dbg("Flow Control = NONE.\r\n"); |
959 | } else { | 958 | } else { |
960 | hw->fc.type = e1000_fc_rx_pause; | 959 | hw->fc.type = e1000_fc_rx_pause; |
961 | hw_dbg(hw, "Flow Control = RX PAUSE frames only.\r\n"); | 960 | hw_dbg("Flow Control = RX PAUSE frames only.\r\n"); |
962 | } | 961 | } |
963 | 962 | ||
964 | /* | 963 | /* |
@@ -968,7 +967,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
968 | */ | 967 | */ |
969 | ret_val = hw->mac.ops.get_speed_and_duplex(hw, &speed, &duplex); | 968 | ret_val = hw->mac.ops.get_speed_and_duplex(hw, &speed, &duplex); |
970 | if (ret_val) { | 969 | if (ret_val) { |
971 | hw_dbg(hw, "Error getting link speed and duplex\n"); | 970 | hw_dbg("Error getting link speed and duplex\n"); |
972 | goto out; | 971 | goto out; |
973 | } | 972 | } |
974 | 973 | ||
@@ -981,7 +980,7 @@ s32 igb_config_fc_after_link_up(struct e1000_hw *hw) | |||
981 | */ | 980 | */ |
982 | ret_val = igb_force_mac_fc(hw); | 981 | ret_val = igb_force_mac_fc(hw); |
983 | if (ret_val) { | 982 | if (ret_val) { |
984 | hw_dbg(hw, "Error forcing flow control settings\n"); | 983 | hw_dbg("Error forcing flow control settings\n"); |
985 | goto out; | 984 | goto out; |
986 | } | 985 | } |
987 | } | 986 | } |
@@ -991,7 +990,7 @@ out: | |||
991 | } | 990 | } |
992 | 991 | ||
993 | /** | 992 | /** |
994 | * e1000_get_speed_and_duplex_copper - Retreive current speed/duplex | 993 | * igb_get_speed_and_duplex_copper - Retreive current speed/duplex |
995 | * @hw: pointer to the HW structure | 994 | * @hw: pointer to the HW structure |
996 | * @speed: stores the current speed | 995 | * @speed: stores the current speed |
997 | * @duplex: stores the current duplex | 996 | * @duplex: stores the current duplex |
@@ -1007,28 +1006,28 @@ s32 igb_get_speed_and_duplex_copper(struct e1000_hw *hw, u16 *speed, | |||
1007 | status = rd32(E1000_STATUS); | 1006 | status = rd32(E1000_STATUS); |
1008 | if (status & E1000_STATUS_SPEED_1000) { | 1007 | if (status & E1000_STATUS_SPEED_1000) { |
1009 | *speed = SPEED_1000; | 1008 | *speed = SPEED_1000; |
1010 | hw_dbg(hw, "1000 Mbs, "); | 1009 | hw_dbg("1000 Mbs, "); |
1011 | } else if (status & E1000_STATUS_SPEED_100) { | 1010 | } else if (status & E1000_STATUS_SPEED_100) { |
1012 | *speed = SPEED_100; | 1011 | *speed = SPEED_100; |
1013 | hw_dbg(hw, "100 Mbs, "); | 1012 | hw_dbg("100 Mbs, "); |
1014 | } else { | 1013 | } else { |
1015 | *speed = SPEED_10; | 1014 | *speed = SPEED_10; |
1016 | hw_dbg(hw, "10 Mbs, "); | 1015 | hw_dbg("10 Mbs, "); |
1017 | } | 1016 | } |
1018 | 1017 | ||
1019 | if (status & E1000_STATUS_FD) { | 1018 | if (status & E1000_STATUS_FD) { |
1020 | *duplex = FULL_DUPLEX; | 1019 | *duplex = FULL_DUPLEX; |
1021 | hw_dbg(hw, "Full Duplex\n"); | 1020 | hw_dbg("Full Duplex\n"); |
1022 | } else { | 1021 | } else { |
1023 | *duplex = HALF_DUPLEX; | 1022 | *duplex = HALF_DUPLEX; |
1024 | hw_dbg(hw, "Half Duplex\n"); | 1023 | hw_dbg("Half Duplex\n"); |
1025 | } | 1024 | } |
1026 | 1025 | ||
1027 | return 0; | 1026 | return 0; |
1028 | } | 1027 | } |
1029 | 1028 | ||
1030 | /** | 1029 | /** |
1031 | * e1000_get_hw_semaphore - Acquire hardware semaphore | 1030 | * igb_get_hw_semaphore - Acquire hardware semaphore |
1032 | * @hw: pointer to the HW structure | 1031 | * @hw: pointer to the HW structure |
1033 | * | 1032 | * |
1034 | * Acquire the HW semaphore to access the PHY or NVM | 1033 | * Acquire the HW semaphore to access the PHY or NVM |
@@ -1051,7 +1050,7 @@ s32 igb_get_hw_semaphore(struct e1000_hw *hw) | |||
1051 | } | 1050 | } |
1052 | 1051 | ||
1053 | if (i == timeout) { | 1052 | if (i == timeout) { |
1054 | hw_dbg(hw, "Driver can't access device - SMBI bit is set.\n"); | 1053 | hw_dbg("Driver can't access device - SMBI bit is set.\n"); |
1055 | ret_val = -E1000_ERR_NVM; | 1054 | ret_val = -E1000_ERR_NVM; |
1056 | goto out; | 1055 | goto out; |
1057 | } | 1056 | } |
@@ -1071,7 +1070,7 @@ s32 igb_get_hw_semaphore(struct e1000_hw *hw) | |||
1071 | if (i == timeout) { | 1070 | if (i == timeout) { |
1072 | /* Release semaphores */ | 1071 | /* Release semaphores */ |
1073 | igb_put_hw_semaphore(hw); | 1072 | igb_put_hw_semaphore(hw); |
1074 | hw_dbg(hw, "Driver can't access the NVM\n"); | 1073 | hw_dbg("Driver can't access the NVM\n"); |
1075 | ret_val = -E1000_ERR_NVM; | 1074 | ret_val = -E1000_ERR_NVM; |
1076 | goto out; | 1075 | goto out; |
1077 | } | 1076 | } |
@@ -1081,7 +1080,7 @@ out: | |||
1081 | } | 1080 | } |
1082 | 1081 | ||
1083 | /** | 1082 | /** |
1084 | * e1000_put_hw_semaphore - Release hardware semaphore | 1083 | * igb_put_hw_semaphore - Release hardware semaphore |
1085 | * @hw: pointer to the HW structure | 1084 | * @hw: pointer to the HW structure |
1086 | * | 1085 | * |
1087 | * Release hardware semaphore used to access the PHY or NVM | 1086 | * Release hardware semaphore used to access the PHY or NVM |
@@ -1098,7 +1097,7 @@ void igb_put_hw_semaphore(struct e1000_hw *hw) | |||
1098 | } | 1097 | } |
1099 | 1098 | ||
1100 | /** | 1099 | /** |
1101 | * e1000_get_auto_rd_done - Check for auto read completion | 1100 | * igb_get_auto_rd_done - Check for auto read completion |
1102 | * @hw: pointer to the HW structure | 1101 | * @hw: pointer to the HW structure |
1103 | * | 1102 | * |
1104 | * Check EEPROM for Auto Read done bit. | 1103 | * Check EEPROM for Auto Read done bit. |
@@ -1117,7 +1116,7 @@ s32 igb_get_auto_rd_done(struct e1000_hw *hw) | |||
1117 | } | 1116 | } |
1118 | 1117 | ||
1119 | if (i == AUTO_READ_DONE_TIMEOUT) { | 1118 | if (i == AUTO_READ_DONE_TIMEOUT) { |
1120 | hw_dbg(hw, "Auto read by HW from NVM has not completed.\n"); | 1119 | hw_dbg("Auto read by HW from NVM has not completed.\n"); |
1121 | ret_val = -E1000_ERR_RESET; | 1120 | ret_val = -E1000_ERR_RESET; |
1122 | goto out; | 1121 | goto out; |
1123 | } | 1122 | } |
@@ -1127,7 +1126,7 @@ out: | |||
1127 | } | 1126 | } |
1128 | 1127 | ||
1129 | /** | 1128 | /** |
1130 | * e1000_valid_led_default - Verify a valid default LED config | 1129 | * igb_valid_led_default - Verify a valid default LED config |
1131 | * @hw: pointer to the HW structure | 1130 | * @hw: pointer to the HW structure |
1132 | * @data: pointer to the NVM (EEPROM) | 1131 | * @data: pointer to the NVM (EEPROM) |
1133 | * | 1132 | * |
@@ -1140,7 +1139,7 @@ static s32 igb_valid_led_default(struct e1000_hw *hw, u16 *data) | |||
1140 | 1139 | ||
1141 | ret_val = hw->nvm.ops.read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data); | 1140 | ret_val = hw->nvm.ops.read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data); |
1142 | if (ret_val) { | 1141 | if (ret_val) { |
1143 | hw_dbg(hw, "NVM Read Error\n"); | 1142 | hw_dbg("NVM Read Error\n"); |
1144 | goto out; | 1143 | goto out; |
1145 | } | 1144 | } |
1146 | 1145 | ||
@@ -1152,7 +1151,7 @@ out: | |||
1152 | } | 1151 | } |
1153 | 1152 | ||
1154 | /** | 1153 | /** |
1155 | * e1000_id_led_init - | 1154 | * igb_id_led_init - |
1156 | * @hw: pointer to the HW structure | 1155 | * @hw: pointer to the HW structure |
1157 | * | 1156 | * |
1158 | **/ | 1157 | **/ |
@@ -1217,7 +1216,7 @@ out: | |||
1217 | } | 1216 | } |
1218 | 1217 | ||
1219 | /** | 1218 | /** |
1220 | * e1000_cleanup_led - Set LED config to default operation | 1219 | * igb_cleanup_led - Set LED config to default operation |
1221 | * @hw: pointer to the HW structure | 1220 | * @hw: pointer to the HW structure |
1222 | * | 1221 | * |
1223 | * Remove the current LED configuration and set the LED configuration | 1222 | * Remove the current LED configuration and set the LED configuration |
@@ -1230,7 +1229,7 @@ s32 igb_cleanup_led(struct e1000_hw *hw) | |||
1230 | } | 1229 | } |
1231 | 1230 | ||
1232 | /** | 1231 | /** |
1233 | * e1000_blink_led - Blink LED | 1232 | * igb_blink_led - Blink LED |
1234 | * @hw: pointer to the HW structure | 1233 | * @hw: pointer to the HW structure |
1235 | * | 1234 | * |
1236 | * Blink the led's which are set to be on. | 1235 | * Blink the led's which are set to be on. |
@@ -1263,7 +1262,7 @@ s32 igb_blink_led(struct e1000_hw *hw) | |||
1263 | } | 1262 | } |
1264 | 1263 | ||
1265 | /** | 1264 | /** |
1266 | * e1000_led_off - Turn LED off | 1265 | * igb_led_off - Turn LED off |
1267 | * @hw: pointer to the HW structure | 1266 | * @hw: pointer to the HW structure |
1268 | * | 1267 | * |
1269 | * Turn LED off. | 1268 | * Turn LED off. |
@@ -1290,7 +1289,7 @@ s32 igb_led_off(struct e1000_hw *hw) | |||
1290 | } | 1289 | } |
1291 | 1290 | ||
1292 | /** | 1291 | /** |
1293 | * e1000_disable_pcie_master - Disables PCI-express master access | 1292 | * igb_disable_pcie_master - Disables PCI-express master access |
1294 | * @hw: pointer to the HW structure | 1293 | * @hw: pointer to the HW structure |
1295 | * | 1294 | * |
1296 | * Returns 0 (0) if successful, else returns -10 | 1295 | * Returns 0 (0) if successful, else returns -10 |
@@ -1322,7 +1321,7 @@ s32 igb_disable_pcie_master(struct e1000_hw *hw) | |||
1322 | } | 1321 | } |
1323 | 1322 | ||
1324 | if (!timeout) { | 1323 | if (!timeout) { |
1325 | hw_dbg(hw, "Master requests are pending.\n"); | 1324 | hw_dbg("Master requests are pending.\n"); |
1326 | ret_val = -E1000_ERR_MASTER_REQUESTS_PENDING; | 1325 | ret_val = -E1000_ERR_MASTER_REQUESTS_PENDING; |
1327 | goto out; | 1326 | goto out; |
1328 | } | 1327 | } |
@@ -1332,7 +1331,7 @@ out: | |||
1332 | } | 1331 | } |
1333 | 1332 | ||
1334 | /** | 1333 | /** |
1335 | * e1000_reset_adaptive - Reset Adaptive Interframe Spacing | 1334 | * igb_reset_adaptive - Reset Adaptive Interframe Spacing |
1336 | * @hw: pointer to the HW structure | 1335 | * @hw: pointer to the HW structure |
1337 | * | 1336 | * |
1338 | * Reset the Adaptive Interframe Spacing throttle to default values. | 1337 | * Reset the Adaptive Interframe Spacing throttle to default values. |
@@ -1342,7 +1341,7 @@ void igb_reset_adaptive(struct e1000_hw *hw) | |||
1342 | struct e1000_mac_info *mac = &hw->mac; | 1341 | struct e1000_mac_info *mac = &hw->mac; |
1343 | 1342 | ||
1344 | if (!mac->adaptive_ifs) { | 1343 | if (!mac->adaptive_ifs) { |
1345 | hw_dbg(hw, "Not in Adaptive IFS mode!\n"); | 1344 | hw_dbg("Not in Adaptive IFS mode!\n"); |
1346 | goto out; | 1345 | goto out; |
1347 | } | 1346 | } |
1348 | 1347 | ||
@@ -1361,7 +1360,7 @@ out: | |||
1361 | } | 1360 | } |
1362 | 1361 | ||
1363 | /** | 1362 | /** |
1364 | * e1000_update_adaptive - Update Adaptive Interframe Spacing | 1363 | * igb_update_adaptive - Update Adaptive Interframe Spacing |
1365 | * @hw: pointer to the HW structure | 1364 | * @hw: pointer to the HW structure |
1366 | * | 1365 | * |
1367 | * Update the Adaptive Interframe Spacing Throttle value based on the | 1366 | * Update the Adaptive Interframe Spacing Throttle value based on the |
@@ -1372,7 +1371,7 @@ void igb_update_adaptive(struct e1000_hw *hw) | |||
1372 | struct e1000_mac_info *mac = &hw->mac; | 1371 | struct e1000_mac_info *mac = &hw->mac; |
1373 | 1372 | ||
1374 | if (!mac->adaptive_ifs) { | 1373 | if (!mac->adaptive_ifs) { |
1375 | hw_dbg(hw, "Not in Adaptive IFS mode!\n"); | 1374 | hw_dbg("Not in Adaptive IFS mode!\n"); |
1376 | goto out; | 1375 | goto out; |
1377 | } | 1376 | } |
1378 | 1377 | ||
@@ -1402,7 +1401,7 @@ out: | |||
1402 | } | 1401 | } |
1403 | 1402 | ||
1404 | /** | 1403 | /** |
1405 | * e1000_validate_mdi_setting - Verify MDI/MDIx settings | 1404 | * igb_validate_mdi_setting - Verify MDI/MDIx settings |
1406 | * @hw: pointer to the HW structure | 1405 | * @hw: pointer to the HW structure |
1407 | * | 1406 | * |
1408 | * Verify that when not using auto-negotitation that MDI/MDIx is correctly | 1407 | * Verify that when not using auto-negotitation that MDI/MDIx is correctly |
@@ -1413,7 +1412,7 @@ s32 igb_validate_mdi_setting(struct e1000_hw *hw) | |||
1413 | s32 ret_val = 0; | 1412 | s32 ret_val = 0; |
1414 | 1413 | ||
1415 | if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { | 1414 | if (!hw->mac.autoneg && (hw->phy.mdix == 0 || hw->phy.mdix == 3)) { |
1416 | hw_dbg(hw, "Invalid MDI setting detected\n"); | 1415 | hw_dbg("Invalid MDI setting detected\n"); |
1417 | hw->phy.mdix = 1; | 1416 | hw->phy.mdix = 1; |
1418 | ret_val = -E1000_ERR_CONFIG; | 1417 | ret_val = -E1000_ERR_CONFIG; |
1419 | goto out; | 1418 | goto out; |
@@ -1424,7 +1423,7 @@ out: | |||
1424 | } | 1423 | } |
1425 | 1424 | ||
1426 | /** | 1425 | /** |
1427 | * e1000_write_8bit_ctrl_reg - Write a 8bit CTRL register | 1426 | * igb_write_8bit_ctrl_reg - Write a 8bit CTRL register |
1428 | * @hw: pointer to the HW structure | 1427 | * @hw: pointer to the HW structure |
1429 | * @reg: 32bit register offset such as E1000_SCTL | 1428 | * @reg: 32bit register offset such as E1000_SCTL |
1430 | * @offset: register offset to write to | 1429 | * @offset: register offset to write to |
@@ -1452,7 +1451,7 @@ s32 igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg, | |||
1452 | break; | 1451 | break; |
1453 | } | 1452 | } |
1454 | if (!(regvalue & E1000_GEN_CTL_READY)) { | 1453 | if (!(regvalue & E1000_GEN_CTL_READY)) { |
1455 | hw_dbg(hw, "Reg %08x did not indicate ready\n", reg); | 1454 | hw_dbg("Reg %08x did not indicate ready\n", reg); |
1456 | ret_val = -E1000_ERR_PHY; | 1455 | ret_val = -E1000_ERR_PHY; |
1457 | goto out; | 1456 | goto out; |
1458 | } | 1457 | } |
@@ -1462,7 +1461,7 @@ out: | |||
1462 | } | 1461 | } |
1463 | 1462 | ||
1464 | /** | 1463 | /** |
1465 | * e1000_enable_mng_pass_thru - Enable processing of ARP's | 1464 | * igb_enable_mng_pass_thru - Enable processing of ARP's |
1466 | * @hw: pointer to the HW structure | 1465 | * @hw: pointer to the HW structure |
1467 | * | 1466 | * |
1468 | * Verifies the hardware needs to allow ARPs to be processed by the host. | 1467 | * Verifies the hardware needs to allow ARPs to be processed by the host. |