Re: [RFC PATCH net-next 06/19] pds_core: add FW update feature to devlink
From: Shannon Nelson <hidden>
Date: 2022-11-28 22:25:57
On 11/28/22 10:27 AM, Jakub Kicinski wrote:
On Fri, 18 Nov 2022 14:56:43 -0800 Shannon Nelson wrote:quoted
Add in the support for doing firmware updates, and for selecting the next firmware image to boot on, and tie them into the devlink flash and parameter handling. The FW flash is the same as in the ionic driver. However, this device has the ability to report what is in the firmware slots on the device and allows you to select the slot to use on the next device boot.This is hardly vendor specific. Intel does a similar thing, IIUC. Please work on a common interface.
I don't think Intel selects which FW image to boot, but it looks like mlxsw and nfp use the PARAM_GENERIC_FW_LOAD_POLICY to select between DRIVER, FLASH, or DISK. Shall I add a couple of generic SLOT_x items to the enum devlink_param_fw_load_policy_value and use this API? For example: DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_SLOT_0, DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_SLOT_1, DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_SLOT_2, DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_SLOT_3, I could then modify the devlink dev info printed to refer to fw_slot_0, fw.slot_1, and fw.slot_2 instead of our vendor specific names. Cheers, sln