OSDN Git Service

liquidio: do not reset Octeon if NIC firmware was preloaded
authorFelix Manlunas <felix.manlunas@cavium.com>
Thu, 23 Mar 2017 20:26:28 +0000 (13:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Mar 2017 20:20:43 +0000 (13:20 -0700)
commit7cc61db9c7e6c985798d5419207fbd8cdb505c7b
tree1ddb3005108d7bc900e03504af3ea2d893121bb6
parentdddb64bcb34615bf48a2c9cb9881eb76795cc5c5
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>
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/liquidio/liquidio_common.h