Lines Matching defs:method

91 static int method_in_use(struct ib_mad_mgmt_method_table **method,
187 struct ib_mad_mgmt_method_table *method;
192 method = vendor_class->method_table[i];
193 if (method) {
194 if (method_in_use(&method, mad_reg_req))
206 return ((hdr->method & IB_MGMT_METHOD_RESP) ||
207 (hdr->method == IB_MGMT_METHOD_TRAP_REPRESS) ||
235 struct ib_mad_mgmt_method_table *method;
431 method = class->method_table[mgmt_class];
432 if (method) {
433 if (method_in_use(&method,
1183 static int method_in_use(struct ib_mad_mgmt_method_table **method,
1189 if ((*method)->agent[i]) {
1197 static int allocate_method_table(struct ib_mad_mgmt_method_table **method)
1199 /* Allocate management method table */
1200 *method = kzalloc(sizeof **method, GFP_ATOMIC);
1201 return (*method) ? 0 : (-ENOMEM);
1207 static int check_method_table(struct ib_mad_mgmt_method_table *method)
1212 if (method->agent[i])
1218 * Check to see if there are any method tables for this class still in use
1264 static void remove_methods_mad_agent(struct ib_mad_mgmt_method_table *method,
1271 if (method->agent[i] == agent)
1272 method->agent[i] = NULL;
1281 struct ib_mad_mgmt_method_table **method;
1294 /* Allocate method table for this management class */
1295 method = &(*class)->method_table[mgmt_class];
1296 if ((ret = allocate_method_table(method)))
1299 method = &(*class)->method_table[mgmt_class];
1300 if (!*method) {
1301 /* Allocate method table for this management class */
1302 if ((ret = allocate_method_table(method)))
1308 if (method_in_use(method, mad_reg_req))
1313 (*method)->agent[i] = agent_priv;
1319 remove_methods_mad_agent(*method, agent_priv);
1321 if (!check_method_table(*method)) {
1322 /* If not, release management method table */
1323 kfree(*method);
1324 *method = NULL;
1342 struct ib_mad_mgmt_method_table **method;
1371 method = &(*vendor_table)->vendor_class[
1373 if (!*method)
1382 method = &(*vendor_table)->vendor_class[
1384 /* Allocate method table for this OUI */
1385 if (!*method) {
1386 ret = allocate_method_table(method);
1400 if (method_in_use(method, mad_reg_req))
1405 (*method)->agent[i] = agent_priv;
1411 remove_methods_mad_agent(*method, agent_priv);
1413 if (!check_method_table(*method)) {
1414 /* If not, release management method table */
1415 kfree(*method);
1416 *method = NULL;
1437 struct ib_mad_mgmt_method_table *method;
1457 method = class->method_table[mgmt_class];
1458 if (method) {
1460 remove_methods_mad_agent(method, agent_priv);
1462 if (!check_method_table(method)) {
1463 /* If not, release management method table */
1464 kfree(method);
1494 method = vendor_class->method_table[index];
1495 if (method) {
1497 remove_methods_mad_agent(method, agent_priv);
1502 if (!check_method_table(method)) {
1503 /* If not, release management method table */
1504 kfree(method);
1551 struct ib_mad_mgmt_method_table *method;
1559 * Routing is based on version, class, and method
1572 method = class->method_table[convert_mgmt_class(
1574 if (method)
1575 mad_agent = method->agent[mad_hdr->method &
1591 method = vendor_class->method_table[index];
1592 if (method) {
1593 mad_agent = method->agent[mad_hdr->method &
1635 /* CM attributes other than ClassPortInfo only use Send method */
1638 (mad_hdr->method != IB_MGMT_METHOD_SEND))
1914 if (recv_hdr->method == IB_MGMT_METHOD_GET ||
1915 recv_hdr->method == IB_MGMT_METHOD_SET) {
1920 resp_hdr->method = IB_MGMT_METHOD_GET_RESP;