Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255536
b: refs/heads/master
c: 9ee3d37
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Jun 15, 2011
1 parent 6a35057 commit 394bb39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9fccec79e359b9162ab0cebe2c7ce30ee4172c3
refs/heads/master: 9ee3d37b05c2fc5c6c01e09dd3bcc4500babf76a
3 changes: 0 additions & 3 deletions trunk/drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,6 @@ struct bnx2x {
bnx2x_recovery_state_t recovery_state;
int is_leader;
struct msix_entry *msix_table;
#define INT_MODE_INTx 1
#define INT_MODE_MSI 2

int tx_ring_size;

Expand Down Expand Up @@ -1092,7 +1090,6 @@ struct bnx2x {
int multi_mode;
int num_queues;
int disable_tpa;
int int_mode;
u32 *rx_indir_table;

struct tstorm_eth_mac_filter_config mac_filters;
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ static int disable_tpa;
module_param(disable_tpa, int, 0);
MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature");

#define INT_MODE_INTx 1
#define INT_MODE_MSI 2
static int int_mode;
module_param(int_mode, int, 0);
MODULE_PARM_DESC(int_mode, " Force interrupt mode other then MSI-X "
Expand Down Expand Up @@ -6606,11 +6608,10 @@ static int bnx2x_setup_fw_client(struct bnx2x *bp,
*
* In case of MSI-X it will also try to enable MSI-X.
*/
static int __devinit bnx2x_set_int_mode(struct bnx2x *bp)
static void __devinit bnx2x_set_int_mode(struct bnx2x *bp)
{
int rc = 0;

switch (bp->int_mode) {
switch (int_mode) {
case INT_MODE_MSI:
bnx2x_enable_msi(bp);
/* falling through... */
Expand All @@ -6629,8 +6630,7 @@ static int __devinit bnx2x_set_int_mode(struct bnx2x *bp)
* so try to enable MSI-X with the requested number of fp's
* and fallback to MSI or legacy INTx with one fp
*/
rc = bnx2x_enable_msix(bp);
if (rc) {
if (bnx2x_enable_msix(bp)) {
/* failed to enable MSI-X */
if (bp->multi_mode)
DP(NETIF_MSG_IFUP,
Expand All @@ -6641,14 +6641,12 @@ static int __devinit bnx2x_set_int_mode(struct bnx2x *bp)
1 + NONE_ETH_CONTEXT_USE);
bp->num_queues = 1 + NONE_ETH_CONTEXT_USE;

/* Try to enable MSI */
if (!(bp->flags & DISABLE_MSI_FLAG))
bnx2x_enable_msi(bp);
}

break;
}

return rc;
}

/* must be called prioir to any HW initializations */
Expand Down Expand Up @@ -8673,7 +8671,6 @@ static int __devinit bnx2x_init_bp(struct bnx2x *bp)
"must load devices in order!\n");

bp->multi_mode = multi_mode;
bp->int_mode = int_mode;

/* Set TPA flags */
if (disable_tpa) {
Expand Down

0 comments on commit 394bb39

Please sign in to comment.