<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><FONT class="Apple-style-span" face="Courier">I made the following change to infiniband/hw/ehca/ehca_mrmw.c to have ibv_reg_mr return -ENOMEM instead of -EINVAL.. shouldn't we define and document what errno codes ibv_reg_mr is expected to return so that applications have some idea if there is a permanent failure and they need to exit, or go back and unregister some locked memory?</FONT><DIV><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">index cfb362a..58073f0 100644</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">@@ -2047,13 +2047,14 @@ int ehca_mrmw_map_hrc_alloc(const u64 hipz_rc)</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> return 0;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_ADAPTER_PARM: /* invalid adapter handle */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_RT_PARM: /* invalid resource type */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">- case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_MLENGTH_PARM: /* invalid memory length */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_MEM_ACCESS_PARM: /* invalid access controls */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_CONSTRAINED: /* resource constraint */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> return -EINVAL;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> case H_BUSY: /* long busy */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> return -EBUSY;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">+ case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier">+ return -ENOMEM;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> default:</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> return -EINVAL;</FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier"> }</FONT></DIV></BODY></HTML>