Lines Matching refs:cmd
88 static void t4vf_record_mbox(struct adapter *adapter, const __be64 *cmd, in t4vf_record_mbox() argument
100 entry->cmd[i] = be64_to_cpu(cmd[i]); in t4vf_record_mbox()
102 entry->cmd[i++] = 0; in t4vf_record_mbox()
129 int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size, in t4vf_wr_mbox_core() argument
141 u32 cmd_op = FW_CMD_OP_G(be32_to_cpu(((struct fw_cmd_hdr *)cmd)->hi)); in t4vf_wr_mbox_core()
184 t4vf_record_mbox(adapter, cmd, size, access, ret); in t4vf_wr_mbox_core()
218 t4vf_record_mbox(adapter, cmd, size, access, ret); in t4vf_wr_mbox_core()
236 t4vf_record_mbox(adapter, cmd, size, access, 0); in t4vf_wr_mbox_core()
237 for (i = 0, p = cmd; i < size; i += 8) in t4vf_wr_mbox_core()
289 WARN_ON((be32_to_cpu(*(const __be32 *)cmd) in t4vf_wr_mbox_core()
310 t4vf_record_mbox(adapter, cmd, size, access, ret); in t4vf_wr_mbox_core()
603 struct fw_reset_cmd cmd; in t4vf_fw_reset() local
605 memset(&cmd, 0, sizeof(cmd)); in t4vf_fw_reset()
606 cmd.op_to_write = cpu_to_be32(FW_CMD_OP_V(FW_RESET_CMD) | in t4vf_fw_reset()
608 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_fw_reset()
609 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_fw_reset()
626 struct fw_params_cmd cmd, rpl; in t4vf_query_params() local
633 memset(&cmd, 0, sizeof(cmd)); in t4vf_query_params()
634 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_PARAMS_CMD) | in t4vf_query_params()
639 cmd.retval_len16 = cpu_to_be32(FW_CMD_LEN16_V(len16)); in t4vf_query_params()
640 for (i = 0, p = &cmd.param[0]; i < nparams; i++, p++) in t4vf_query_params()
643 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_query_params()
664 struct fw_params_cmd cmd; in t4vf_set_params() local
671 memset(&cmd, 0, sizeof(cmd)); in t4vf_set_params()
672 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_PARAMS_CMD) | in t4vf_set_params()
677 cmd.retval_len16 = cpu_to_be32(FW_CMD_LEN16_V(len16)); in t4vf_set_params()
678 for (i = 0, p = &cmd.param[0]; i < nparams; i++, p++) { in t4vf_set_params()
683 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_set_params()
1018 struct fw_rss_glb_config_cmd cmd, rpl; in t4vf_get_rss_glb_config() local
1025 memset(&cmd, 0, sizeof(cmd)); in t4vf_get_rss_glb_config()
1026 cmd.op_to_write = cpu_to_be32(FW_CMD_OP_V(FW_RSS_GLB_CONFIG_CMD) | in t4vf_get_rss_glb_config()
1029 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_get_rss_glb_config()
1030 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_get_rss_glb_config()
1093 struct fw_pfvf_cmd cmd, rpl; in t4vf_get_vfres() local
1101 memset(&cmd, 0, sizeof(cmd)); in t4vf_get_vfres()
1102 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_PFVF_CMD) | in t4vf_get_vfres()
1105 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_get_vfres()
1106 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_get_vfres()
1146 struct fw_rss_vi_config_cmd cmd, rpl; in t4vf_read_rss_vi_config() local
1149 memset(&cmd, 0, sizeof(cmd)); in t4vf_read_rss_vi_config()
1150 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_RSS_VI_CONFIG_CMD) | in t4vf_read_rss_vi_config()
1154 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_read_rss_vi_config()
1155 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_read_rss_vi_config()
1197 struct fw_rss_vi_config_cmd cmd, rpl; in t4vf_write_rss_vi_config() local
1199 memset(&cmd, 0, sizeof(cmd)); in t4vf_write_rss_vi_config()
1200 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_RSS_VI_CONFIG_CMD) | in t4vf_write_rss_vi_config()
1204 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_write_rss_vi_config()
1221 cmd.u.basicvirtual.defaultq_to_udpen = cpu_to_be32(word); in t4vf_write_rss_vi_config()
1229 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_write_rss_vi_config()
1252 struct fw_rss_ind_tbl_cmd cmd; in t4vf_config_rss_range() local
1257 memset(&cmd, 0, sizeof(cmd)); in t4vf_config_rss_range()
1258 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_RSS_IND_TBL_CMD) | in t4vf_config_rss_range()
1262 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_config_rss_range()
1271 __be32 *qp = &cmd.iq0_to_iq2; in t4vf_config_rss_range()
1279 cmd.niqid = cpu_to_be16(nq); in t4vf_config_rss_range()
1280 cmd.startidx = cpu_to_be16(start); in t4vf_config_rss_range()
1321 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_config_rss_range()
1339 struct fw_vi_cmd cmd, rpl; in t4vf_alloc_vi() local
1346 memset(&cmd, 0, sizeof(cmd)); in t4vf_alloc_vi()
1347 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_VI_CMD) | in t4vf_alloc_vi()
1351 cmd.alloc_to_len16 = cpu_to_be32(FW_LEN16(cmd) | in t4vf_alloc_vi()
1353 cmd.portid_pkd = FW_VI_CMD_PORTID_V(port_id); in t4vf_alloc_vi()
1354 v = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_alloc_vi()
1371 struct fw_vi_cmd cmd; in t4vf_free_vi() local
1376 memset(&cmd, 0, sizeof(cmd)); in t4vf_free_vi()
1377 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_VI_CMD) | in t4vf_free_vi()
1380 cmd.alloc_to_len16 = cpu_to_be32(FW_LEN16(cmd) | in t4vf_free_vi()
1382 cmd.type_viid = cpu_to_be16(FW_VI_CMD_VIID_V(viid)); in t4vf_free_vi()
1383 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_free_vi()
1398 struct fw_vi_enable_cmd cmd; in t4vf_enable_vi() local
1400 memset(&cmd, 0, sizeof(cmd)); in t4vf_enable_vi()
1401 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_ENABLE_CMD) | in t4vf_enable_vi()
1405 cmd.ien_to_len16 = cpu_to_be32(FW_VI_ENABLE_CMD_IEN_V(rx_en) | in t4vf_enable_vi()
1407 FW_LEN16(cmd)); in t4vf_enable_vi()
1408 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_enable_vi()
1446 struct fw_vi_enable_cmd cmd; in t4vf_identify_port() local
1448 memset(&cmd, 0, sizeof(cmd)); in t4vf_identify_port()
1449 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_ENABLE_CMD) | in t4vf_identify_port()
1453 cmd.ien_to_len16 = cpu_to_be32(FW_VI_ENABLE_CMD_LED_F | in t4vf_identify_port()
1454 FW_LEN16(cmd)); in t4vf_identify_port()
1455 cmd.blinkdur = cpu_to_be16(nblinks); in t4vf_identify_port()
1456 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_identify_port()
1477 struct fw_vi_rxmode_cmd cmd; in t4vf_set_rxmode() local
1491 memset(&cmd, 0, sizeof(cmd)); in t4vf_set_rxmode()
1492 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_RXMODE_CMD) | in t4vf_set_rxmode()
1496 cmd.retval_len16 = cpu_to_be32(FW_LEN16(cmd)); in t4vf_set_rxmode()
1497 cmd.mtu_to_vlanexen = in t4vf_set_rxmode()
1503 return t4vf_wr_mbox_core(adapter, &cmd, sizeof(cmd), NULL, sleep_ok); in t4vf_set_rxmode()
1534 struct fw_vi_mac_cmd cmd, rpl; in t4vf_alloc_mac_filt() local
1541 unsigned int fw_naddr = (rem < ARRAY_SIZE(cmd.u.exact) in t4vf_alloc_mac_filt()
1543 : ARRAY_SIZE(cmd.u.exact)); in t4vf_alloc_mac_filt()
1549 memset(&cmd, 0, sizeof(cmd)); in t4vf_alloc_mac_filt()
1550 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_MAC_CMD) | in t4vf_alloc_mac_filt()
1555 cmd.freemacs_to_len16 = in t4vf_alloc_mac_filt()
1559 for (i = 0, p = cmd.u.exact; i < fw_naddr; i++, p++) { in t4vf_alloc_mac_filt()
1567 ret = t4vf_wr_mbox_core(adapter, &cmd, sizeof(cmd), &rpl, in t4vf_alloc_mac_filt()
1617 struct fw_vi_mac_cmd cmd; in t4vf_free_mac_filt() local
1626 unsigned int fw_naddr = (rem < ARRAY_SIZE(cmd.u.exact) ? in t4vf_free_mac_filt()
1627 rem : ARRAY_SIZE(cmd.u.exact)); in t4vf_free_mac_filt()
1633 memset(&cmd, 0, sizeof(cmd)); in t4vf_free_mac_filt()
1634 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_MAC_CMD) | in t4vf_free_mac_filt()
1639 cmd.freemacs_to_len16 = in t4vf_free_mac_filt()
1643 for (i = 0, p = cmd.u.exact; i < (int)fw_naddr; i++, p++) { in t4vf_free_mac_filt()
1650 ret = t4vf_wr_mbox_core(adapter, &cmd, sizeof(cmd), &cmd, in t4vf_free_mac_filt()
1655 for (i = 0, p = cmd.u.exact; i < fw_naddr; i++, p++) { in t4vf_free_mac_filt()
1694 struct fw_vi_mac_cmd cmd, rpl; in t4vf_change_mac() local
1695 struct fw_vi_mac_exact *p = &cmd.u.exact[0]; in t4vf_change_mac()
1707 memset(&cmd, 0, sizeof(cmd)); in t4vf_change_mac()
1708 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_MAC_CMD) | in t4vf_change_mac()
1712 cmd.freemacs_to_len16 = cpu_to_be32(FW_CMD_LEN16_V(len16)); in t4vf_change_mac()
1717 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &rpl); in t4vf_change_mac()
1740 struct fw_vi_mac_cmd cmd; in t4vf_set_addr_hash() local
1744 memset(&cmd, 0, sizeof(cmd)); in t4vf_set_addr_hash()
1745 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_MAC_CMD) | in t4vf_set_addr_hash()
1749 cmd.freemacs_to_len16 = cpu_to_be32(FW_VI_MAC_CMD_HASHVECEN_F | in t4vf_set_addr_hash()
1752 cmd.u.hash.hashvec = cpu_to_be64(vec); in t4vf_set_addr_hash()
1753 return t4vf_wr_mbox_core(adapter, &cmd, sizeof(cmd), NULL, sleep_ok); in t4vf_set_addr_hash()
1780 struct fw_vi_stats_cmd cmd, rpl; in t4vf_get_port_stats() local
1786 memset(&cmd, 0, sizeof(cmd)); in t4vf_get_port_stats()
1787 cmd.op_to_viid = cpu_to_be32(FW_CMD_OP_V(FW_VI_STATS_CMD) | in t4vf_get_port_stats()
1791 cmd.retval_len16 = cpu_to_be32(FW_CMD_LEN16_V(len16)); in t4vf_get_port_stats()
1792 cmd.u.ctl.nstats_ix = in t4vf_get_port_stats()
1795 ret = t4vf_wr_mbox_ns(adapter, &cmd, len, &rpl); in t4vf_get_port_stats()
1843 struct fw_iq_cmd cmd; in t4vf_iq_free() local
1845 memset(&cmd, 0, sizeof(cmd)); in t4vf_iq_free()
1846 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_IQ_CMD) | in t4vf_iq_free()
1849 cmd.alloc_to_len16 = cpu_to_be32(FW_IQ_CMD_FREE_F | in t4vf_iq_free()
1850 FW_LEN16(cmd)); in t4vf_iq_free()
1851 cmd.type_to_iqandstindex = in t4vf_iq_free()
1854 cmd.iqid = cpu_to_be16(iqid); in t4vf_iq_free()
1855 cmd.fl0id = cpu_to_be16(fl0id); in t4vf_iq_free()
1856 cmd.fl1id = cpu_to_be16(fl1id); in t4vf_iq_free()
1857 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_iq_free()
1869 struct fw_eq_eth_cmd cmd; in t4vf_eth_eq_free() local
1871 memset(&cmd, 0, sizeof(cmd)); in t4vf_eth_eq_free()
1872 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_EQ_ETH_CMD) | in t4vf_eth_eq_free()
1875 cmd.alloc_to_len16 = cpu_to_be32(FW_EQ_ETH_CMD_FREE_F | in t4vf_eth_eq_free()
1876 FW_LEN16(cmd)); in t4vf_eth_eq_free()
1877 cmd.eqid_pkd = cpu_to_be32(FW_EQ_ETH_CMD_EQID_V(eqid)); in t4vf_eth_eq_free()
1878 return t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), NULL); in t4vf_eth_eq_free()
1914 const struct fw_port_cmd *cmd) in t4vf_handle_get_port_info() argument
1925 action = FW_PORT_CMD_ACTION_G(be32_to_cpu(cmd->action_to_len16)); in t4vf_handle_get_port_info()
1928 u32 lstatus = be32_to_cpu(cmd->u.info.lstatus_to_modtype); in t4vf_handle_get_port_info()
1934 pcaps = fwcaps16_to_caps32(be16_to_cpu(cmd->u.info.pcap)); in t4vf_handle_get_port_info()
1935 acaps = fwcaps16_to_caps32(be16_to_cpu(cmd->u.info.acap)); in t4vf_handle_get_port_info()
1936 lpacaps = fwcaps16_to_caps32(be16_to_cpu(cmd->u.info.lpacap)); in t4vf_handle_get_port_info()
1966 lstatus32 = be32_to_cpu(cmd->u.info32.lstatus32_to_cbllen32); in t4vf_handle_get_port_info()
1971 pcaps = be32_to_cpu(cmd->u.info32.pcaps32); in t4vf_handle_get_port_info()
1972 acaps = be32_to_cpu(cmd->u.info32.acaps32); in t4vf_handle_get_port_info()
1973 lpacaps = be32_to_cpu(cmd->u.info32.lpacaps32); in t4vf_handle_get_port_info()
1974 linkattr = be32_to_cpu(cmd->u.info32.linkattr32); in t4vf_handle_get_port_info()
1980 be32_to_cpu(cmd->action_to_len16)); in t4vf_handle_get_port_info()
2201 struct fw_acl_mac_cmd cmd; in t4vf_get_vf_mac_acl() local
2204 memset(&cmd, 0, sizeof(cmd)); in t4vf_get_vf_mac_acl()
2205 cmd.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_ACL_MAC_CMD) | in t4vf_get_vf_mac_acl()
2208 cmd.en_to_len16 = cpu_to_be32((unsigned int)FW_LEN16(cmd)); in t4vf_get_vf_mac_acl()
2209 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); in t4vf_get_vf_mac_acl()
2213 if (cmd.nmac < *naddr) in t4vf_get_vf_mac_acl()
2214 *naddr = cmd.nmac; in t4vf_get_vf_mac_acl()
2218 memcpy(addr, cmd.macaddr3, sizeof(cmd.macaddr3)); in t4vf_get_vf_mac_acl()
2221 memcpy(addr, cmd.macaddr2, sizeof(cmd.macaddr2)); in t4vf_get_vf_mac_acl()
2224 memcpy(addr, cmd.macaddr1, sizeof(cmd.macaddr1)); in t4vf_get_vf_mac_acl()
2227 memcpy(addr, cmd.macaddr0, sizeof(cmd.macaddr0)); in t4vf_get_vf_mac_acl()
2244 struct fw_acl_vlan_cmd cmd; in t4vf_get_vf_vlan_acl() local
2248 cmd.op_to_vfn = htonl(FW_CMD_OP_V(FW_ACL_VLAN_CMD) | in t4vf_get_vf_vlan_acl()
2252 cmd.en_to_len16 = cpu_to_be32((unsigned int)FW_LEN16(cmd)); in t4vf_get_vf_vlan_acl()
2254 ret = t4vf_wr_mbox(adapter, &cmd, sizeof(cmd), &cmd); in t4vf_get_vf_vlan_acl()
2257 vlan = be16_to_cpu(cmd.vlanid[0]); in t4vf_get_vf_vlan_acl()