mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-21 00:58:28 +08:00
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>
This commit is contained in:
parent
50d6c681d0
commit
673ac60461
@ -342,13 +342,6 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
|
||||
else
|
||||
pause->autoneg = 1;
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
if (hw->fc.current_mode == ixgbe_fc_pfc) {
|
||||
pause->rx_pause = 0;
|
||||
pause->tx_pause = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
if (hw->fc.current_mode == ixgbe_fc_rx_pause) {
|
||||
pause->rx_pause = 1;
|
||||
} else if (hw->fc.current_mode == ixgbe_fc_tx_pause) {
|
||||
@ -356,6 +349,11 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
|
||||
} else if (hw->fc.current_mode == ixgbe_fc_full) {
|
||||
pause->rx_pause = 1;
|
||||
pause->tx_pause = 1;
|
||||
#ifdef CONFIG_DCB
|
||||
} else if (hw->fc.current_mode == ixgbe_fc_pfc) {
|
||||
pause->rx_pause = 0;
|
||||
pause->tx_pause = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,7 +371,6 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
|
||||
return -EINVAL;
|
||||
|
||||
#endif
|
||||
|
||||
fc = hw->fc;
|
||||
|
||||
if (pause->autoneg != AUTONEG_ENABLE)
|
||||
@ -629,6 +626,7 @@ static void ixgbe_get_regs(struct net_device *netdev,
|
||||
regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM);
|
||||
regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0));
|
||||
|
||||
/* DCB */
|
||||
regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS);
|
||||
regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS);
|
||||
regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS);
|
||||
|
Loading…
Reference in New Issue
Block a user