Lines Matching +full:rpc +full:- +full:if

2  * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
15 * - Redistributions of source code must retain the above
19 * - Redistributions in binary form must reproduce the above
35 #if HAVE_CONFIG_H
48 #define DEBUG if (ibdebug) IBWARN
52 srcport->smp_mkey = mkey; in smp_mkey_set()
57 return srcport->smp_mkey; in smp_mkey_get()
64 ib_rpc_t rpc = { 0 }; in smp_set_status_via() local
68 if ((portid->lid <= 0) || in smp_set_status_via()
69 (portid->drpath.drslid == 0xffff) || in smp_set_status_via()
70 (portid->drpath.drdlid == 0xffff)) in smp_set_status_via()
71 rpc.mgtclass = IB_SMI_DIRECT_CLASS; /* direct SMI */ in smp_set_status_via()
73 rpc.mgtclass = IB_SMI_CLASS; /* Lid routed SMI */ in smp_set_status_via()
75 rpc.method = IB_MAD_METHOD_SET; in smp_set_status_via()
76 rpc.attr.id = attrid; in smp_set_status_via()
77 rpc.attr.mod = mod; in smp_set_status_via()
78 rpc.timeout = timeout; in smp_set_status_via()
79 rpc.datasz = IB_SMP_DATA_SIZE; in smp_set_status_via()
80 rpc.dataoffs = IB_SMP_DATA_OFFS; in smp_set_status_via()
81 rpc.mkey = srcport->smp_mkey; in smp_set_status_via()
83 portid->sl = 0; in smp_set_status_via()
84 portid->qp = 0; in smp_set_status_via()
86 res = mad_rpc(srcport, &rpc, portid, data, data); in smp_set_status_via()
87 if (rstatus) in smp_set_status_via()
88 *rstatus = rpc.rstatus; in smp_set_status_via()
110 ib_rpc_t rpc = { 0 }; in smp_query_status_via() local
114 rpc.method = IB_MAD_METHOD_GET; in smp_query_status_via()
115 rpc.attr.id = attrid; in smp_query_status_via()
116 rpc.attr.mod = mod; in smp_query_status_via()
117 rpc.timeout = timeout; in smp_query_status_via()
118 rpc.datasz = IB_SMP_DATA_SIZE; in smp_query_status_via()
119 rpc.dataoffs = IB_SMP_DATA_OFFS; in smp_query_status_via()
120 rpc.mkey = srcport->smp_mkey; in smp_query_status_via()
122 if ((portid->lid <= 0) || in smp_query_status_via()
123 (portid->drpath.drslid == 0xffff) || in smp_query_status_via()
124 (portid->drpath.drdlid == 0xffff)) in smp_query_status_via()
125 rpc.mgtclass = IB_SMI_DIRECT_CLASS; /* direct SMI */ in smp_query_status_via()
127 rpc.mgtclass = IB_SMI_CLASS; /* Lid routed SMI */ in smp_query_status_via()
129 portid->sl = 0; in smp_query_status_via()
130 portid->qp = 0; in smp_query_status_via()
132 res = mad_rpc(srcport, &rpc, portid, rcvbuf, rcvbuf); in smp_query_status_via()
133 if (rstatus) in smp_query_status_via()
134 *rstatus = rpc.rstatus; in smp_query_status_via()