linux/drivers/net/ethernet
Jacob Keller d69ea414c9 ice: implement device flash update via devlink
Use the newly added pldmfw library to implement device flash update for
the Intel ice networking device driver. This support uses the devlink
flash update interface.

The main parts of the flash include the Option ROM, the netlist module,
and the main NVM data. The PLDM firmware file contains modules for each
of these components.

Using the pldmfw library, the provided firmware file will be scanned for
the three major components, "fw.undi" for the Option ROM, "fw.mgmt" for
the main NVM module containing the primary device firmware, and
"fw.netlist" containing the netlist module.

The flash is separated into two banks, the active bank containing the
running firmware, and the inactive bank which we use for update. Each
module is updated in a staged process. First, the inactive bank is
erased, preparing the device for update. Second, the contents of the
component are copied to the inactive portion of the flash. After all
components are updated, the driver signals the device to switch the
active bank during the next EMP reset (which would usually occur during
the next reboot).

Although the firmware AdminQ interface does report an immediate status
for each command, the NVM erase and NVM write commands receive status
asynchronously. The driver must not continue writing until previous
erase and write commands have finished. The real status of the NVM
commands is returned over the receive AdminQ. Implement a simple
interface that uses a wait queue so that the main update thread can
sleep until the completion status is reported by firmware. For erasing
the inactive banks, this can take quite a while in practice.

To help visualize the process to the devlink application and other
applications based on the devlink netlink interface, status is reported
via the devlink_flash_update_status_notify. While we do report status
after each 4k block when writing, there is no real status we can report
during erasing. We simply must wait for the complete module erasure to
finish.

With this implementation, basic flash update for the ice hardware is
supported.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-28 17:07:06 -07:00
..
3com typhoon: use generic power management 2020-07-01 12:58:33 -07:00
8390 ne2k-pci: Use netif_msg_init to initialize msg_enable bits 2020-07-17 19:04:06 -07:00
adaptec starfire: use generic power management 2020-07-01 12:58:33 -07:00
aeroflex Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver 2020-07-07 15:44:27 -07:00
agere net: ethernet: et131x: Remove redundant register read 2020-07-17 18:48:15 -07:00
alacritech treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
allwinner treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
alteon net: alteon: Avoid some useless memset 2020-07-17 12:57:59 -07:00
altera treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
amazon net: ena: support new LLQ acceleration mode 2020-07-21 15:59:04 -07:00
amd xgbe: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
apm
apple treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
arc net: arc_emac: fix arc_emac_tx()'s return type 2020-06-28 20:52:53 -07:00
atheros net: ag71xx: add missed clk_disable_unprepare in error path of probe 2020-07-20 18:37:38 -07:00
aurora net: nb8800: fix nb8800_xmit()'s return type 2020-06-28 20:52:53 -07:00
broadcom bnxt_en: Add support for 'ethtool -d' 2020-07-27 11:47:33 -07:00
brocade bna: bfi.h: Avoid the use of one-element array 2020-07-22 18:12:11 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
calxeda
cavium liquidio_vf: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
cirrus docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
cisco enic: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
cortina net: ethernet: Replace HTTP links with HTTPS ones 2020-07-13 17:42:45 -07:00
davicom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dec docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
dlink net: sundance: Replace HTTP links with HTTPS ones 2020-07-15 17:41:34 -07:00
emulex be2net: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ezchip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
faraday treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
fujitsu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
google
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
huawei hinic: add firmware update support 2020-07-15 18:06:44 -07:00
i825xx treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ibm ibmvnic: continue to init in CRQ reset returns H_CLOSED 2020-06-20 17:28:41 -07:00
intel ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
marvell net: mvneta: move rxq->left_size on the stack 2020-07-19 18:28:34 -07:00
mediatek net: ethernet: mtk-star-emac: use devm_of_mdiobus_register() 2020-06-30 15:57:34 -07:00
mellanox mlxsw: core: Add support for temperature thresholds reading for QSFP-DD transceivers 2020-07-28 13:28:02 -07:00
micrel ksz884x: switch from 'pci_' to 'dma_' API 2020-07-14 15:10:29 -07:00
microchip lan743x: remove redundant initialization of variable current_head_index 2020-07-22 17:55:35 -07:00
moxa treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mscc net: mscc: ocelot: fix non-initialized CPU port on VSC7514 2020-07-22 13:02:09 -07:00
myricom ethernet: myri10ge: use generic power management 2020-07-20 18:01:07 -07:00
natsemi natsemi: use generic power management 2020-07-01 12:58:33 -07:00
neterion Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
netronome nfp: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ni
nvidia treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
nxp
oki-semi net: pch_gbe: fix pch_gbe_xmit_frame()'s return type 2020-06-28 20:52:53 -07:00
packetengines net: packetengines: switch from 'pci_' to 'dma_' API 2020-07-20 17:48:23 -07:00
pasemi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
qlogic qed: fix the allocation of the chains with an external PBL 2020-07-27 12:17:14 -07:00
qualcomm net: rmnet: do not allow to add multiple bridge interfaces 2020-07-04 18:04:55 -07:00
rdc r6040: switch from 'pci_' to 'dma_' API 2020-07-20 17:49:50 -07:00
realtek r8169: allow to enable ASPM on RTL8125A 2020-07-21 16:12:19 -07:00
renesas net: ethernet: ravb: exit if re-initialization fails in tx timeout 2020-07-21 15:34:07 -07:00
rocker rocker: fix incorrect error handling in dma_rings_init 2020-06-15 13:37:36 -07:00
samsung treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
seeq treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sfc sfc_ef100: implement ndo_get_phys_port_{id,name} 2020-07-27 12:26:56 -07:00
sgi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
silan treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sis sis: switch from 'pci_' to 'dma_' API 2020-07-20 17:50:07 -07:00
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
socionext net: ethernet: ave: Fix error returns in ave_init 2020-07-21 18:31:46 -07:00
stmicro net: stmmac: dwmac-meson8b: use clk_parent_data for clock registration 2020-06-26 12:17:29 -07:00
sun net: sungem: switch from 'pci_' to 'dma_' API 2020-07-17 12:56:40 -07:00
synopsys net: dwc-xlgmac: fix xlgmac_xmit()'s return type 2020-06-28 20:52:53 -07:00
tehuti treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
toshiba treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
tundra treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
via treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
wiznet treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
xilinx net: axienet: fix spelling mistake in comment "Exteneded" -> "extended" 2020-06-15 13:02:03 -07:00
xircom xirc2ps_cs: remove dev null check from do_reset(). 2020-06-23 20:18:16 -07:00
xscale treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: switch from 'pci_' to 'dma_' API 2020-07-20 18:32:49 -07:00
jme.c net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
jme.h net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
korina.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
lantiq_etop.c
lantiq_xrx200.c
Makefile