[MLX4] return a more specific return code (in the bad flow of create_cq) [MLNX: 2554]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 5 Jun 2008 12:04:45 +0000 (12:04 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 5 Jun 2008 12:04:45 +0000 (12:04 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1245 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mthca/user/mlnx_ual_cq.c

index debe67c..b4dfbab 100644 (file)
@@ -81,7 +81,7 @@ __pre_create_cq (
        if (IS_ERR(ibv_cq)) {\r
                err = PTR_ERR(ibv_cq);\r
                UVP_PRINT(TRACE_LEVEL_ERROR ,UVP_DBG_CQ , ("mthca_alloc_cq_pre failed (%d)\n", err));\r
-               status = errno_to_iberr(err);\r
+               status = (err == -ENOMEM) ? IB_INVALID_CQ_SIZE : errno_to_iberr(err);\r
                goto err_alloc_cq;\r
        }\r
 \r