• Dirk van der Merwe's avatar
    nfp: honor FW reset and loading policies · f8921d73
    Dirk van der Merwe authored
    The firmware reset and loading policies can be controlled with the
    combination of three hwinfo keys, 'abi_drv_reset', 'abi_drv_load_ifc'
    and 'app_fw_from_flash'.
    
    'app_fw_from_flash' defines which firmware should take precedence,
    'Disk', 'Flash' or the 'Preferred' firmware. When 'Preferred'
    is selected, the management firmware makes the decision on which
    firmware will be loaded by comparing versions of the flash firmware
    and the host supplied firmware.
    
    'abi_drv_reset' defines when the driver should reset the firmware when
    the driver is probed, either 'Disk' if firmware was found on disk,
    'Always' reset or 'Never' reset. Note that the device is always reset
    on driver unload if firmware was loaded when the driver was probed.
    
    'abi_drv_load_ifc' defines a list of PF devices allowed to load FW on
    the device.
    
    Furthermore, we limit the cases to where the driver will unload firmware
    again when the driver is removed to only when firmware was loaded by the
    driver and only if this particular device was the only one that could
    have loaded firmware. This is needed to avoid firmware being removed
    while in use on multi-host platforms.
    Signed-off-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
    Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f8921d73
nfp_main.h 5.62 KB