linux/drivers/net
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
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
caif
can
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
ethernet ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
fddi net: fddi: skfp: Remove addr_to_string(). 2020-07-13 11:49:51 -07:00
fjes
hamradio
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-14 14:11:49 -07:00
hyperv net: hyperv: dump TX indirection table to ethtool regs 2020-07-24 15:18:33 -07:00
ieee802154 net: ieee802154: adf7242: Replace HTTP links with HTTPS ones 2020-07-20 08:51:38 +02:00
ipa net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipvlan
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
plip
ppp net: make ->{get,set}sockopt in proto_ops optional 2020-07-19 18:16:41 -07:00
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
vmxnet3
wan farsync: use generic power management 2020-07-28 12:56:52 -07:00
wimax
wireguard wireguard: queueing: make use of ip_tunnel_parse_protocol 2020-06-30 12:29:39 -07:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
xen-netback xen networking: add XDP offset adjustment to xen-netback 2020-07-01 15:25:14 -07:00
bareudp.c bareudp: Reverted support to enable & disable rx metadata collection 2020-07-21 18:30:47 -07:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
gtp.c
ifb.c
Kconfig xen networking: add basic XDP support for xen-netfront 2020-07-01 15:25:14 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: implement header_ops->parse_protocol for AF_PACKET 2020-06-30 12:29:39 -07:00
veth.c
virtio_net.c
vrf.c vrf: Handle CONFIG_SYSCTL not set 2020-07-23 17:51:04 -07:00
vsockmon.c
vxlan.c udp_tunnel: add central NIC RX port offload infrastructure 2020-07-10 13:54:00 -07:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00