[MTHCA,MT23108] - WA for FW bug 33958
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Apr 2006 15:01:06 +0000 (15:01 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Apr 2006 15:01:06 +0000 (15:01 +0000)
- few fixes to the MAD caching
- cosmetics

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@324 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mt23108/kernel/hca_smp.c
hw/mthca/kernel/hca_mcast.c
hw/mthca/kernel/hca_smp.c
hw/mthca/kernel/mthca_mad.c

index f768b5c..abae347 100644 (file)
@@ -66,14 +66,14 @@ mlnx_cachable_guid_info(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->guid_block[idx].tbl, sizeof(ib_guid_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->guid_block[idx].tbl, sizeof(ib_guid_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+       \r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -118,14 +118,14 @@ mlnx_cachable_pkey_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->pkey_tbl[idx].tbl, sizeof(ib_pkey_table_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->pkey_tbl[idx].tbl, sizeof(ib_pkey_table_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -158,14 +158,14 @@ mlnx_cachable_sl_vl_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->sl_vl.tbl, sizeof(ib_slvl_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->sl_vl.tbl, sizeof(ib_slvl_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -210,14 +210,14 @@ mlnx_cachable_vl_arb_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->vl_arb[idx].tbl, sizeof(ib_vl_arb_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->vl_arb[idx].tbl, sizeof(ib_vl_arb_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -307,8 +307,8 @@ mlnx_cachable_mad(
        IN              const   ib_mad_t                                        *p_mad_in,\r
                OUT                     ib_mad_t                                        *p_mad_out )\r
 {\r
        IN              const   ib_mad_t                                        *p_mad_in,\r
                OUT                     ib_mad_t                                        *p_mad_out )\r
 {\r
-       if( p_mad_in->method != IB_MCLASS_SUBN_DIR &&\r
-               p_mad_in->method != IB_MCLASS_SUBN_LID )\r
+       if( p_mad_in->mgmt_class!= IB_MCLASS_SUBN_DIR &&\r
+               p_mad_in->mgmt_class != IB_MCLASS_SUBN_LID )\r
        {\r
                return FALSE;\r
        }\r
        {\r
                return FALSE;\r
        }\r
@@ -441,8 +441,8 @@ mlnx_update_cache(
        IN              const   uint8_t                                         port_num,\r
        IN              const   ib_mad_t                                        *p_mad_out )\r
 {\r
        IN              const   uint8_t                                         port_num,\r
        IN              const   ib_mad_t                                        *p_mad_out )\r
 {\r
-       if( p_mad_out->method != IB_MCLASS_SUBN_DIR &&\r
-               p_mad_out->method != IB_MCLASS_SUBN_LID )\r
+       if( p_mad_out->mgmt_class != IB_MCLASS_SUBN_DIR &&\r
+               p_mad_out->mgmt_class != IB_MCLASS_SUBN_LID )\r
        {\r
                return;\r
        }\r
        {\r
                return;\r
        }\r
@@ -540,6 +540,30 @@ mlnx_local_mad (
                        status = IB_ERROR;\r
                        goto cleanup;\r
                }\r
                        status = IB_ERROR;\r
                        goto cleanup;\r
                }\r
+               if( (p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR ||\r
+                       p_mad_in->mgmt_class == IB_MCLASS_SUBN_LID) &&\r
+                       p_mad_in->attr_id == IB_MAD_ATTR_PORT_INFO )\r
+               {\r
+                       ib_port_info_t  *p_pi_in, *p_pi_out;\r
+\r
+                       if( p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR )\r
+                       {\r
+                               p_pi_in = (ib_port_info_t*)\r
+                                       ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in );\r
+                               p_pi_out = (ib_port_info_t*)\r
+                                       ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_out );\r
+                       }\r
+                       else\r
+                       {\r
+                               p_pi_in = (ib_port_info_t*)(p_mad_in + 1);\r
+                               p_pi_out = (ib_port_info_t*)(p_mad_out + 1);\r
+                       }\r
+\r
+                       /* Work around FW bug 33958 */\r
+                       p_pi_out->subnet_timeout &= 0x7F;\r
+                       if( p_mad_in->method == IB_MAD_METHOD_SET )\r
+                               p_pi_out->subnet_timeout |= (p_pi_in->subnet_timeout & 0x80);\r
+               }\r
 \r
                mlnx_update_cache( h_ca, port_num, p_mad_out );\r
        }\r
 \r
                mlnx_update_cache( h_ca, port_num, p_mad_out );\r
        }\r
index 9e90576..d47b53f 100644 (file)
@@ -100,7 +100,7 @@ mlnx_attach_mcast (
        mcast_p->ib_qp_p = ib_qp_p;\r
        mcast_p->mcast_lid = mcast_lid;\r
        RtlCopyMemory(mcast_p->mcast_gid.raw, p_mcast_gid->raw, sizeof *p_mcast_gid);\r
        mcast_p->ib_qp_p = ib_qp_p;\r
        mcast_p->mcast_lid = mcast_lid;\r
        RtlCopyMemory(mcast_p->mcast_gid.raw, p_mcast_gid->raw, sizeof *p_mcast_gid);\r
-       HCA_PRINT(TRACE_LEVEL_WARNING, HCA_DBG_SHIM, ("mcasth %p, qp_p %p, mlid %hx, mgid %I64x`%I64x\n", \r
+       HCA_PRINT(TRACE_LEVEL_INFORMATION, HCA_DBG_SHIM, ("mcasth %p, qp_p %p, mlid %hx, mgid %I64x`%I64x\n", \r
                mcast_p, mcast_p->ib_qp_p, mcast_p->mcast_lid,\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[0],\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[8] ));\r
                mcast_p, mcast_p->ib_qp_p, mcast_p->mcast_lid,\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[0],\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[8] ));\r
@@ -141,7 +141,7 @@ mlnx_detach_mcast (
 \r
        ib_dev = mcast_p->ib_qp_p->device;\r
 \r
 \r
        ib_dev = mcast_p->ib_qp_p->device;\r
 \r
-       HCA_PRINT(TRACE_LEVEL_WARNING, HCA_DBG_SHIM,("mcasth %p, qp_p %p, mlid %hx, mgid %I64x`%I64x\n", \r
+       HCA_PRINT(TRACE_LEVEL_INFORMATION, HCA_DBG_SHIM,("mcasth %p, qp_p %p, mlid %hx, mgid %I64x`%I64x\n", \r
                mcast_p, mcast_p->ib_qp_p, mcast_p->mcast_lid,\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[0],\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[8] ));\r
                mcast_p, mcast_p->ib_qp_p, mcast_p->mcast_lid,\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[0],\r
                *(uint64_t*)&mcast_p->mcast_gid.raw[8] ));\r
index adb9d7e..8dc3088 100644 (file)
@@ -73,14 +73,14 @@ mlnx_cachable_guid_info(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->guid_block[idx].tbl, sizeof(ib_guid_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->guid_block[idx].tbl, sizeof(ib_guid_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+       \r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -125,14 +125,14 @@ mlnx_cachable_pkey_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->pkey_tbl[idx].tbl, sizeof(ib_pkey_table_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->pkey_tbl[idx].tbl, sizeof(ib_pkey_table_info_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+       \r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -165,14 +165,14 @@ mlnx_cachable_sl_vl_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->sl_vl.tbl, sizeof(ib_slvl_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->sl_vl.tbl, sizeof(ib_slvl_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+       \r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -217,14 +217,14 @@ mlnx_cachable_vl_arb_table(
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
         */\r
        if( p_mad_in->method == IB_MAD_METHOD_SET )\r
        {\r
-               if( !cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
+               if( cl_memcmp( ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in ),\r
                        &p_cache->vl_arb[idx].tbl, sizeof(ib_vl_arb_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
                        &p_cache->vl_arb[idx].tbl, sizeof(ib_vl_arb_table_t) ) )\r
                {\r
                        /* The set is requesting a change. */\r
                        return FALSE;\r
                }\r
        }\r
-       CL_ASSERT( p_mad_in->method == IB_MAD_METHOD_GET );\r
+       \r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
 \r
        /* Setup the response mad. */\r
        cl_memcpy( p_mad_out, p_mad_in, MAD_BLOCK_SIZE );\r
@@ -314,8 +314,8 @@ mlnx_cachable_mad(
        IN              const   ib_mad_t                                        *p_mad_in,\r
                OUT                     ib_mad_t                                        *p_mad_out )\r
 {\r
        IN              const   ib_mad_t                                        *p_mad_in,\r
                OUT                     ib_mad_t                                        *p_mad_out )\r
 {\r
-       if( p_mad_in->method != IB_MCLASS_SUBN_DIR &&\r
-               p_mad_in->method != IB_MCLASS_SUBN_LID )\r
+       if( p_mad_in->mgmt_class!= IB_MCLASS_SUBN_DIR &&\r
+               p_mad_in->mgmt_class != IB_MCLASS_SUBN_LID )\r
        {\r
                return FALSE;\r
        }\r
        {\r
                return FALSE;\r
        }\r
@@ -448,8 +448,8 @@ mlnx_update_cache(
        IN              const   uint8_t                                         port_num,\r
        IN              const   ib_mad_t                                        *p_mad_out )\r
 {\r
        IN              const   uint8_t                                         port_num,\r
        IN              const   ib_mad_t                                        *p_mad_out )\r
 {\r
-       if( p_mad_out->method != IB_MCLASS_SUBN_DIR &&\r
-               p_mad_out->method != IB_MCLASS_SUBN_LID )\r
+       if( p_mad_out->mgmt_class != IB_MCLASS_SUBN_DIR &&\r
+               p_mad_out->mgmt_class != IB_MCLASS_SUBN_LID )\r
        {\r
                return;\r
        }\r
        {\r
                return;\r
        }\r
@@ -568,6 +568,32 @@ mlnx_local_mad (
                        status = IB_ERROR;\r
                        goto err_process_mad;\r
                }\r
                        status = IB_ERROR;\r
                        goto err_process_mad;\r
                }\r
+               \r
+               if( (p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR ||\r
+                       p_mad_in->mgmt_class == IB_MCLASS_SUBN_LID) &&\r
+                       p_mad_in->attr_id == IB_MAD_ATTR_PORT_INFO )\r
+               {\r
+                       ib_port_info_t  *p_pi_in, *p_pi_out;\r
+\r
+                       if( p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR )\r
+                       {\r
+                               p_pi_in = (ib_port_info_t*)\r
+                                       ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in );\r
+                               p_pi_out = (ib_port_info_t*)\r
+                                       ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_out );\r
+                       }\r
+                       else\r
+                       {\r
+                               p_pi_in = (ib_port_info_t*)(p_mad_in + 1);\r
+                               p_pi_out = (ib_port_info_t*)(p_mad_out + 1);\r
+                       }\r
+\r
+                       /* Work around FW bug 33958 */\r
+                       p_pi_out->subnet_timeout &= 0x7F;\r
+                       if( p_mad_in->method == IB_MAD_METHOD_SET )\r
+                               p_pi_out->subnet_timeout |= (p_pi_in->subnet_timeout & 0x80);\r
+               }\r
+\r
                mlnx_update_cache( h_ca, port_num, p_mad_out );\r
        }\r
 \r
                mlnx_update_cache( h_ca, port_num, p_mad_out );\r
        }\r
 \r
index 423620c..b4fec62 100644 (file)
@@ -165,7 +165,7 @@ static void forward_trap(struct mthca_dev *dev,
                spin_lock_irqsave(&dev->sm_lock, &lh);
                wr.dgrm.ud.h_av      = (ib_av_handle_t)dev->sm_ah[port_num - 1];
                if (wr.dgrm.ud.h_av) {
                spin_lock_irqsave(&dev->sm_lock, &lh);
                wr.dgrm.ud.h_av      = (ib_av_handle_t)dev->sm_ah[port_num - 1];
                if (wr.dgrm.ud.h_av) {
-                               HCA_PRINT( TRACE_LEVEL_ERROR   ,HCA_DBG_LOW   ,(" forward_trap: ib_post_send_mad not ported \n" ));
+                               HCA_PRINT( TRACE_LEVEL_ERROR ,HCA_DBG_MAD ,(" forward_trap: ib_post_send_mad not ported \n" ));
                                ret = -EINVAL;
                }
                else
                                ret = -EINVAL;
                }
                else
@@ -191,7 +191,7 @@ int mthca_process_mad(struct ib_device *ibdev,
        u8 status;
        u16 slid = in_wc ? in_wc->recv.ud.remote_lid : cl_ntoh16(IB_LID_PERMISSIVE);
 
        u8 status;
        u16 slid = in_wc ? in_wc->recv.ud.remote_lid : cl_ntoh16(IB_LID_PERMISSIVE);
 
-       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_LOW,("mthca_process_mad: \n\tin: Class %02x, Method %02x, AttrId %x, AttrMod %x, ClSpec %x, Tid %I64x\n",
+       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD ,("mthca_process_mad: \n\tin: Class %02x, Method %02x, AttrId %x, AttrMod %x, ClSpec %x, Tid %I64x\n",
                (u32)in_mad->mad_hdr.mgmt_class, (u32)in_mad->mad_hdr.method, 
                (u32)in_mad->mad_hdr.attr_id, in_mad->mad_hdr.attr_mod, 
                (u32)in_mad->mad_hdr.class_specific, in_mad->mad_hdr.tid ));
                (u32)in_mad->mad_hdr.mgmt_class, (u32)in_mad->mad_hdr.method, 
                (u32)in_mad->mad_hdr.attr_id, in_mad->mad_hdr.attr_mod, 
                (u32)in_mad->mad_hdr.class_specific, in_mad->mad_hdr.tid ));
@@ -200,7 +200,7 @@ int mthca_process_mad(struct ib_device *ibdev,
        if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP &&
            slid == 0) {
                forward_trap(to_mdev(ibdev), port_num, in_mad);
        if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP &&
            slid == 0) {
                forward_trap(to_mdev(ibdev), port_num, in_mad);
-               HCA_PRINT( TRACE_LEVEL_VERBOSE   ,HCA_DBG_LOW   ,("mthca_process_mad: Not sent, but locally forwarded\n"));
+               HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD ,("mthca_process_mad: Not sent, but locally forwarded\n"));
                return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED;
        }
 
                return IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED;
        }
 
@@ -227,7 +227,7 @@ int mthca_process_mad(struct ib_device *ibdev,
                if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||
                    ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==
                     IB_SMP_ATTR_VENDOR_MASK)) {
                if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||
                    ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==
                     IB_SMP_ATTR_VENDOR_MASK)) {
-                       HCA_PRINT( TRACE_LEVEL_VERBOSE   ,HCA_DBG_LOW   ,("mthca_process_mad: Skip SMInfo queries or vendor-specific MADs. Nothing done !\n"));
+                       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD ,("mthca_process_mad: Skip SMInfo queries or vendor-specific MADs. Nothing done !\n"));
                        return IB_MAD_RESULT_SUCCESS;
                }
        } 
                        return IB_MAD_RESULT_SUCCESS;
                }
        } 
@@ -238,12 +238,12 @@ int mthca_process_mad(struct ib_device *ibdev,
 
                        if (in_mad->mad_hdr.method  != IB_MGMT_METHOD_GET &&
                            in_mad->mad_hdr.method  != IB_MGMT_METHOD_SET) {
 
                        if (in_mad->mad_hdr.method  != IB_MGMT_METHOD_GET &&
                            in_mad->mad_hdr.method  != IB_MGMT_METHOD_SET) {
-                               HCA_PRINT( TRACE_LEVEL_VERBOSE   ,HCA_DBG_LOW  ,("mthca_process_mad: Skip some management methods. Nothing done !\n"));
+                               HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD ,("mthca_process_mad: Skip some management methods. Nothing done !\n"));
                                return IB_MAD_RESULT_SUCCESS;
                        }
                } 
                else {
                                return IB_MAD_RESULT_SUCCESS;
                        }
                } 
                else {
-                       HCA_PRINT( TRACE_LEVEL_VERBOSE   ,HCA_DBG_LOW  ,("mthca_process_mad: Skip IB_MGMT_CLASS_PERF_MGMT et al. Nothing done !\n"));
+                       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD ,("mthca_process_mad: Skip IB_MGMT_CLASS_PERF_MGMT et al. Nothing done !\n"));
                        return IB_MAD_RESULT_SUCCESS;
                }       
        }
                        return IB_MAD_RESULT_SUCCESS;
                }       
        }
@@ -255,20 +255,20 @@ int mthca_process_mad(struct ib_device *ibdev,
                            port_num, in_wc, in_grh, in_mad, out_mad,
                            &status);
        if (err) {
                            port_num, in_wc, in_grh, in_mad, out_mad,
                            &status);
        if (err) {
-               HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_LOW   ,("MAD_IFC failed\n"));
+               HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_MAD ,("MAD_IFC failed\n"));
                return IB_MAD_RESULT_FAILURE;
        }
        if (status == MTHCA_CMD_STAT_BAD_PKT)
                return IB_MAD_RESULT_SUCCESS;
        if (status) {
                return IB_MAD_RESULT_FAILURE;
        }
        if (status == MTHCA_CMD_STAT_BAD_PKT)
                return IB_MAD_RESULT_SUCCESS;
        if (status) {
-               HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_LOW   ,("mthca_process_mad: MAD_IFC returned status %02x\n", status));
+               HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_MAD ,("mthca_process_mad: MAD_IFC returned status %02x\n", status));
                return IB_MAD_RESULT_FAILURE;
        }
 
        if (!out_mad->mad_hdr.status)
                smp_snoop(ibdev, port_num, in_mad);
 
                return IB_MAD_RESULT_FAILURE;
        }
 
        if (!out_mad->mad_hdr.status)
                smp_snoop(ibdev, port_num, in_mad);
 
-       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_LOW,("mthca_process_mad: \n\tout: Class %02x, Method %02x, AttrId %x, AttrMod %x, ClSpec %x, Tid %I64x, Status %x\n",
+       HCA_PRINT( TRACE_LEVEL_VERBOSE ,HCA_DBG_MAD,("mthca_process_mad: \n\tout: Class %02x, Method %02x, AttrId %x, AttrMod %x, ClSpec %x, Tid %I64x, Status %x\n",
                (u32)in_mad->mad_hdr.mgmt_class, (u32)in_mad->mad_hdr.method, 
                (u32)in_mad->mad_hdr.attr_id, in_mad->mad_hdr.attr_mod, 
                (u32)in_mad->mad_hdr.class_specific, in_mad->mad_hdr.tid,
                (u32)in_mad->mad_hdr.mgmt_class, (u32)in_mad->mad_hdr.method, 
                (u32)in_mad->mad_hdr.attr_id, in_mad->mad_hdr.attr_mod, 
                (u32)in_mad->mad_hdr.class_specific, in_mad->mad_hdr.tid,