Lines Matching refs:pmp
2560 static int pma_get_opa_classportinfo(struct opa_pma_mad *pmp, in pma_get_opa_classportinfo() argument
2564 (struct opa_class_port_info *)pmp->data; in pma_get_opa_classportinfo()
2566 memset(pmp->data, 0, sizeof(pmp->data)); in pma_get_opa_classportinfo()
2568 if (pmp->mad_hdr.attr_mod != 0) in pma_get_opa_classportinfo()
2569 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_classportinfo()
2581 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_classportinfo()
2681 static int pma_get_opa_portstatus(struct opa_pma_mad *pmp, in pma_get_opa_portstatus() argument
2686 (struct opa_port_status_req *)pmp->data; in pma_get_opa_portstatus()
2692 u32 nports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24; in pma_get_opa_portstatus()
2704 if (response_data_size > sizeof(pmp->data)) { in pma_get_opa_portstatus()
2705 pmp->mad_hdr.status |= OPA_PM_STATUS_REQUEST_TOO_LARGE; in pma_get_opa_portstatus()
2706 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_portstatus()
2711 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_portstatus()
2712 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_portstatus()
2715 memset(pmp->data, 0, sizeof(pmp->data)); in pma_get_opa_portstatus()
2717 rsp = (struct opa_port_status_rsp *)pmp->data; in pma_get_opa_portstatus()
2846 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_portstatus()
2932 static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, in pma_get_opa_datacounters() argument
2937 (struct opa_port_data_counters_msg *)pmp->data; in pma_get_opa_datacounters()
2955 num_ports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24; in pma_get_opa_datacounters()
2964 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_datacounters()
2965 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_datacounters()
2971 if (response_data_size > sizeof(pmp->data)) { in pma_get_opa_datacounters()
2972 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_datacounters()
2973 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_datacounters()
2985 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_datacounters()
2986 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_datacounters()
3080 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_datacounters()
3083 static int pma_get_ib_portcounters_ext(struct ib_pma_mad *pmp, in pma_get_ib_portcounters_ext() argument
3087 pmp->data; in pma_get_ib_portcounters_ext()
3090 if (pmp->mad_hdr.attr_mod != 0 || p->port_select != port) { in pma_get_ib_portcounters_ext()
3091 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_ib_portcounters_ext()
3108 return reply((struct ib_mad_hdr *)pmp); in pma_get_ib_portcounters_ext()
3153 static int pma_get_opa_porterrors(struct opa_pma_mad *pmp, in pma_get_opa_porterrors() argument
3173 req = (struct opa_port_error_counters64_msg *)pmp->data; in pma_get_opa_porterrors()
3175 num_ports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24; in pma_get_opa_porterrors()
3181 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_porterrors()
3182 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_porterrors()
3187 if (response_data_size > sizeof(pmp->data)) { in pma_get_opa_porterrors()
3188 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_porterrors()
3189 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_porterrors()
3200 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_porterrors()
3201 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_porterrors()
3240 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_porterrors()
3243 static int pma_get_ib_portcounters(struct ib_pma_mad *pmp, in pma_get_ib_portcounters() argument
3247 pmp->data; in pma_get_ib_portcounters()
3256 if (pmp->mad_hdr.attr_mod != 0 || p->port_select != port) { in pma_get_ib_portcounters()
3257 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_ib_portcounters()
3325 return reply((struct ib_mad_hdr *)pmp); in pma_get_ib_portcounters()
3328 static int pma_get_opa_errorinfo(struct opa_pma_mad *pmp, in pma_get_opa_errorinfo() argument
3342 req = (struct opa_port_error_info_msg *)pmp->data; in pma_get_opa_errorinfo()
3345 num_ports = OPA_AM_NPORT(be32_to_cpu(pmp->mad_hdr.attr_mod)); in pma_get_opa_errorinfo()
3351 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_errorinfo()
3352 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_errorinfo()
3358 if (response_data_size > sizeof(pmp->data)) { in pma_get_opa_errorinfo()
3359 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_errorinfo()
3360 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_errorinfo()
3372 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_get_opa_errorinfo()
3373 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_errorinfo()
3424 return reply((struct ib_mad_hdr *)pmp); in pma_get_opa_errorinfo()
3427 static int pma_set_opa_portstatus(struct opa_pma_mad *pmp, in pma_set_opa_portstatus() argument
3432 (struct opa_clear_port_status *)pmp->data; in pma_set_opa_portstatus()
3436 u32 nports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24; in pma_set_opa_portstatus()
3443 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_set_opa_portstatus()
3444 return reply((struct ib_mad_hdr *)pmp); in pma_set_opa_portstatus()
3576 return reply((struct ib_mad_hdr *)pmp); in pma_set_opa_portstatus()
3579 static int pma_set_opa_errorinfo(struct opa_pma_mad *pmp, in pma_set_opa_errorinfo() argument
3592 req = (struct opa_port_error_info_msg *)pmp->data; in pma_set_opa_errorinfo()
3595 num_ports = OPA_AM_NPORT(be32_to_cpu(pmp->mad_hdr.attr_mod)); in pma_set_opa_errorinfo()
3601 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_set_opa_errorinfo()
3602 return reply((struct ib_mad_hdr *)pmp); in pma_set_opa_errorinfo()
3614 pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; in pma_set_opa_errorinfo()
3615 return reply((struct ib_mad_hdr *)pmp); in pma_set_opa_errorinfo()
3653 return reply((struct ib_mad_hdr *)pmp); in pma_set_opa_errorinfo()
4637 struct ib_pma_mad *pmp = (struct ib_pma_mad *)out_mad; in process_perf() local
4639 &pmp->data; in process_perf()
4643 if (pmp->mad_hdr.class_version != 1) { in process_perf()
4644 pmp->mad_hdr.status |= IB_SMP_UNSUP_VERSION; in process_perf()
4645 ret = reply((struct ib_mad_hdr *)pmp); in process_perf()
4649 switch (pmp->mad_hdr.method) { in process_perf()
4651 switch (pmp->mad_hdr.attr_id) { in process_perf()
4653 ret = pma_get_ib_portcounters(pmp, ibdev, port); in process_perf()
4656 ret = pma_get_ib_portcounters_ext(pmp, ibdev, port); in process_perf()
4660 ret = reply((struct ib_mad_hdr *)pmp); in process_perf()
4663 pmp->mad_hdr.status |= IB_SMP_UNSUP_METH_ATTR; in process_perf()
4664 ret = reply((struct ib_mad_hdr *)pmp); in process_perf()
4670 if (pmp->mad_hdr.attr_id) { in process_perf()
4671 pmp->mad_hdr.status |= IB_SMP_UNSUP_METH_ATTR; in process_perf()
4672 ret = reply((struct ib_mad_hdr *)pmp); in process_perf()
4687 pmp->mad_hdr.status |= IB_SMP_UNSUP_METHOD; in process_perf()
4688 ret = reply((struct ib_mad_hdr *)pmp); in process_perf()
4699 struct opa_pma_mad *pmp = (struct opa_pma_mad *)out_mad; in process_perf_opa() local
4704 if (pmp->mad_hdr.class_version != OPA_SM_CLASS_VERSION) { in process_perf_opa()
4705 pmp->mad_hdr.status |= IB_SMP_UNSUP_VERSION; in process_perf_opa()
4706 return reply((struct ib_mad_hdr *)pmp); in process_perf_opa()
4709 *resp_len = sizeof(pmp->mad_hdr); in process_perf_opa()
4711 switch (pmp->mad_hdr.method) { in process_perf_opa()
4713 switch (pmp->mad_hdr.attr_id) { in process_perf_opa()
4715 ret = pma_get_opa_classportinfo(pmp, ibdev, resp_len); in process_perf_opa()
4718 ret = pma_get_opa_portstatus(pmp, ibdev, port, in process_perf_opa()
4722 ret = pma_get_opa_datacounters(pmp, ibdev, port, in process_perf_opa()
4726 ret = pma_get_opa_porterrors(pmp, ibdev, port, in process_perf_opa()
4730 ret = pma_get_opa_errorinfo(pmp, ibdev, port, in process_perf_opa()
4734 pmp->mad_hdr.status |= IB_SMP_UNSUP_METH_ATTR; in process_perf_opa()
4735 ret = reply((struct ib_mad_hdr *)pmp); in process_perf_opa()
4741 switch (pmp->mad_hdr.attr_id) { in process_perf_opa()
4743 ret = pma_set_opa_portstatus(pmp, ibdev, port, in process_perf_opa()
4747 ret = pma_set_opa_errorinfo(pmp, ibdev, port, in process_perf_opa()
4751 pmp->mad_hdr.status |= IB_SMP_UNSUP_METH_ATTR; in process_perf_opa()
4752 ret = reply((struct ib_mad_hdr *)pmp); in process_perf_opa()
4768 pmp->mad_hdr.status |= IB_SMP_UNSUP_METHOD; in process_perf_opa()
4769 ret = reply((struct ib_mad_hdr *)pmp); in process_perf_opa()