aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_mbx.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-03-03 04:25:02 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-03-07 21:08:01 -0500
commitd7c8a29fc8bd20ba45ec2f52577ed04a988a9500 (patch)
tree976a5825650627ca0650789f9650072ad0c8f1c9 /drivers/net/ixgbe/ixgbe_mbx.c
parent77ed18f302a2ef8d7b00ef6e804d23239db12ee1 (diff)
ixgbe: improve logic in ixgbe_init_mbx_params_pf
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>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_mbx.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_mbx.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/net/ixgbe/ixgbe_mbx.c b/drivers/net/ixgbe/ixgbe_mbx.c
index 2acacfa5e375..3cf8aec50fcd 100644
--- a/drivers/net/ixgbe/ixgbe_mbx.c
+++ b/drivers/net/ixgbe/ixgbe_mbx.c
@@ -448,23 +448,20 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
448{ 448{
449 struct ixgbe_mbx_info *mbx = &hw->mbx; 449 struct ixgbe_mbx_info *mbx = &hw->mbx;
450 450
451 switch (hw->mac.type) { 451 if (hw->mac.type != ixgbe_mac_82599EB &&
452 case ixgbe_mac_82599EB: 452 hw->mac.type != ixgbe_mac_X540)
453 case ixgbe_mac_X540: 453 return;
454 mbx->timeout = 0;
455 mbx->usec_delay = 0;
456 454
457 mbx->size = IXGBE_VFMAILBOX_SIZE; 455 mbx->timeout = 0;
456 mbx->udelay = 0;
458 457
459 mbx->stats.msgs_tx = 0; 458 mbx->stats.msgs_tx = 0;
460 mbx->stats.msgs_rx = 0; 459 mbx->stats.msgs_rx = 0;
461 mbx->stats.reqs = 0; 460 mbx->stats.reqs = 0;
462 mbx->stats.acks = 0; 461 mbx->stats.acks = 0;
463 mbx->stats.rsts = 0; 462 mbx->stats.rsts = 0;
464 break; 463
465 default: 464 mbx->size = IXGBE_VFMAILBOX_SIZE;
466 break;
467 }
468} 465}
469#endif /* CONFIG_PCI_IOV */ 466#endif /* CONFIG_PCI_IOV */
470 467