diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2011-03-03 09:25:02 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-07 18:08:01 -0800 |
commit | d7c8a29fc8bd20ba45ec2f52577ed04a988a9500 (patch) | |
tree | 976a5825650627ca0650789f9650072ad0c8f1c9 /drivers | |
parent | 77ed18f302a2ef8d7b00ef6e804d23239db12ee1 (diff) | |
download | op-kernel-dev-d7c8a29fc8bd20ba45ec2f52577ed04a988a9500.zip op-kernel-dev-d7c8a29fc8bd20ba45ec2f52577ed04a988a9500.tar.gz |
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')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_mbx.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/net/ixgbe/ixgbe_mbx.c b/drivers/net/ixgbe/ixgbe_mbx.c index 2acacfa..3cf8aec 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) { 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 */ |