aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_main.c
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-06-13 21:33:34 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-15 10:56:14 -0400
commit9ee3d37b05c2fc5c6c01e09dd3bcc4500babf76a (patch)
tree1609c9336f8a915ca15b751c6c5bd566de69e9bf /drivers/net/bnx2x/bnx2x_main.c
parenta9fccec79e359b9162ab0cebe2c7ce30ee4172c3 (diff)
bnx2x: removed unused variables
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 3c06b140039..d7cab0dc57f 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -99,6 +99,8 @@ static int disable_tpa;
99module_param(disable_tpa, int, 0); 99module_param(disable_tpa, int, 0);
100MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature"); 100MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature");
101 101
102#define INT_MODE_INTx 1
103#define INT_MODE_MSI 2
102static int int_mode; 104static int int_mode;
103module_param(int_mode, int, 0); 105module_param(int_mode, int, 0);
104MODULE_PARM_DESC(int_mode, " Force interrupt mode other then MSI-X " 106MODULE_PARM_DESC(int_mode, " Force interrupt mode other then MSI-X "
@@ -6606,11 +6608,10 @@ static int bnx2x_setup_fw_client(struct bnx2x *bp,
6606 * 6608 *
6607 * In case of MSI-X it will also try to enable MSI-X. 6609 * In case of MSI-X it will also try to enable MSI-X.
6608 */ 6610 */
6609static int __devinit bnx2x_set_int_mode(struct bnx2x *bp) 6611static void __devinit bnx2x_set_int_mode(struct bnx2x *bp)
6610{ 6612{
6611 int rc = 0;
6612 6613
6613 switch (bp->int_mode) { 6614 switch (int_mode) {
6614 case INT_MODE_MSI: 6615 case INT_MODE_MSI:
6615 bnx2x_enable_msi(bp); 6616 bnx2x_enable_msi(bp);
6616 /* falling through... */ 6617 /* falling through... */
@@ -6629,8 +6630,7 @@ static int __devinit bnx2x_set_int_mode(struct bnx2x *bp)
6629 * so try to enable MSI-X with the requested number of fp's 6630 * so try to enable MSI-X with the requested number of fp's
6630 * and fallback to MSI or legacy INTx with one fp 6631 * and fallback to MSI or legacy INTx with one fp
6631 */ 6632 */
6632 rc = bnx2x_enable_msix(bp); 6633 if (bnx2x_enable_msix(bp)) {
6633 if (rc) {
6634 /* failed to enable MSI-X */ 6634 /* failed to enable MSI-X */
6635 if (bp->multi_mode) 6635 if (bp->multi_mode)
6636 DP(NETIF_MSG_IFUP, 6636 DP(NETIF_MSG_IFUP,
@@ -6641,14 +6641,12 @@ static int __devinit bnx2x_set_int_mode(struct bnx2x *bp)
6641 1 + NONE_ETH_CONTEXT_USE); 6641 1 + NONE_ETH_CONTEXT_USE);
6642 bp->num_queues = 1 + NONE_ETH_CONTEXT_USE; 6642 bp->num_queues = 1 + NONE_ETH_CONTEXT_USE;
6643 6643
6644 /* Try to enable MSI */
6644 if (!(bp->flags & DISABLE_MSI_FLAG)) 6645 if (!(bp->flags & DISABLE_MSI_FLAG))
6645 bnx2x_enable_msi(bp); 6646 bnx2x_enable_msi(bp);
6646 } 6647 }
6647
6648 break; 6648 break;
6649 } 6649 }
6650
6651 return rc;
6652} 6650}
6653 6651
6654/* must be called prioir to any HW initializations */ 6652/* must be called prioir to any HW initializations */
@@ -8673,7 +8671,6 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
8673 "must load devices in order!\n"); 8671 "must load devices in order!\n");
8674 8672
8675 bp->multi_mode = multi_mode; 8673 bp->multi_mode = multi_mode;
8676 bp->int_mode = int_mode;
8677 8674
8678 /* Set TPA flags */ 8675 /* Set TPA flags */
8679 if (disable_tpa) { 8676 if (disable_tpa) {