summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
diff options
context:
space:
mode:
authorFelix Manlunas <felix.manlunas@cavium.com>2017-03-23 13:26:28 -0700
committerDavid S. Miller <davem@davemloft.net>2017-03-24 13:20:43 -0700
commit7cc61db9c7e6c985798d5419207fbd8cdb505c7b (patch)
tree1ddb3005108d7bc900e03504af3ea2d893121bb6 /drivers/net/ethernet/cavium/liquidio/liquidio_common.h
parentdddb64bcb34615bf48a2c9cb9881eb76795cc5c5 (diff)
liquidio: do not reset Octeon if NIC firmware was preloaded
The PF driver is incorrectly resetting Octeon when the module parameter "fw_type=none" is there. "fw_type=none" means the PF should not load any firmware to the NIC because Octeon is already running preloaded firmware. Fix it by putting an if (fw_type != none) around the reset code. Because the Octeon reset is now conditionally gone, when unloading the driver, conditionally send the RESET_PF command to the firmware who will then free up PF-related data structures. Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/liquidio_common.h')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/liquidio_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
index 4a07c0ac9fab..17c9aff753d1 100644
--- a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
+++ b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
@@ -186,6 +186,7 @@ static inline void add_sg_size(struct octeon_sg_entry *sg_entry,
#define OCTNET_CMD_Q 0
/* NIC Command types */
+#define OCTNET_CMD_RESET_PF 0x0
#define OCTNET_CMD_CHANGE_MTU 0x1
#define OCTNET_CMD_CHANGE_MACADDR 0x2
#define OCTNET_CMD_CHANGE_DEVFLAGS 0x3