<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 05/29/2015 12:57 PM, Cedric Le
Goater wrote:<br>
</div>
<blockquote cite="mid:556814FE.9000305@fr.ibm.com" type="cite">
<pre wrap="">Hello,
On 05/28/2015 07:25 PM, Neelesh Gupta wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
On 05/28/2015 06:36 PM, Cyril Bur wrote:
</pre>
<pre wrap="">
+
+ 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;
+ }
+
</pre>
<pre wrap="">
return rc;
</pre>
</blockquote>
<pre wrap="">
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/' ?</pre>
</blockquote>
<br>
<small>The logic would unnecessary be split between the platform and
driver, it would make<br>
sense if the method is going to change across the platforms, but
that's not the case.<br>
Moreover, we will still have to export the symbol to make this
work as a module ...<br>
<br>
Neelesh.<br>
</small><br>
<blockquote cite="mid:556814FE.9000305@fr.ibm.com" type="cite">
<pre wrap="">
Cheers,
C.
</pre>
<br>
</blockquote>
<br>
</body>
</html>