Merge branch 'ionic-support-for-firmware-upgrade'
authorDavid S. Miller <davem@davemloft.net>
Mon, 30 Mar 2020 18:40:50 +0000 (11:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Mar 2020 18:40:50 +0000 (11:40 -0700)
commit0d5d6045a7dd1b36867020e95577a6aa457fee53
tree8b626b624e8b9b9a11319490207d5415a5a0f627
parentea315c55074e1a50df391b9ddba92260216b0e98
parentc672412f6172d66e34f2c6583cd65d2383a75b4e
Merge branch 'ionic-support-for-firmware-upgrade'

Shannon Nelson says:

====================
ionic support for firmware upgrade

The Pensando Distributed Services Card can get firmware upgrades from
the off-host centralized management suite, and can be upgraded without a
host reboot or driver reload.  This patchset sets up the support for fw
upgrade in the Linux driver.

When the upgrade begins, the DSC first brings the link down, then stops
the firmware.  The driver will notice this and quiesce itself by stopping
the queues and releasing DMA resources, then monitoring for firmware to
start back up.  When the upgrade is finished the firmware is restarted
and link is brought up, and the driver rebuilds the queues and restarts
traffic flow.

First we separate the Link state from the netdev state, then reorganize a
few things to prepare for partial tear-down of the queues.  Next we fix
up the state machine so that we take the Tx and Rx queues down and back
up when we get LINK_DOWN and LINK_UP events.  Lastly, we add handling of
the FW reset itself by tearing down the lif internals and rebuilding them
with the new FW setup.

v2: This changes the design from (ab)using the full .ndo_stop and
    .ndo_open routines to getting a better separation between the
    alloc and the init functions so that we can keep our resource
    allocations as long as possible.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>