tcs 46 drivers/net/ethernet/aquantia/atlantic/aq_hw.h u8 tcs; tcs 66 drivers/net/ethernet/aquantia/atlantic/aq_nic.c cfg->tcs = AQ_CFG_TCS_DEF; tcs 47 drivers/net/ethernet/aquantia/atlantic/aq_nic.h u8 tcs; tcs 131 drivers/net/ethernet/aquantia/atlantic/aq_vec.c for (i = 0; i < aq_nic_cfg->tcs; ++i) { tcs 23 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c .tcs = HW_ATL_A0_TC_MAX, \ tcs 24 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c .tcs = HW_ATL_B0_TC_MAX, \ tcs 7882 drivers/net/ethernet/broadcom/bnxt/bnxt.c int tcs, i; tcs 7884 drivers/net/ethernet/broadcom/bnxt/bnxt.c tcs = netdev_get_num_tc(dev); tcs 7885 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (tcs) { tcs 7888 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < tcs; i++) { tcs 8136 drivers/net/ethernet/broadcom/bnxt/bnxt.c int tcs = netdev_get_num_tc(bp->dev); tcs 8159 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (tcs && (bp->tx_nr_rings_per_tc * tcs != bp->tx_nr_rings)) { tcs 10342 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, tcs 10350 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (tcs) tcs 10351 drivers/net/ethernet/broadcom/bnxt/bnxt.c tx_sets = tcs; tcs 1997 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, tcs 768 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c int max_rx_rings, max_tx_rings, tcs; tcs 788 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c tcs = netdev_get_num_tc(dev); tcs 789 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (tcs > 1) tcs 790 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c max_tx_rings /= tcs; tcs 811 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c int req_tx_rings, req_rx_rings, tcs; tcs 834 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c tcs = netdev_get_num_tc(dev); tcs 845 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_check_rings(bp, req_tx_rings, req_rx_rings, sh, tcs, tx_xdp); tcs 876 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (tcs > 1) tcs 877 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc * tcs + tx_xdp; tcs 1104 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c u8 tcs = netdev_get_num_tc(dev); tcs 1107 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c if (tcs > 1) tcs 1108 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c max_combined = BIT((fls(max_combined / tcs) - 1)); tcs 3092 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c u8 tcs = adapter->hw_tcs; tcs 3100 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c } else if (tcs > 1) { tcs 3105 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c } else if (tcs > 4) { tcs 25 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c u8 tcs = adapter->hw_tcs; tcs 28 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if (tcs <= 1) tcs 39 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if ((reg_idx & ~vmdq->mask) >= tcs) { tcs 50 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if ((reg_idx & ~vmdq->mask) >= tcs) tcs 61 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if (fcoe->offset < tcs) tcs 329 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c u8 tcs = adapter->hw_tcs; tcs 332 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if (tcs <= 1) tcs 340 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c vmdq_i = min_t(u16, vmdq_i, MAX_TX_QUEUES / tcs); tcs 346 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if (tcs > 4) { tcs 378 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c adapter->num_rx_queues_per_pool = tcs; tcs 380 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c adapter->num_tx_queues = vmdq_i * tcs; tcs 382 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c adapter->num_rx_queues = vmdq_i * tcs; tcs 396 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c fcoe->offset = vmdq_i * tcs; tcs 401 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c } else if (tcs > 1) { tcs 415 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c for (i = 0; i < tcs; i++) tcs 426 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c int tcs; tcs 429 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c tcs = adapter->hw_tcs; tcs 432 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if (tcs <= 1) tcs 436 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c rss_i = dev->num_tx_queues / tcs; tcs 441 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c } else if (tcs > 4) { tcs 475 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c for (i = 0; i < tcs; i++) tcs 478 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c adapter->num_tx_queues = rss_i * tcs; tcs 480 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c adapter->num_rx_queues = rss_i * tcs; tcs 840 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c u8 tcs = adapter->hw_tcs; tcs 845 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c if ((tcs <= 1) && !(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)) { tcs 3571 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c u8 tcs = adapter->hw_tcs; tcs 3584 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c if (tcs > 4) tcs 3586 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c else if (tcs > 1) tcs 3594 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c if (tcs > 4) { tcs 3596 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c } else if (tcs > 1) { tcs 3611 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c if (tcs) { tcs 3949 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c u8 tcs = adapter->hw_tcs; tcs 3952 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c if (tcs > 4) tcs 3954 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c else if (tcs > 1) tcs 3968 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c if (tcs > 4) tcs 3970 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c else if (tcs > 1) tcs 10068 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c int tcs = adapter->hw_tcs ? : 1; tcs 10096 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c adapter->num_rx_pools >= (MAX_TX_QUEUES / tcs)) || tcs 947 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c u8 tcs = adapter->hw_tcs; tcs 949 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c if (adapter->vfinfo[vf].pf_vlan || tcs) { tcs 47 drivers/scsi/aic94xx/aic94xx_tmf.c #define DECLARE_TCS(tcs) \ tcs 48 drivers/scsi/aic94xx/aic94xx_tmf.c struct tasklet_completion_status tcs = { \ tcs 59 drivers/scsi/aic94xx/aic94xx_tmf.c struct tasklet_completion_status *tcs = ascb->uldd_task; tcs 66 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->dl_opcode = dl->opcode; tcs 74 drivers/scsi/aic94xx/aic94xx_tmf.c struct tasklet_completion_status *tcs = ascb->uldd_task; tcs 77 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->dl_opcode = TMF_RESP_FUNC_FAILED; tcs 86 drivers/scsi/aic94xx/aic94xx_tmf.c DECLARE_TCS(tcs); \ tcs 95 drivers/scsi/aic94xx/aic94xx_tmf.c ascb->uldd_task = &tcs; \ tcs 107 drivers/scsi/aic94xx/aic94xx_tmf.c res = tcs.dl_opcode; \ tcs 248 drivers/scsi/aic94xx/aic94xx_tmf.c struct tasklet_completion_status *tcs = ascb->uldd_task; tcs 251 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->tmf_state = TMF_RESP_FUNC_FAILED; tcs 304 drivers/scsi/aic94xx/aic94xx_tmf.c struct tasklet_completion_status *tcs; tcs 309 drivers/scsi/aic94xx/aic94xx_tmf.c tcs = ascb->uldd_task; tcs 312 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->dl_opcode = dl->opcode; tcs 315 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->tmf_state = asd_get_tmf_resp_tasklet(ascb, dl); tcs 316 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->tag_valid = ascb->tag_valid; tcs 317 drivers/scsi/aic94xx/aic94xx_tmf.c tcs->tag = ascb->tag; tcs 395 drivers/scsi/aic94xx/aic94xx_tmf.c DECLARE_TCS(tcs); tcs 414 drivers/scsi/aic94xx/aic94xx_tmf.c ascb->uldd_task = &tcs; tcs 462 drivers/scsi/aic94xx/aic94xx_tmf.c tascb->tag = tcs.tag; tcs 463 drivers/scsi/aic94xx/aic94xx_tmf.c tascb->tag_valid = tcs.tag_valid; tcs 474 drivers/scsi/aic94xx/aic94xx_tmf.c if (tcs.dl_opcode == TC_SSP_RESP) { tcs 477 drivers/scsi/aic94xx/aic94xx_tmf.c if (tcs.tmf_state == TMF_RESP_FUNC_COMPLETE) tcs 480 drivers/scsi/aic94xx/aic94xx_tmf.c res = tcs.tmf_state; tcs 481 drivers/scsi/aic94xx/aic94xx_tmf.c } else if (tcs.dl_opcode == TC_NO_ERROR && tcs 482 drivers/scsi/aic94xx/aic94xx_tmf.c tcs.tmf_state == TMF_RESP_FUNC_FAILED) { tcs 490 drivers/scsi/aic94xx/aic94xx_tmf.c switch (tcs.dl_opcode) { tcs 564 drivers/scsi/aic94xx/aic94xx_tmf.c DECLARE_TCS(tcs); tcs 574 drivers/scsi/aic94xx/aic94xx_tmf.c ascb->uldd_task = &tcs; tcs 609 drivers/scsi/aic94xx/aic94xx_tmf.c switch (tcs.dl_opcode) { tcs 629 drivers/scsi/aic94xx/aic94xx_tmf.c res = tcs.dl_opcode; tcs 101 drivers/soc/qcom/rpmh-internal.h struct tcs_group tcs[TCS_TYPE_NR]; tcs 102 drivers/soc/qcom/rpmh-rsc.c return &drv->tcs[type]; tcs 108 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 110 drivers/soc/qcom/rpmh-rsc.c tcs = get_tcs_of_type(drv, type); tcs 112 drivers/soc/qcom/rpmh-rsc.c spin_lock(&tcs->lock); tcs 113 drivers/soc/qcom/rpmh-rsc.c if (bitmap_empty(tcs->slots, MAX_TCS_SLOTS)) { tcs 114 drivers/soc/qcom/rpmh-rsc.c spin_unlock(&tcs->lock); tcs 118 drivers/soc/qcom/rpmh-rsc.c for (m = tcs->offset; m < tcs->offset + tcs->num_tcs; m++) { tcs 120 drivers/soc/qcom/rpmh-rsc.c spin_unlock(&tcs->lock); tcs 126 drivers/soc/qcom/rpmh-rsc.c bitmap_zero(tcs->slots, MAX_TCS_SLOTS); tcs 127 drivers/soc/qcom/rpmh-rsc.c spin_unlock(&tcs->lock); tcs 152 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 176 drivers/soc/qcom/rpmh-rsc.c tcs = get_tcs_of_type(drv, type); tcs 177 drivers/soc/qcom/rpmh-rsc.c if (msg->state == RPMH_ACTIVE_ONLY_STATE && !tcs->num_tcs) { tcs 178 drivers/soc/qcom/rpmh-rsc.c tcs = get_tcs_of_type(drv, WAKE_TCS); tcs 179 drivers/soc/qcom/rpmh-rsc.c if (tcs->num_tcs) { tcs 186 drivers/soc/qcom/rpmh-rsc.c return tcs; tcs 192 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 196 drivers/soc/qcom/rpmh-rsc.c tcs = &drv->tcs[i]; tcs 197 drivers/soc/qcom/rpmh-rsc.c if (tcs->mask & BIT(tcs_id)) tcs 198 drivers/soc/qcom/rpmh-rsc.c return tcs->req[tcs_id - tcs->offset]; tcs 310 drivers/soc/qcom/rpmh-rsc.c static int check_for_req_inflight(struct rsc_drv *drv, struct tcs_group *tcs, tcs 316 drivers/soc/qcom/rpmh-rsc.c int tcs_id = tcs->offset; tcs 318 drivers/soc/qcom/rpmh-rsc.c for (i = 0; i < tcs->num_tcs; i++, tcs_id++) { tcs 336 drivers/soc/qcom/rpmh-rsc.c static int find_free_tcs(struct tcs_group *tcs) tcs 340 drivers/soc/qcom/rpmh-rsc.c for (i = 0; i < tcs->num_tcs; i++) { tcs 341 drivers/soc/qcom/rpmh-rsc.c if (tcs_is_free(tcs->drv, tcs->offset + i)) tcs 342 drivers/soc/qcom/rpmh-rsc.c return tcs->offset + i; tcs 350 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 355 drivers/soc/qcom/rpmh-rsc.c tcs = get_tcs_for_msg(drv, msg); tcs 356 drivers/soc/qcom/rpmh-rsc.c if (IS_ERR(tcs)) tcs 357 drivers/soc/qcom/rpmh-rsc.c return PTR_ERR(tcs); tcs 359 drivers/soc/qcom/rpmh-rsc.c spin_lock_irqsave(&tcs->lock, flags); tcs 365 drivers/soc/qcom/rpmh-rsc.c ret = check_for_req_inflight(drv, tcs, msg); tcs 371 drivers/soc/qcom/rpmh-rsc.c tcs_id = find_free_tcs(tcs); tcs 378 drivers/soc/qcom/rpmh-rsc.c tcs->req[tcs_id - tcs->offset] = msg; tcs 386 drivers/soc/qcom/rpmh-rsc.c spin_unlock_irqrestore(&tcs->lock, flags); tcs 422 drivers/soc/qcom/rpmh-rsc.c static int find_match(const struct tcs_group *tcs, const struct tcs_cmd *cmd, tcs 428 drivers/soc/qcom/rpmh-rsc.c for_each_set_bit(i, tcs->slots, MAX_TCS_SLOTS) { tcs 429 drivers/soc/qcom/rpmh-rsc.c if (tcs->cmd_cache[i] != cmd[0].addr) tcs 431 drivers/soc/qcom/rpmh-rsc.c if (i + len >= tcs->num_tcs * tcs->ncpt) tcs 434 drivers/soc/qcom/rpmh-rsc.c if (tcs->cmd_cache[i + j] != cmd[j].addr) tcs 447 drivers/soc/qcom/rpmh-rsc.c static int find_slots(struct tcs_group *tcs, const struct tcs_request *msg, tcs 454 drivers/soc/qcom/rpmh-rsc.c slot = find_match(tcs, msg->cmds, msg->num_cmds); tcs 460 drivers/soc/qcom/rpmh-rsc.c slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS, tcs 462 drivers/soc/qcom/rpmh-rsc.c if (slot >= tcs->num_tcs * tcs->ncpt) tcs 464 drivers/soc/qcom/rpmh-rsc.c i += tcs->ncpt; tcs 468 drivers/soc/qcom/rpmh-rsc.c bitmap_set(tcs->slots, slot, msg->num_cmds); tcs 471 drivers/soc/qcom/rpmh-rsc.c tcs->cmd_cache[slot + i] = msg->cmds[i].addr; tcs 473 drivers/soc/qcom/rpmh-rsc.c offset = slot / tcs->ncpt; tcs 474 drivers/soc/qcom/rpmh-rsc.c *tcs_id = offset + tcs->offset; tcs 475 drivers/soc/qcom/rpmh-rsc.c *cmd_id = slot % tcs->ncpt; tcs 482 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 487 drivers/soc/qcom/rpmh-rsc.c tcs = get_tcs_for_msg(drv, msg); tcs 488 drivers/soc/qcom/rpmh-rsc.c if (IS_ERR(tcs)) tcs 489 drivers/soc/qcom/rpmh-rsc.c return PTR_ERR(tcs); tcs 491 drivers/soc/qcom/rpmh-rsc.c spin_lock_irqsave(&tcs->lock, flags); tcs 493 drivers/soc/qcom/rpmh-rsc.c ret = find_slots(tcs, msg, &tcs_id, &cmd_id); tcs 496 drivers/soc/qcom/rpmh-rsc.c spin_unlock_irqrestore(&tcs->lock, flags); tcs 534 drivers/soc/qcom/rpmh-rsc.c struct tcs_group *tcs; tcs 580 drivers/soc/qcom/rpmh-rsc.c tcs = &drv->tcs[tcs_cfg[i].type]; tcs 581 drivers/soc/qcom/rpmh-rsc.c if (tcs->drv) tcs 583 drivers/soc/qcom/rpmh-rsc.c tcs->drv = drv; tcs 584 drivers/soc/qcom/rpmh-rsc.c tcs->type = tcs_cfg[i].type; tcs 585 drivers/soc/qcom/rpmh-rsc.c tcs->num_tcs = tcs_cfg[i].n; tcs 586 drivers/soc/qcom/rpmh-rsc.c tcs->ncpt = ncpt; tcs 587 drivers/soc/qcom/rpmh-rsc.c spin_lock_init(&tcs->lock); tcs 589 drivers/soc/qcom/rpmh-rsc.c if (!tcs->num_tcs || tcs->type == CONTROL_TCS) tcs 592 drivers/soc/qcom/rpmh-rsc.c if (st + tcs->num_tcs > max_tcs || tcs 593 drivers/soc/qcom/rpmh-rsc.c st + tcs->num_tcs >= BITS_PER_BYTE * sizeof(tcs->mask)) tcs 596 drivers/soc/qcom/rpmh-rsc.c tcs->mask = ((1 << tcs->num_tcs) - 1) << st; tcs 597 drivers/soc/qcom/rpmh-rsc.c tcs->offset = st; tcs 598 drivers/soc/qcom/rpmh-rsc.c st += tcs->num_tcs; tcs 604 drivers/soc/qcom/rpmh-rsc.c if (tcs->type == ACTIVE_TCS) tcs 607 drivers/soc/qcom/rpmh-rsc.c tcs->cmd_cache = devm_kcalloc(&pdev->dev, tcs 608 drivers/soc/qcom/rpmh-rsc.c tcs->num_tcs * ncpt, sizeof(u32), tcs 610 drivers/soc/qcom/rpmh-rsc.c if (!tcs->cmd_cache) tcs 667 drivers/soc/qcom/rpmh-rsc.c write_tcs_reg(drv, RSC_DRV_IRQ_ENABLE, 0, drv->tcs[ACTIVE_TCS].mask);