linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.22] ehca: return proper error code if register_mr fails
@ 2007-05-16 12:50 Hoang-Nam Nguyen
  2007-05-17 18:32 ` Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Hoang-Nam Nguyen @ 2007-05-16 12:50 UTC (permalink / raw)
  To: Roland Dreier, linux-kernel, linuxppc-dev, openib-general; +Cc: raisch

This patch sets the return code of ehca_register_mr() to ENOMEM
if corresponding firmware call fails due to out of resources.
Some of error codes were mapped to EINVAL. They are now mapped
to default case, which already returns EINVAL anyway.


Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
---


 ehca_mrmw.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)


diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index 84c5bb4..add79bd 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -2050,13 +2050,10 @@ int ehca_mrmw_map_hrc_alloc(const u64 hi
 	switch (hipz_rc) {
 	case H_SUCCESS:	             /* successful completion */
 		return 0;
-	case H_ADAPTER_PARM:         /* invalid adapter handle */
-	case H_RT_PARM:              /* invalid resource type */
 	case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */
-	case H_MLENGTH_PARM:         /* invalid memory length */
-	case H_MEM_ACCESS_PARM:      /* invalid access controls */
 	case H_CONSTRAINED:          /* resource constraint */
-		return -EINVAL;
+	case H_NO_MEM:
+		return -ENOMEM;
 	case H_BUSY:                 /* long busy */
 		return -EBUSY;
 	default:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.22] ehca: return proper error code if register_mr fails
  2007-05-16 12:50 [PATCH 2.6.22] ehca: return proper error code if register_mr fails Hoang-Nam Nguyen
@ 2007-05-17 18:32 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2007-05-17 18:32 UTC (permalink / raw)
  To: Hoang-Nam Nguyen; +Cc: linuxppc-dev, raisch, linux-kernel, openib-general

thanks, applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-17 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 12:50 [PATCH 2.6.22] ehca: return proper error code if register_mr fails Hoang-Nam Nguyen
2007-05-17 18:32 ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).