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) ||
258 struct ib_mad_mgmt_method_table *method;
458 method = class->method_table[mgmt_class];
459 if (method) {
460 if (method_in_use(&method,
1386 static int method_in_use(struct ib_mad_mgmt_method_table **method,
1392 if ((*method)->agent[i]) {
1400 static int allocate_method_table(struct ib_mad_mgmt_method_table **method)
1402 /* Allocate management method table */
1403 *method = kzalloc_obj(**method, GFP_ATOMIC);
1404 return (*method) ? 0 : (-ENOMEM);
1410 static int check_method_table(struct ib_mad_mgmt_method_table *method)
1415 if (method->agent[i])
1421 * Check to see if there are any method tables for this class still in use
1467 static void remove_methods_mad_agent(struct ib_mad_mgmt_method_table *method,
1474 if (method->agent[i] == agent)
1475 method->agent[i] = NULL;
1484 struct ib_mad_mgmt_method_table **method;
1497 /* Allocate method table for this management class */
1498 method = &(*class)->method_table[mgmt_class];
1499 if ((ret = allocate_method_table(method)))
1502 method = &(*class)->method_table[mgmt_class];
1503 if (!*method) {
1504 /* Allocate method table for this management class */
1505 if ((ret = allocate_method_table(method)))
1511 if (method_in_use(method, mad_reg_req))
1516 (*method)->agent[i] = agent_priv;
1522 remove_methods_mad_agent(*method, agent_priv);
1524 if (!check_method_table(*method)) {
1525 /* If not, release management method table */
1526 kfree(*method);
1527 *method = NULL;
1545 struct ib_mad_mgmt_method_table **method;
1574 method = &(*vendor_table)->vendor_class[
1576 if (!*method)
1585 method = &(*vendor_table)->vendor_class[
1587 /* Allocate method table for this OUI */
1588 if (!*method) {
1589 ret = allocate_method_table(method);
1603 if (method_in_use(method, mad_reg_req))
1608 (*method)->agent[i] = agent_priv;
1614 remove_methods_mad_agent(*method, agent_priv);
1616 if (!check_method_table(*method)) {
1617 /* If not, release management method table */
1618 kfree(*method);
1619 *method = NULL;
1640 struct ib_mad_mgmt_method_table *method;
1660 method = class->method_table[mgmt_class];
1661 if (method) {
1663 remove_methods_mad_agent(method, agent_priv);
1665 if (!check_method_table(method)) {
1666 /* If not, release management method table */
1667 kfree(method);
1697 method = vendor_class->method_table[index];
1698 if (method) {
1700 remove_methods_mad_agent(method, agent_priv);
1705 if (!check_method_table(method)) {
1706 /* If not, release management method table */
1707 kfree(method);
1754 struct ib_mad_mgmt_method_table *method;
1762 * Routing is based on version, class, and method
1775 method = class->method_table[convert_mgmt_class(
1777 if (method)
1778 mad_agent = method->agent[mad_hdr->method &
1794 method = vendor_class->method_table[index];
1795 if (method) {
1796 mad_agent = method->agent[mad_hdr->method &
1838 /* CM attributes other than ClassPortInfo only use Send method */
1841 (mad_hdr->method != IB_MGMT_METHOD_SEND))
2203 if (recv_hdr->method == IB_MGMT_METHOD_GET ||
2204 recv_hdr->method == IB_MGMT_METHOD_SET) {
2209 resp_hdr->method = IB_MGMT_METHOD_GET_RESP;