<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 21, 2023, 10:33 PM Dave Airlie <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This should let the upper layers retry as needed on EAGAIN.<br>
<br>
There may be other values we will care about in the future, but<br>
this covers our present needs.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank" rel="noreferrer">airlied@redhat.com</a>><br><br>
+static int<br>
+r535_rpc_status_to_errno(uint32_t rpc_status)<br>
+{<br>
+       switch (rpc_status) {<br>
+       case 0x55: /* NV_ERR_NOT_READY */<br>
+       case 0x66: /* NV_ERR_TIMEOUT_RETRY */<br>
+              return -EAGAIN;<br>
+       case 0x51: /* NV_ERR_NO_MEMORY */<br>
+               return -ENOMEM;<br>
+       default:<br>
+               return -EINVAL;<br>
+       }<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Shouldn't you also have this:</div><div dir="auto"><br></div><div dir="auto">case 0:</div><div dir="auto">    return 0;</div></div>