mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08:00
d69ea414c9
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>
32 lines
683 B
Makefile
32 lines
683 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2018, Intel Corporation.
|
|
|
|
#
|
|
# Makefile for the Intel(R) Ethernet Connection E800 Series Linux Driver
|
|
#
|
|
|
|
obj-$(CONFIG_ICE) += ice.o
|
|
|
|
ice-y := ice_main.o \
|
|
ice_controlq.o \
|
|
ice_common.o \
|
|
ice_nvm.o \
|
|
ice_switch.o \
|
|
ice_sched.o \
|
|
ice_base.o \
|
|
ice_lib.o \
|
|
ice_txrx_lib.o \
|
|
ice_txrx.o \
|
|
ice_fltr.o \
|
|
ice_fdir.o \
|
|
ice_ethtool_fdir.o \
|
|
ice_flex_pipe.o \
|
|
ice_flow.o \
|
|
ice_devlink.o \
|
|
ice_fw_update.o \
|
|
ice_ethtool.o
|
|
ice-$(CONFIG_PCI_IOV) += ice_virtchnl_pf.o ice_sriov.o
|
|
ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_nl.o ice_dcb_lib.o
|
|
ice-$(CONFIG_RFS_ACCEL) += ice_arfs.o
|
|
ice-$(CONFIG_XDP_SOCKETS) += ice_xsk.o
|