Commit d7c8a29f authored by Emil Tantilov's avatar Emil Tantilov Committed by Jeff Kirsher

ixgbe: improve logic in ixgbe_init_mbx_params_pf

Use if/then instead of an all-inclusive case statement.
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 77ed18f3
...@@ -448,23 +448,20 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw) ...@@ -448,23 +448,20 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
{ {
struct ixgbe_mbx_info *mbx = &hw->mbx; struct ixgbe_mbx_info *mbx = &hw->mbx;
switch (hw->mac.type) { if (hw->mac.type != ixgbe_mac_82599EB &&
case ixgbe_mac_82599EB: hw->mac.type != ixgbe_mac_X540)
case ixgbe_mac_X540: return;
mbx->timeout = 0;
mbx->usec_delay = 0;
mbx->size = IXGBE_VFMAILBOX_SIZE; mbx->timeout = 0;
mbx->udelay = 0;
mbx->stats.msgs_tx = 0; mbx->stats.msgs_tx = 0;
mbx->stats.msgs_rx = 0; mbx->stats.msgs_rx = 0;
mbx->stats.reqs = 0; mbx->stats.reqs = 0;
mbx->stats.acks = 0; mbx->stats.acks = 0;
mbx->stats.rsts = 0; mbx->stats.rsts = 0;
break;
default: mbx->size = IXGBE_VFMAILBOX_SIZE;
break;
}
} }
#endif /* CONFIG_PCI_IOV */ #endif /* CONFIG_PCI_IOV */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment