Hello,
On 05/28/2015 07:25 PM, Neelesh Gupta wrote:
On 05/28/2015 06:36 PM, Cyril Bur wrote:
+
+ rc = opal_async_wait_response(token, &msg);
+ opal_async_release_token(token);
+ if (rc) {
+ dev_err(dev, "opal async wait failed (rc %d)\n", rc);
+ return -EIO;
+ }
+
+ rc = be64_to_cpu(msg.params[1]);
+ if (rc == OPAL_SUCCESS) {
+ rc = 0;
+ if (retlen)
+ *retlen = len;
+ } else {
+ rc = -EIO;
+ }
+
return rc;
You could use opal_error_code() to convert opal codes in errnos.
Also, powernv_flash_async_op() only contains low level OPAL cookery. I think
the code would be better placed under 'arch/powerpc/platforms/powernv/' ?