diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_mbx.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_mbx.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/drivers/net/ixgbe/ixgbe_mbx.c b/drivers/net/ixgbe/ixgbe_mbx.c index ea82c5a1cd3e..1ff0eefcfd0a 100644 --- a/drivers/net/ixgbe/ixgbe_mbx.c +++ b/drivers/net/ixgbe/ixgbe_mbx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2010 Intel Corporation. | 4 | Copyright(c) 1999 - 2011 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -154,9 +154,6 @@ static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) | |||
154 | udelay(mbx->usec_delay); | 154 | udelay(mbx->usec_delay); |
155 | } | 155 | } |
156 | 156 | ||
157 | /* if we failed, all future posted messages fail until reset */ | ||
158 | if (!countdown) | ||
159 | mbx->timeout = 0; | ||
160 | out: | 157 | out: |
161 | return countdown ? 0 : IXGBE_ERR_MBX; | 158 | return countdown ? 0 : IXGBE_ERR_MBX; |
162 | } | 159 | } |
@@ -183,9 +180,6 @@ static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) | |||
183 | udelay(mbx->usec_delay); | 180 | udelay(mbx->usec_delay); |
184 | } | 181 | } |
185 | 182 | ||
186 | /* if we failed, all future posted messages fail until reset */ | ||
187 | if (!countdown) | ||
188 | mbx->timeout = 0; | ||
189 | out: | 183 | out: |
190 | return countdown ? 0 : IXGBE_ERR_MBX; | 184 | return countdown ? 0 : IXGBE_ERR_MBX; |
191 | } | 185 | } |
@@ -437,6 +431,7 @@ out_no_read: | |||
437 | return ret_val; | 431 | return ret_val; |
438 | } | 432 | } |
439 | 433 | ||
434 | #ifdef CONFIG_PCI_IOV | ||
440 | /** | 435 | /** |
441 | * ixgbe_init_mbx_params_pf - set initial values for pf mailbox | 436 | * ixgbe_init_mbx_params_pf - set initial values for pf mailbox |
442 | * @hw: pointer to the HW structure | 437 | * @hw: pointer to the HW structure |
@@ -447,24 +442,22 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw) | |||
447 | { | 442 | { |
448 | struct ixgbe_mbx_info *mbx = &hw->mbx; | 443 | struct ixgbe_mbx_info *mbx = &hw->mbx; |
449 | 444 | ||
450 | switch (hw->mac.type) { | 445 | if (hw->mac.type != ixgbe_mac_82599EB && |
451 | case ixgbe_mac_82599EB: | 446 | hw->mac.type != ixgbe_mac_X540) |
452 | case ixgbe_mac_X540: | 447 | return; |
453 | mbx->timeout = 0; | ||
454 | mbx->usec_delay = 0; | ||
455 | 448 | ||
456 | mbx->size = IXGBE_VFMAILBOX_SIZE; | 449 | mbx->timeout = 0; |
450 | mbx->usec_delay = 0; | ||
457 | 451 | ||
458 | mbx->stats.msgs_tx = 0; | 452 | mbx->stats.msgs_tx = 0; |
459 | mbx->stats.msgs_rx = 0; | 453 | mbx->stats.msgs_rx = 0; |
460 | mbx->stats.reqs = 0; | 454 | mbx->stats.reqs = 0; |
461 | mbx->stats.acks = 0; | 455 | mbx->stats.acks = 0; |
462 | mbx->stats.rsts = 0; | 456 | mbx->stats.rsts = 0; |
463 | break; | 457 | |
464 | default: | 458 | mbx->size = IXGBE_VFMAILBOX_SIZE; |
465 | break; | ||
466 | } | ||
467 | } | 459 | } |
460 | #endif /* CONFIG_PCI_IOV */ | ||
468 | 461 | ||
469 | struct ixgbe_mbx_operations mbx_ops_generic = { | 462 | struct ixgbe_mbx_operations mbx_ops_generic = { |
470 | .read = ixgbe_read_mbx_pf, | 463 | .read = ixgbe_read_mbx_pf, |