diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-11-16 22:27:05 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-11-16 22:27:05 -0500 |
commit | 673ac60461082e07be58b23f237d651c2605ce60 (patch) | |
tree | 4d50ee7a5229e5f3ee118e1a857a4eb0f0b81fa0 /drivers | |
parent | 50d6c681d0c38208e494f0c6302ef13d21dababa (diff) |
ixgbe: Cleanup DCB logic, whitespace, and comments in ixgbe_ethtool.c
This change address a few whitespace issues in DCB #ifdefs, adds a comment
calling out the DCB specific registers, and nests an if statement inline
with a number of if statements related to flow control.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 0a4b322fab6..6871b2be64f 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -342,13 +342,6 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, | |||
342 | else | 342 | else |
343 | pause->autoneg = 1; | 343 | pause->autoneg = 1; |
344 | 344 | ||
345 | #ifdef CONFIG_DCB | ||
346 | if (hw->fc.current_mode == ixgbe_fc_pfc) { | ||
347 | pause->rx_pause = 0; | ||
348 | pause->tx_pause = 0; | ||
349 | } | ||
350 | |||
351 | #endif | ||
352 | if (hw->fc.current_mode == ixgbe_fc_rx_pause) { | 345 | if (hw->fc.current_mode == ixgbe_fc_rx_pause) { |
353 | pause->rx_pause = 1; | 346 | pause->rx_pause = 1; |
354 | } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) { | 347 | } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) { |
@@ -356,6 +349,11 @@ static void ixgbe_get_pauseparam(struct net_device *netdev, | |||
356 | } else if (hw->fc.current_mode == ixgbe_fc_full) { | 349 | } else if (hw->fc.current_mode == ixgbe_fc_full) { |
357 | pause->rx_pause = 1; | 350 | pause->rx_pause = 1; |
358 | pause->tx_pause = 1; | 351 | pause->tx_pause = 1; |
352 | #ifdef CONFIG_DCB | ||
353 | } else if (hw->fc.current_mode == ixgbe_fc_pfc) { | ||
354 | pause->rx_pause = 0; | ||
355 | pause->tx_pause = 0; | ||
356 | #endif | ||
359 | } | 357 | } |
360 | } | 358 | } |
361 | 359 | ||
@@ -373,7 +371,6 @@ static int ixgbe_set_pauseparam(struct net_device *netdev, | |||
373 | return -EINVAL; | 371 | return -EINVAL; |
374 | 372 | ||
375 | #endif | 373 | #endif |
376 | |||
377 | fc = hw->fc; | 374 | fc = hw->fc; |
378 | 375 | ||
379 | if (pause->autoneg != AUTONEG_ENABLE) | 376 | if (pause->autoneg != AUTONEG_ENABLE) |
@@ -629,6 +626,7 @@ static void ixgbe_get_regs(struct net_device *netdev, | |||
629 | regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM); | 626 | regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM); |
630 | regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0)); | 627 | regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0)); |
631 | 628 | ||
629 | /* DCB */ | ||
632 | regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS); | 630 | regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS); |
633 | regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS); | 631 | regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS); |
634 | regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS); | 632 | regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS); |