diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-02-14 16:40:44 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-17 18:27:38 -0500 |
| commit | 76726ccb7f461c83040e7082cf95fe1dea2afd1f (patch) | |
| tree | b81d374cbf4754f6f448fe1c1b34ed15a472a711 /include/uapi/linux/devlink.h | |
| parent | 8e31c47424f7d03d0cc992fe6a9ebfdedf66a709 (diff) | |
devlink: add flash update command
Add devlink flash update command. Advanced NICs have firmware
stored in flash and often cryptographically secured. Updating
that flash is handled by management firmware. Ethtool has a
flash update command which served us well, however, it has two
shortcomings:
- it takes rtnl_lock unnecessarily - really flash update has
nothing to do with networking, so using a networking device
as a handle is suboptimal, which leads us to the second one:
- it requires a functioning netdev - in case device enters an
error state and can't spawn a netdev (e.g. communication
with the device fails) there is no netdev to use as a handle
for flashing.
Devlink already has the ability to report the firmware versions,
now with the ability to update the firmware/flash we will be
able to recover devices in bad state.
To enable updates of sub-components of the FW allow passing
component name. This name should correspond to one of the
versions reported in devlink info.
v1: - replace target id with component name (Jiri).
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/devlink.h')
| -rw-r--r-- | include/uapi/linux/devlink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 72d9f7c89190..53de8802a000 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/devlink.h | |||
| @@ -103,6 +103,8 @@ enum devlink_command { | |||
| 103 | DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, | 103 | DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET, |
| 104 | DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR, | 104 | DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR, |
| 105 | 105 | ||
| 106 | DEVLINK_CMD_FLASH_UPDATE, | ||
| 107 | |||
| 106 | /* add new commands above here */ | 108 | /* add new commands above here */ |
| 107 | __DEVLINK_CMD_MAX, | 109 | __DEVLINK_CMD_MAX, |
| 108 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | 110 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| @@ -326,6 +328,10 @@ enum devlink_attr { | |||
| 326 | DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS, /* u64 */ | 328 | DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS, /* u64 */ |
| 327 | DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD, /* u64 */ | 329 | DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD, /* u64 */ |
| 328 | DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER, /* u8 */ | 330 | DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER, /* u8 */ |
| 331 | |||
| 332 | DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME, /* string */ | ||
| 333 | DEVLINK_ATTR_FLASH_UPDATE_COMPONENT, /* string */ | ||
| 334 | |||
| 329 | /* add new attributes above here, update the policy in devlink.c */ | 335 | /* add new attributes above here, update the policy in devlink.c */ |
| 330 | 336 | ||
| 331 | __DEVLINK_ATTR_MAX, | 337 | __DEVLINK_ATTR_MAX, |
