Skip to content

Commit

Permalink
ixgbe: improve logic in ixgbe_init_mbx_params_pf
Browse files Browse the repository at this point in the history
Use if/then instead of an all-inclusive case statement.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Emil Tantilov authored and Jeff Kirsher committed Mar 8, 2011
1 parent 77ed18f commit d7c8a29
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions drivers/net/ixgbe/ixgbe_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,23 +448,20 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
{
struct ixgbe_mbx_info *mbx = &hw->mbx;

switch (hw->mac.type) {
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
mbx->timeout = 0;
mbx->usec_delay = 0;
if (hw->mac.type != ixgbe_mac_82599EB &&
hw->mac.type != ixgbe_mac_X540)
return;

mbx->size = IXGBE_VFMAILBOX_SIZE;
mbx->timeout = 0;
mbx->udelay = 0;

mbx->stats.msgs_tx = 0;
mbx->stats.msgs_rx = 0;
mbx->stats.reqs = 0;
mbx->stats.acks = 0;
mbx->stats.rsts = 0;
break;
default:
break;
}
mbx->stats.msgs_tx = 0;
mbx->stats.msgs_rx = 0;
mbx->stats.reqs = 0;
mbx->stats.acks = 0;
mbx->stats.rsts = 0;

mbx->size = IXGBE_VFMAILBOX_SIZE;
}
#endif /* CONFIG_PCI_IOV */

Expand Down

0 comments on commit d7c8a29

Please sign in to comment.