greybus: firmware: Add new status types for backend updated request
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 25 Jul 2016 21:38:07 +0000 (14:38 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 26 Jul 2016 23:16:15 +0000 (16:16 -0700)
The specification got updated with two more status values, add their
support in greybus.

As retry isn't really an error, skip printing error messages for it as
well.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/fw-management.c
drivers/staging/greybus/greybus_protocols.h

index 2efe65c..642a393 100644 (file)
@@ -350,7 +350,8 @@ static int fw_mgmt_backend_fw_updated_operation(struct gb_operation *op)
        fw_mgmt->backend_fw_request_id = 0;
        fw_mgmt->backend_fw_status = request->status;
 
-       if (fw_mgmt->backend_fw_status != GB_FW_BACKEND_FW_STATUS_SUCCESS)
+       if ((fw_mgmt->backend_fw_status != GB_FW_BACKEND_FW_STATUS_SUCCESS) &&
+           (fw_mgmt->backend_fw_status != GB_FW_BACKEND_FW_STATUS_RETRY))
                dev_err(fw_mgmt->parent,
                        "failed to load backend firmware: %02x\n",
                        fw_mgmt->backend_fw_status);
index 2de5aef..e51c2b1 100644 (file)
@@ -367,6 +367,8 @@ struct gb_fw_download_release_firmware_request {
 #define GB_FW_BACKEND_FW_STATUS_FAIL_FETCH     0x03
 #define GB_FW_BACKEND_FW_STATUS_FAIL_WRITE     0x04
 #define GB_FW_BACKEND_FW_STATUS_INT            0x05
+#define GB_FW_BACKEND_FW_STATUS_RETRY          0x06
+#define GB_FW_BACKEND_FW_STATUS_NOT_SUPPORTED  0x07
 
 /* firmware management interface firmware version request has no payload */
 struct gb_fw_mgmt_interface_fw_version_response {