Skip to content

Commit

Permalink
cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
Browse files Browse the repository at this point in the history
Remove use of calls into t4_fw_hello() with MASTER_MUST, which results in
FW_HELLO_CMD_MASTERFORCE being set. The firmware doesn't support this and of
course any existing PF Drivers will totally go for a toss.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hariprasad Shenai authored and David S. Miller committed Dec 11, 2014
1 parent 52c9b12 commit 666224d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
12 changes: 2 additions & 10 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5524,23 +5524,15 @@ static int adap_init0(struct adapter *adap)
struct fw_caps_config_cmd caps_cmd;
int reset = 1;

/*
* Contact FW, advertising Master capability (and potentially forcing
* ourselves as the Master PF if our module parameter force_init is
* set).
*/
ret = t4_fw_hello(adap, adap->mbox, adap->fn,
force_init ? MASTER_MUST : MASTER_MAY,
&state);
/* Contact FW, advertising Master capability */
ret = t4_fw_hello(adap, adap->mbox, adap->mbox, MASTER_MAY, &state);
if (ret < 0) {
dev_err(adap->pdev_dev, "could not connect to FW, error %d\n",
ret);
return ret;
}
if (ret == adap->mbox)
adap->flags |= MASTER_PF;
if (force_init && state == DEV_STATE_INIT)
state = DEV_STATE_UNINIT;

/*
* If we're the Master PF Driver and the device is uninitialized,
Expand Down
6 changes: 1 addition & 5 deletions drivers/scsi/csiostor/csio_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include "csio_lnode.h"
#include "csio_rnode.h"

int csio_force_master;
int csio_dbg_level = 0xFEFF;
unsigned int csio_port_mask = 0xf;

Expand Down Expand Up @@ -889,7 +888,6 @@ csio_do_hello(struct csio_hw *hw, enum csio_dev_state *state)
{
struct csio_mb *mbp;
int rv = 0;
enum csio_dev_master master;
enum fw_retval retval;
uint8_t mpfn;
char state_str[16];
Expand All @@ -904,11 +902,9 @@ csio_do_hello(struct csio_hw *hw, enum csio_dev_state *state)
goto out;
}

master = csio_force_master ? CSIO_MASTER_MUST : CSIO_MASTER_MAY;

retry:
csio_mb_hello(hw, mbp, CSIO_MB_DEFAULT_TMO, hw->pfn,
hw->pfn, master, NULL);
hw->pfn, CSIO_MASTER_MAY, NULL);

rv = csio_mb_issue(hw, mbp);
if (rv) {
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/csiostor/csio_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ struct csio_scsi_cpu_info {
};

extern int csio_dbg_level;
extern int csio_force_master;
extern unsigned int csio_port_mask;
extern int csio_msi;

Expand Down

0 comments on commit 666224d

Please sign in to comment.