Commit 87c905d8 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: update the fw update api

Add the rest of the firmware api bits needed to support the
driver running a firmware update.
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b311b001
...@@ -63,8 +63,10 @@ enum ionic_cmd_opcode { ...@@ -63,8 +63,10 @@ enum ionic_cmd_opcode {
IONIC_CMD_QOS_RESET = 245, IONIC_CMD_QOS_RESET = 245,
/* Firmware commands */ /* Firmware commands */
IONIC_CMD_FW_DOWNLOAD = 254, IONIC_CMD_FW_DOWNLOAD = 252,
IONIC_CMD_FW_CONTROL = 255, IONIC_CMD_FW_CONTROL = 253,
IONIC_CMD_FW_DOWNLOAD_V1 = 254,
IONIC_CMD_FW_CONTROL_V1 = 255,
}; };
/** /**
...@@ -2069,14 +2071,23 @@ typedef struct ionic_admin_comp ionic_fw_download_comp; ...@@ -2069,14 +2071,23 @@ typedef struct ionic_admin_comp ionic_fw_download_comp;
/** /**
* enum ionic_fw_control_oper - FW control operations * enum ionic_fw_control_oper - FW control operations
* @IONIC_FW_RESET: Reset firmware * @IONIC_FW_RESET: Reset firmware
* @IONIC_FW_INSTALL: Install firmware * @IONIC_FW_INSTALL: Install firmware
* @IONIC_FW_ACTIVATE: Activate firmware * @IONIC_FW_ACTIVATE: Activate firmware
* @IONIC_FW_INSTALL_ASYNC: Install firmware asynchronously
* @IONIC_FW_INSTALL_STATUS: Firmware installation status
* @IONIC_FW_ACTIVATE_ASYNC: Activate firmware asynchronously
* @IONIC_FW_ACTIVATE_STATUS: Firmware activate status
*/ */
enum ionic_fw_control_oper { enum ionic_fw_control_oper {
IONIC_FW_RESET = 0, IONIC_FW_RESET = 0,
IONIC_FW_INSTALL = 1, IONIC_FW_INSTALL = 1,
IONIC_FW_ACTIVATE = 2, IONIC_FW_ACTIVATE = 2,
IONIC_FW_INSTALL_ASYNC = 3,
IONIC_FW_INSTALL_STATUS = 4,
IONIC_FW_ACTIVATE_ASYNC = 5,
IONIC_FW_ACTIVATE_STATUS = 6,
IONIC_FW_UPDATE_CLEANUP = 7,
}; };
/** /**
...@@ -2689,6 +2700,9 @@ union ionic_dev_cmd { ...@@ -2689,6 +2700,9 @@ union ionic_dev_cmd {
struct ionic_q_identify_cmd q_identify; struct ionic_q_identify_cmd q_identify;
struct ionic_q_init_cmd q_init; struct ionic_q_init_cmd q_init;
struct ionic_q_control_cmd q_control; struct ionic_q_control_cmd q_control;
struct ionic_fw_download_cmd fw_download;
struct ionic_fw_control_cmd fw_control;
}; };
union ionic_dev_cmd_comp { union ionic_dev_cmd_comp {
...@@ -2722,6 +2736,9 @@ union ionic_dev_cmd_comp { ...@@ -2722,6 +2736,9 @@ union ionic_dev_cmd_comp {
struct ionic_q_identify_comp q_identify; struct ionic_q_identify_comp q_identify;
struct ionic_q_init_comp q_init; struct ionic_q_init_comp q_init;
ionic_fw_download_comp fw_download;
struct ionic_fw_control_comp fw_control;
}; };
/** /**
......
...@@ -170,6 +170,10 @@ static const char *ionic_opcode_to_str(enum ionic_cmd_opcode opcode) ...@@ -170,6 +170,10 @@ static const char *ionic_opcode_to_str(enum ionic_cmd_opcode opcode)
return "IONIC_CMD_FW_DOWNLOAD"; return "IONIC_CMD_FW_DOWNLOAD";
case IONIC_CMD_FW_CONTROL: case IONIC_CMD_FW_CONTROL:
return "IONIC_CMD_FW_CONTROL"; return "IONIC_CMD_FW_CONTROL";
case IONIC_CMD_FW_DOWNLOAD_V1:
return "IONIC_CMD_FW_DOWNLOAD_V1";
case IONIC_CMD_FW_CONTROL_V1:
return "IONIC_CMD_FW_CONTROL_V1";
case IONIC_CMD_VF_GETATTR: case IONIC_CMD_VF_GETATTR:
return "IONIC_CMD_VF_GETATTR"; return "IONIC_CMD_VF_GETATTR";
case IONIC_CMD_VF_SETATTR: case IONIC_CMD_VF_SETATTR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment