Skip to content

Commit 34b4157

Browse files
pkwapulianguy11
authored andcommitted
ixgbe: Clean up the E610 link management related code
Required for enabling the link management in E610 device. Reviewed-by: Simon Horman <[email protected]> Tested-by: Bharath R <[email protected]> Signed-off-by: Piotr Kwapulinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent a0834bd commit 34b4157

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ static int ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter)
237237
* bandwidth details should be gathered from the parent bus instead of from the
238238
* device. Used to ensure that various locations all have the correct device ID
239239
* checks.
240+
*
241+
* Return: true if information should be collected from the parent bus, false
242+
* otherwise
240243
*/
241244
static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
242245
{
@@ -5533,7 +5536,9 @@ static void ixgbe_sfp_link_config(struct ixgbe_adapter *adapter)
55335536
* ixgbe_non_sfp_link_config - set up non-SFP+ link
55345537
* @hw: pointer to private hardware struct
55355538
*
5536-
* Returns 0 on success, negative on failure
5539+
* Configure non-SFP link.
5540+
*
5541+
* Return: 0 on success, negative on failure
55375542
**/
55385543
static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw)
55395544
{
@@ -7222,11 +7227,11 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
72227227
for (i = 0; i < 16; i++) {
72237228
hwstats->qptc[i] += IXGBE_READ_REG(hw, IXGBE_QPTC(i));
72247229
hwstats->qprc[i] += IXGBE_READ_REG(hw, IXGBE_QPRC(i));
7225-
if ((hw->mac.type == ixgbe_mac_82599EB) ||
7226-
(hw->mac.type == ixgbe_mac_X540) ||
7227-
(hw->mac.type == ixgbe_mac_X550) ||
7228-
(hw->mac.type == ixgbe_mac_X550EM_x) ||
7229-
(hw->mac.type == ixgbe_mac_x550em_a)) {
7230+
if (hw->mac.type == ixgbe_mac_82599EB ||
7231+
hw->mac.type == ixgbe_mac_X540 ||
7232+
hw->mac.type == ixgbe_mac_X550 ||
7233+
hw->mac.type == ixgbe_mac_X550EM_x ||
7234+
hw->mac.type == ixgbe_mac_x550em_a) {
72307235
hwstats->qbtc[i] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(i));
72317236
IXGBE_READ_REG(hw, IXGBE_QBTC_H(i)); /* to clear */
72327237
hwstats->qbrc[i] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(i));

drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3505,13 +3505,13 @@ static int ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
35053505
return status;
35063506
}
35073507

3508-
/** ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype
3508+
/** ixgbe_set_ethertype_anti_spoofing_x550 - Enable/Disable Ethertype
35093509
* anti-spoofing
35103510
* @hw: pointer to hardware structure
35113511
* @enable: enable or disable switch for Ethertype anti-spoofing
35123512
* @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
35133513
**/
3514-
static void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw,
3514+
static void ixgbe_set_ethertype_anti_spoofing_x550(struct ixgbe_hw *hw,
35153515
bool enable, int vf)
35163516
{
35173517
int vf_target_reg = vf >> 3;
@@ -3527,12 +3527,12 @@ static void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw,
35273527
IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), pfvfspoof);
35283528
}
35293529

3530-
/** ixgbe_set_source_address_pruning_X550 - Enable/Disbale src address pruning
3530+
/** ixgbe_set_source_address_pruning_x550 - Enable/Disable src address pruning
35313531
* @hw: pointer to hardware structure
35323532
* @enable: enable or disable source address pruning
35333533
* @pool: Rx pool to set source address pruning for
35343534
**/
3535-
static void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw,
3535+
static void ixgbe_set_source_address_pruning_x550(struct ixgbe_hw *hw,
35363536
bool enable,
35373537
unsigned int pool)
35383538
{
@@ -3831,9 +3831,9 @@ static int ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,
38313831
.set_mac_anti_spoofing = &ixgbe_set_mac_anti_spoofing, \
38323832
.set_vlan_anti_spoofing = &ixgbe_set_vlan_anti_spoofing, \
38333833
.set_source_address_pruning = \
3834-
&ixgbe_set_source_address_pruning_X550, \
3834+
&ixgbe_set_source_address_pruning_x550, \
38353835
.set_ethertype_anti_spoofing = \
3836-
&ixgbe_set_ethertype_anti_spoofing_X550, \
3836+
&ixgbe_set_ethertype_anti_spoofing_x550, \
38373837
.disable_rx_buff = &ixgbe_disable_rx_buff_generic, \
38383838
.enable_rx_buff = &ixgbe_enable_rx_buff_generic, \
38393839
.get_thermal_sensor_data = NULL, \

0 commit comments

Comments
 (0)