Lines Matching refs:c
1641 unsigned int i, c, left, val, offset = addr & 0xff; in t4_write_flash() local
1652 for (left = n; left; left -= c) { in t4_write_flash()
1653 c = min(left, 4U); in t4_write_flash()
1654 for (val = 0, i = 0; i < c; ++i) in t4_write_flash()
1657 ret = sf1_write(adapter, c, c != left, 1, val); in t4_write_flash()
1774 int k, int c) in should_install_fs_fw()
1783 if (k > c) { in should_install_fs_fw()
1793 FW_HDR_FW_VER_MAJOR_G(c), FW_HDR_FW_VER_MINOR_G(c), in should_install_fs_fw()
1794 FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c), reason, in should_install_fs_fw()
1857 uint32_t d, c, k; in t4_prep_fw() local
1860 c = be32_to_cpu(card_fw->fw_ver); in t4_prep_fw()
1870 FW_HDR_FW_VER_MAJOR_G(c), FW_HDR_FW_VER_MINOR_G(c), in t4_prep_fw()
1871 FW_HDR_FW_VER_MICRO_G(c), FW_HDR_FW_VER_BUILD_G(c), in t4_prep_fw()
2048 struct fw_params_cmd c; in t4_fwcache() local
2050 memset(&c, 0, sizeof(c)); in t4_fwcache()
2051 c.op_to_vfn = in t4_fwcache()
2056 c.retval_len16 = cpu_to_be32(FW_LEN16(c)); in t4_fwcache()
2057 c.param[0].mnem = in t4_fwcache()
2060 c.param[0].val = (__force __be32)op; in t4_fwcache()
2062 return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL); in t4_fwcache()
2100 struct fw_port_cmd c; in t4_link_start() local
2109 memset(&c, 0, sizeof(c)); in t4_link_start()
2110 c.op_to_portid = htonl(FW_CMD_OP_V(FW_PORT_CMD) | FW_CMD_REQUEST_F | in t4_link_start()
2112 c.action_to_len16 = htonl(FW_PORT_CMD_ACTION_V(FW_PORT_ACTION_L1_CFG) | in t4_link_start()
2113 FW_LEN16(c)); in t4_link_start()
2116 c.u.l1cfg.rcap = htonl((lc->supported & ADVERT_MASK) | fc); in t4_link_start()
2119 c.u.l1cfg.rcap = htonl(lc->requested_speed | fc | mdi); in t4_link_start()
2122 c.u.l1cfg.rcap = htonl(lc->advertising | fc | mdi); in t4_link_start()
2124 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_link_start()
2137 struct fw_port_cmd c; in t4_restart_aneg() local
2139 memset(&c, 0, sizeof(c)); in t4_restart_aneg()
2140 c.op_to_portid = htonl(FW_CMD_OP_V(FW_PORT_CMD) | FW_CMD_REQUEST_F | in t4_restart_aneg()
2142 c.action_to_len16 = htonl(FW_PORT_CMD_ACTION_V(FW_PORT_ACTION_L1_CFG) | in t4_restart_aneg()
2143 FW_LEN16(c)); in t4_restart_aneg()
2144 c.u.l1cfg.rcap = htonl(FW_PORT_CAP_ANEG); in t4_restart_aneg()
2145 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_restart_aneg()
3000 struct fw_rss_glb_config_cmd c; in t4_config_glbl_rss() local
3002 memset(&c, 0, sizeof(c)); in t4_config_glbl_rss()
3003 c.op_to_write = htonl(FW_CMD_OP_V(FW_RSS_GLB_CONFIG_CMD) | in t4_config_glbl_rss()
3005 c.retval_len16 = htonl(FW_LEN16(c)); in t4_config_glbl_rss()
3007 c.u.manual.mode_pkd = htonl(FW_RSS_GLB_CONFIG_CMD_MODE_V(mode)); in t4_config_glbl_rss()
3009 c.u.basicvirtual.mode_pkd = in t4_config_glbl_rss()
3011 c.u.basicvirtual.synmapen_to_hashtoeplitz = htonl(flags); in t4_config_glbl_rss()
3014 return t4_wr_mbox(adapter, mbox, &c, sizeof(c), NULL); in t4_config_glbl_rss()
3665 struct fw_ldst_cmd c; in t4_fwaddrspace_write() local
3667 memset(&c, 0, sizeof(c)); in t4_fwaddrspace_write()
3668 c.op_to_addrspace = htonl(FW_CMD_OP_V(FW_LDST_CMD) | FW_CMD_REQUEST_F | in t4_fwaddrspace_write()
3671 c.cycles_to_len16 = htonl(FW_LEN16(c)); in t4_fwaddrspace_write()
3672 c.u.addrval.addr = htonl(addr); in t4_fwaddrspace_write()
3673 c.u.addrval.val = htonl(val); in t4_fwaddrspace_write()
3675 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_fwaddrspace_write()
3693 struct fw_ldst_cmd c; in t4_mdio_rd() local
3695 memset(&c, 0, sizeof(c)); in t4_mdio_rd()
3696 c.op_to_addrspace = htonl(FW_CMD_OP_V(FW_LDST_CMD) | FW_CMD_REQUEST_F | in t4_mdio_rd()
3698 c.cycles_to_len16 = htonl(FW_LEN16(c)); in t4_mdio_rd()
3699 c.u.mdio.paddr_mmd = htons(FW_LDST_CMD_PADDR_V(phy_addr) | in t4_mdio_rd()
3701 c.u.mdio.raddr = htons(reg); in t4_mdio_rd()
3703 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_mdio_rd()
3705 *valp = ntohs(c.u.mdio.rval); in t4_mdio_rd()
3723 struct fw_ldst_cmd c; in t4_mdio_wr() local
3725 memset(&c, 0, sizeof(c)); in t4_mdio_wr()
3726 c.op_to_addrspace = htonl(FW_CMD_OP_V(FW_LDST_CMD) | FW_CMD_REQUEST_F | in t4_mdio_wr()
3728 c.cycles_to_len16 = htonl(FW_LEN16(c)); in t4_mdio_wr()
3729 c.u.mdio.paddr_mmd = htons(FW_LDST_CMD_PADDR_V(phy_addr) | in t4_mdio_wr()
3731 c.u.mdio.raddr = htons(reg); in t4_mdio_wr()
3732 c.u.mdio.rval = htons(val); in t4_mdio_wr()
3734 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_mdio_wr()
3858 struct fw_hello_cmd c; in t4_fw_hello() local
3864 memset(&c, 0, sizeof(c)); in t4_fw_hello()
3865 INIT_CMD(c, HELLO, WRITE); in t4_fw_hello()
3866 c.err_to_clearinit = htonl( in t4_fw_hello()
3882 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_fw_hello()
3891 v = ntohl(c.err_to_clearinit); in t4_fw_hello()
3982 struct fw_bye_cmd c; in t4_fw_bye() local
3984 memset(&c, 0, sizeof(c)); in t4_fw_bye()
3985 INIT_CMD(c, BYE, WRITE); in t4_fw_bye()
3986 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_fw_bye()
3999 struct fw_initialize_cmd c; in t4_early_init() local
4001 memset(&c, 0, sizeof(c)); in t4_early_init()
4002 INIT_CMD(c, INITIALIZE, WRITE); in t4_early_init()
4003 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_early_init()
4016 struct fw_reset_cmd c; in t4_fw_reset() local
4018 memset(&c, 0, sizeof(c)); in t4_fw_reset()
4019 INIT_CMD(c, RESET, WRITE); in t4_fw_reset()
4020 c.val = htonl(reset); in t4_fw_reset()
4021 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_fw_reset()
4049 struct fw_reset_cmd c; in t4_fw_halt() local
4051 memset(&c, 0, sizeof(c)); in t4_fw_halt()
4052 INIT_CMD(c, RESET, WRITE); in t4_fw_halt()
4053 c.val = htonl(PIORST_F | PIORSTMODE_F); in t4_fw_halt()
4054 c.halt_pkd = htonl(FW_RESET_CMD_HALT_F); in t4_fw_halt()
4055 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_fw_halt()
4316 struct fw_initialize_cmd c; in t4_fw_initialize() local
4318 memset(&c, 0, sizeof(c)); in t4_fw_initialize()
4319 INIT_CMD(c, INITIALIZE, WRITE); in t4_fw_initialize()
4320 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_fw_initialize()
4341 struct fw_params_cmd c; in t4_query_params() local
4342 __be32 *p = &c.param[0].mnem; in t4_query_params()
4347 memset(&c, 0, sizeof(c)); in t4_query_params()
4348 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_PARAMS_CMD) | FW_CMD_REQUEST_F | in t4_query_params()
4351 c.retval_len16 = htonl(FW_LEN16(c)); in t4_query_params()
4355 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_query_params()
4357 for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2) in t4_query_params()
4381 struct fw_params_cmd c; in t4_set_params_nosleep() local
4382 __be32 *p = &c.param[0].mnem; in t4_set_params_nosleep()
4387 memset(&c, 0, sizeof(c)); in t4_set_params_nosleep()
4388 c.op_to_vfn = cpu_to_be32(FW_CMD_OP_V(FW_PARAMS_CMD) | in t4_set_params_nosleep()
4392 c.retval_len16 = cpu_to_be32(FW_LEN16(c)); in t4_set_params_nosleep()
4399 return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL); in t4_set_params_nosleep()
4419 struct fw_params_cmd c; in t4_set_params() local
4420 __be32 *p = &c.param[0].mnem; in t4_set_params()
4425 memset(&c, 0, sizeof(c)); in t4_set_params()
4426 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_PARAMS_CMD) | FW_CMD_REQUEST_F | in t4_set_params()
4429 c.retval_len16 = htonl(FW_LEN16(c)); in t4_set_params()
4435 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_set_params()
4465 struct fw_pfvf_cmd c; in t4_cfg_pfvf() local
4467 memset(&c, 0, sizeof(c)); in t4_cfg_pfvf()
4468 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_PFVF_CMD) | FW_CMD_REQUEST_F | in t4_cfg_pfvf()
4471 c.retval_len16 = htonl(FW_LEN16(c)); in t4_cfg_pfvf()
4472 c.niqflint_niq = htonl(FW_PFVF_CMD_NIQFLINT_V(rxqi) | in t4_cfg_pfvf()
4474 c.type_to_neq = htonl(FW_PFVF_CMD_CMASK_V(cmask) | in t4_cfg_pfvf()
4477 c.tc_to_nexactf = htonl(FW_PFVF_CMD_TC_V(tc) | FW_PFVF_CMD_NVI_V(vi) | in t4_cfg_pfvf()
4479 c.r_caps_to_nethctrl = htonl(FW_PFVF_CMD_R_CAPS_V(rcaps) | in t4_cfg_pfvf()
4482 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_cfg_pfvf()
4507 struct fw_vi_cmd c; in t4_alloc_vi() local
4509 memset(&c, 0, sizeof(c)); in t4_alloc_vi()
4510 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_VI_CMD) | FW_CMD_REQUEST_F | in t4_alloc_vi()
4513 c.alloc_to_len16 = htonl(FW_VI_CMD_ALLOC_F | FW_LEN16(c)); in t4_alloc_vi()
4514 c.portid_pkd = FW_VI_CMD_PORTID_V(port); in t4_alloc_vi()
4515 c.nmac = nmac - 1; in t4_alloc_vi()
4517 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_alloc_vi()
4522 memcpy(mac, c.mac, sizeof(c.mac)); in t4_alloc_vi()
4525 memcpy(mac + 24, c.nmac3, sizeof(c.nmac3)); in t4_alloc_vi()
4527 memcpy(mac + 18, c.nmac2, sizeof(c.nmac2)); in t4_alloc_vi()
4529 memcpy(mac + 12, c.nmac1, sizeof(c.nmac1)); in t4_alloc_vi()
4531 memcpy(mac + 6, c.nmac0, sizeof(c.nmac0)); in t4_alloc_vi()
4535 *rss_size = FW_VI_CMD_RSSSIZE_G(ntohs(c.rsssize_pkd)); in t4_alloc_vi()
4536 return FW_VI_CMD_VIID_G(ntohs(c.type_viid)); in t4_alloc_vi()
4557 struct fw_vi_rxmode_cmd c; in t4_set_rxmode() local
4571 memset(&c, 0, sizeof(c)); in t4_set_rxmode()
4572 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_RXMODE_CMD) | FW_CMD_REQUEST_F | in t4_set_rxmode()
4574 c.retval_len16 = htonl(FW_LEN16(c)); in t4_set_rxmode()
4575 c.mtu_to_vlanexen = htonl(FW_VI_RXMODE_CMD_MTU_V(mtu) | in t4_set_rxmode()
4580 return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); in t4_set_rxmode()
4610 struct fw_vi_mac_cmd c; in t4_alloc_mac_filt() local
4619 memset(&c, 0, sizeof(c)); in t4_alloc_mac_filt()
4620 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_MAC_CMD) | FW_CMD_REQUEST_F | in t4_alloc_mac_filt()
4623 c.freemacs_to_len16 = htonl(FW_VI_MAC_CMD_FREEMACS_V(free) | in t4_alloc_mac_filt()
4626 for (i = 0, p = c.u.exact; i < naddr; i++, p++) { in t4_alloc_mac_filt()
4632 ret = t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), &c, sleep_ok); in t4_alloc_mac_filt()
4636 for (i = 0, p = c.u.exact; i < naddr; i++, p++) { in t4_alloc_mac_filt()
4672 struct fw_vi_mac_cmd c; in t4_change_mac() local
4673 struct fw_vi_mac_exact *p = c.u.exact; in t4_change_mac()
4682 memset(&c, 0, sizeof(c)); in t4_change_mac()
4683 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_MAC_CMD) | FW_CMD_REQUEST_F | in t4_change_mac()
4685 c.freemacs_to_len16 = htonl(FW_CMD_LEN16_V(1)); in t4_change_mac()
4691 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_change_mac()
4714 struct fw_vi_mac_cmd c; in t4_set_addr_hash() local
4716 memset(&c, 0, sizeof(c)); in t4_set_addr_hash()
4717 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_MAC_CMD) | FW_CMD_REQUEST_F | in t4_set_addr_hash()
4719 c.freemacs_to_len16 = htonl(FW_VI_MAC_CMD_HASHVECEN_F | in t4_set_addr_hash()
4722 c.u.hash.hashvec = cpu_to_be64(vec); in t4_set_addr_hash()
4723 return t4_wr_mbox_meat(adap, mbox, &c, sizeof(c), NULL, sleep_ok); in t4_set_addr_hash()
4741 struct fw_vi_enable_cmd c; in t4_enable_vi_params() local
4743 memset(&c, 0, sizeof(c)); in t4_enable_vi_params()
4744 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST_F | in t4_enable_vi_params()
4747 c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_IEN_V(rx_en) | in t4_enable_vi_params()
4748 FW_VI_ENABLE_CMD_EEN_V(tx_en) | FW_LEN16(c) | in t4_enable_vi_params()
4750 return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL); in t4_enable_vi_params()
4781 struct fw_vi_enable_cmd c; in t4_identify_port() local
4783 memset(&c, 0, sizeof(c)); in t4_identify_port()
4784 c.op_to_viid = htonl(FW_CMD_OP_V(FW_VI_ENABLE_CMD) | FW_CMD_REQUEST_F | in t4_identify_port()
4786 c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_LED_F | FW_LEN16(c)); in t4_identify_port()
4787 c.blinkdur = htons(nblinks); in t4_identify_port()
4788 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_identify_port()
4808 struct fw_iq_cmd c; in t4_iq_free() local
4810 memset(&c, 0, sizeof(c)); in t4_iq_free()
4811 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_IQ_CMD) | FW_CMD_REQUEST_F | in t4_iq_free()
4814 c.alloc_to_len16 = htonl(FW_IQ_CMD_FREE_F | FW_LEN16(c)); in t4_iq_free()
4815 c.type_to_iqandstindex = htonl(FW_IQ_CMD_TYPE_V(iqtype)); in t4_iq_free()
4816 c.iqid = htons(iqid); in t4_iq_free()
4817 c.fl0id = htons(fl0id); in t4_iq_free()
4818 c.fl1id = htons(fl1id); in t4_iq_free()
4819 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_iq_free()
4835 struct fw_eq_eth_cmd c; in t4_eth_eq_free() local
4837 memset(&c, 0, sizeof(c)); in t4_eth_eq_free()
4838 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_EQ_ETH_CMD) | FW_CMD_REQUEST_F | in t4_eth_eq_free()
4841 c.alloc_to_len16 = htonl(FW_EQ_ETH_CMD_FREE_F | FW_LEN16(c)); in t4_eth_eq_free()
4842 c.eqid_pkd = htonl(FW_EQ_ETH_CMD_EQID_V(eqid)); in t4_eth_eq_free()
4843 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_eth_eq_free()
4859 struct fw_eq_ctrl_cmd c; in t4_ctrl_eq_free() local
4861 memset(&c, 0, sizeof(c)); in t4_ctrl_eq_free()
4862 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_EQ_CTRL_CMD) | FW_CMD_REQUEST_F | in t4_ctrl_eq_free()
4865 c.alloc_to_len16 = htonl(FW_EQ_CTRL_CMD_FREE_F | FW_LEN16(c)); in t4_ctrl_eq_free()
4866 c.cmpliqid_eqid = htonl(FW_EQ_CTRL_CMD_EQID_V(eqid)); in t4_ctrl_eq_free()
4867 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_ctrl_eq_free()
4883 struct fw_eq_ofld_cmd c; in t4_ofld_eq_free() local
4885 memset(&c, 0, sizeof(c)); in t4_ofld_eq_free()
4886 c.op_to_vfn = htonl(FW_CMD_OP_V(FW_EQ_OFLD_CMD) | FW_CMD_REQUEST_F | in t4_ofld_eq_free()
4889 c.alloc_to_len16 = htonl(FW_EQ_OFLD_CMD_FREE_F | FW_LEN16(c)); in t4_ofld_eq_free()
4890 c.eqid_pkd = htonl(FW_EQ_OFLD_CMD_EQID_V(eqid)); in t4_ofld_eq_free()
4891 return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); in t4_ofld_eq_free()
5380 struct fw_port_cmd c; in t4_port_init() local
5383 memset(&c, 0, sizeof(c)); in t4_port_init()
5393 c.op_to_portid = htonl(FW_CMD_OP_V(FW_PORT_CMD) | in t4_port_init()
5396 c.action_to_len16 = htonl( in t4_port_init()
5398 FW_LEN16(c)); in t4_port_init()
5399 ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); in t4_port_init()
5414 ret = ntohl(c.u.info.lstatus_to_modtype); in t4_port_init()
5429 init_link_config(&p->link_cfg, ntohs(c.u.info.pcap)); in t4_port_init()