summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4vf/t4vf_hw.c
diff options
context:
space:
mode:
authorCasey Leedom <leedom@chelsio.com>2010-11-11 09:06:53 +0000
committerDavid S. Miller <davem@davemloft.net>2010-11-12 12:31:01 -0800
commite68e6133e2daef6fc40e91621a1e26938e428e9e (patch)
tree21759991e47e782de8ebb4153396b651a0ef0095 /drivers/net/cxgb4vf/t4vf_hw.c
parente7a3795f56122cc92530c3f9412b8ff19b70184c (diff)
cxgb4vf: add call to Firmware to reset VF State.
Add call to Firmware to reset its VF State when we first attach to the VF. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4vf/t4vf_hw.c')
-rw-r--r--drivers/net/cxgb4vf/t4vf_hw.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/cxgb4vf/t4vf_hw.c b/drivers/net/cxgb4vf/t4vf_hw.c
index ea1c123f0cb..e306c20dfae 100644
--- a/drivers/net/cxgb4vf/t4vf_hw.c
+++ b/drivers/net/cxgb4vf/t4vf_hw.c
@@ -326,6 +326,25 @@ int __devinit t4vf_port_init(struct adapter *adapter, int pidx)
}
/**
+ * t4vf_fw_reset - issue a reset to FW
+ * @adapter: the adapter
+ *
+ * Issues a reset command to FW. For a Physical Function this would
+ * result in the Firmware reseting all of its state. For a Virtual
+ * Function this just resets the state associated with the VF.
+ */
+int t4vf_fw_reset(struct adapter *adapter)
+{
+ struct fw_reset_cmd cmd;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.op_to_write = cpu_to_be32(FW_CMD_OP(FW_RESET_CMD) |
+ FW_CMD_WRITE);
+ cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd));
+ return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL);
+}
+
+/**
* t4vf_query_params - query FW or device parameters
* @adapter: the adapter
* @nparams: the number of parameters