Lines Matching refs:pcmd

274 				const struct fw_port_cmd *pcmd)  in cxgb4_dcb_handle_fw_update()  argument
276 const union fw_port_dcb *fwdcb = &pcmd->u.dcb; in cxgb4_dcb_handle_fw_update()
277 int port = FW_PORT_CMD_PORTID_G(be32_to_cpu(pcmd->op_to_portid)); in cxgb4_dcb_handle_fw_update()
281 int dcb_type = pcmd->u.dcb.pgid.type; in cxgb4_dcb_handle_fw_update()
289 ((pcmd->u.dcb.control.all_syncd_pkd & in cxgb4_dcb_handle_fw_update()
297 pcmd->u.dcb.control.dcb_version_to_app_state)); in cxgb4_dcb_handle_fw_update()
442 struct fw_port_cmd pcmd; in cxgb4_getpgtccfg() local
450 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
452 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
454 pcmd.u.dcb.pgid.type = FW_PORT_DCB_TYPE_PGID; in cxgb4_getpgtccfg()
455 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_getpgtccfg()
460 *pgid = (be32_to_cpu(pcmd.u.dcb.pgid.pgid) >> (tc * 4)) & 0xf; in cxgb4_getpgtccfg()
463 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
465 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
466 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_getpgtccfg()
467 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_getpgtccfg()
474 *bw_per = pcmd.u.dcb.pgrate.pgrate[*pgid]; in cxgb4_getpgtccfg()
505 struct fw_port_cmd pcmd; in cxgb4_setpgtccfg_tx() local
517 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
518 pcmd.u.dcb.pgid.type = FW_PORT_DCB_TYPE_PGID; in cxgb4_setpgtccfg_tx()
520 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgtccfg_tx()
526 _pgid = be32_to_cpu(pcmd.u.dcb.pgid.pgid); in cxgb4_setpgtccfg_tx()
529 pcmd.u.dcb.pgid.pgid = cpu_to_be32(_pgid); in cxgb4_setpgtccfg_tx()
531 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
533 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgtccfg_tx()
540 memset(&pcmd, 0, sizeof(struct fw_port_cmd)); in cxgb4_setpgtccfg_tx()
542 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
543 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_setpgtccfg_tx()
545 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgtccfg_tx()
552 pcmd.u.dcb.pgrate.pgrate[pgid] = bw_per; in cxgb4_setpgtccfg_tx()
554 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
556 pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY_F); in cxgb4_setpgtccfg_tx()
558 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgtccfg_tx()
567 struct fw_port_cmd pcmd; in cxgb4_getpgbwgcfg() local
573 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgbwgcfg()
575 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgbwgcfg()
577 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_getpgbwgcfg()
578 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_getpgbwgcfg()
585 *bw_per = pcmd.u.dcb.pgrate.pgrate[pgid]; in cxgb4_getpgbwgcfg()
601 struct fw_port_cmd pcmd; in cxgb4_setpgbwgcfg_tx() local
606 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgbwgcfg_tx()
607 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_setpgbwgcfg_tx()
609 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgbwgcfg_tx()
616 pcmd.u.dcb.pgrate.pgrate[pgid] = bw_per; in cxgb4_setpgbwgcfg_tx()
618 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgbwgcfg_tx()
620 pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY_F); in cxgb4_setpgbwgcfg_tx()
622 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpgbwgcfg_tx()
649 struct fw_port_cmd pcmd; in cxgb4_setpfccfg() local
658 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpfccfg()
660 pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY_F); in cxgb4_setpfccfg()
662 pcmd.u.dcb.pfc.type = FW_PORT_DCB_TYPE_PFC; in cxgb4_setpfccfg()
663 pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen; in cxgb4_setpfccfg()
666 pcmd.u.dcb.pfc.pfcen |= (1 << (7 - priority)); in cxgb4_setpfccfg()
668 pcmd.u.dcb.pfc.pfcen &= (~(1 << (7 - priority))); in cxgb4_setpfccfg()
670 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_setpfccfg()
676 pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen; in cxgb4_setpfccfg()
794 struct fw_port_cmd pcmd; in __cxgb4_getapp() local
798 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in __cxgb4_getapp()
800 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in __cxgb4_getapp()
802 pcmd.u.dcb.app_priority.type = FW_PORT_DCB_TYPE_APP_ID; in __cxgb4_getapp()
803 pcmd.u.dcb.app_priority.idx = i; in __cxgb4_getapp()
805 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in __cxgb4_getapp()
811 if (be16_to_cpu(pcmd.u.dcb.app_priority.protocolid) == app_id) in __cxgb4_getapp()
812 if (pcmd.u.dcb.app_priority.sel_field == app_idtype) in __cxgb4_getapp()
813 return pcmd.u.dcb.app_priority.user_prio_map; in __cxgb4_getapp()
816 if (!pcmd.u.dcb.app_priority.protocolid) in __cxgb4_getapp()
838 struct fw_port_cmd pcmd; in __cxgb4_setapp() local
852 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in __cxgb4_setapp()
853 pcmd.u.dcb.app_priority.type = FW_PORT_DCB_TYPE_APP_ID; in __cxgb4_setapp()
854 pcmd.u.dcb.app_priority.idx = i; in __cxgb4_setapp()
855 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in __cxgb4_setapp()
862 if (be16_to_cpu(pcmd.u.dcb.app_priority.protocolid) == app_id) { in __cxgb4_setapp()
864 pcmd.u.dcb.app_priority.protocolid = 0; in __cxgb4_setapp()
868 if (!pcmd.u.dcb.app_priority.protocolid) in __cxgb4_setapp()
879 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in __cxgb4_setapp()
881 pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY_F); in __cxgb4_setapp()
883 pcmd.u.dcb.app_priority.type = FW_PORT_DCB_TYPE_APP_ID; in __cxgb4_setapp()
884 pcmd.u.dcb.app_priority.protocolid = cpu_to_be16(app_id); in __cxgb4_setapp()
885 pcmd.u.dcb.app_priority.sel_field = app_idtype; in __cxgb4_setapp()
886 pcmd.u.dcb.app_priority.user_prio_map = app_prio; in __cxgb4_setapp()
887 pcmd.u.dcb.app_priority.idx = i; in __cxgb4_setapp()
889 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in __cxgb4_setapp()
947 struct fw_port_cmd pcmd; in cxgb4_ieee_read_ets() local
957 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
959 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
962 pcmd.u.dcb.pgid.type = FW_PORT_DCB_TYPE_PGID; in cxgb4_ieee_read_ets()
963 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_ieee_read_ets()
969 tc_info = be32_to_cpu(pcmd.u.dcb.pgid.pgid); in cxgb4_ieee_read_ets()
972 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
974 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
976 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_ieee_read_ets()
977 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_ieee_read_ets()
987 ets->tc_tx_bw[i] = pcmd.u.dcb.pgrate.pgrate[i]; in cxgb4_ieee_read_ets()
989 ets->tc_tsa[i] = pcmd.u.dcb.pgrate.tsa[i]; in cxgb4_ieee_read_ets()
1112 struct fw_port_cmd pcmd; in cxgb4_getpeer_app() local
1125 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpeer_app()
1126 pcmd.u.dcb.app_priority.type = FW_PORT_DCB_TYPE_APP_ID; in cxgb4_getpeer_app()
1127 pcmd.u.dcb.app_priority.idx = *app_count; in cxgb4_getpeer_app()
1128 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_getpeer_app()
1137 if (!pcmd.u.dcb.app_priority.protocolid) in cxgb4_getpeer_app()
1146 struct fw_port_cmd pcmd; in cxgb4_getpeerapp_tbl() local
1155 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpeerapp_tbl()
1156 pcmd.u.dcb.app_priority.type = FW_PORT_DCB_TYPE_APP_ID; in cxgb4_getpeerapp_tbl()
1157 pcmd.u.dcb.app_priority.idx = i; in cxgb4_getpeerapp_tbl()
1158 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_getpeerapp_tbl()
1167 if (!pcmd.u.dcb.app_priority.protocolid) in cxgb4_getpeerapp_tbl()
1170 table[i].selector = (pcmd.u.dcb.app_priority.sel_field + 1); in cxgb4_getpeerapp_tbl()
1172 be16_to_cpu(pcmd.u.dcb.app_priority.protocolid); in cxgb4_getpeerapp_tbl()
1174 ffs(pcmd.u.dcb.app_priority.user_prio_map) - 1; in cxgb4_getpeerapp_tbl()
1183 struct fw_port_cmd pcmd; in cxgb4_cee_peer_getpg() local
1194 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_cee_peer_getpg()
1195 pcmd.u.dcb.pgid.type = FW_PORT_DCB_TYPE_PGID; in cxgb4_cee_peer_getpg()
1196 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_cee_peer_getpg()
1201 pgid = be32_to_cpu(pcmd.u.dcb.pgid.pgid); in cxgb4_cee_peer_getpg()
1206 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_cee_peer_getpg()
1207 pcmd.u.dcb.pgrate.type = FW_PORT_DCB_TYPE_PGRATE; in cxgb4_cee_peer_getpg()
1208 err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); in cxgb4_cee_peer_getpg()
1216 pg->pg_bw[i] = pcmd.u.dcb.pgrate.pgrate[i]; in cxgb4_cee_peer_getpg()
1218 pg->tcs_supported = pcmd.u.dcb.pgrate.num_tcs_supported; in cxgb4_cee_peer_getpg()