Lines Matching full:channel
52 * of data to or from the IPA. A channel is implemented as a ring buffer,
59 * one or more TREs to a channel, the writer (either the IPA or an EE) writes
63 * Each channel has a GSI "event ring" associated with it. An event ring
64 * is implemented very much like a channel ring, but is always directed from
65 * the IPA to an EE. The IPA notifies an EE (such as the AP) about channel
66 * events by adding an entry to the event ring associated with the channel.
69 * to the channel TRE whose completion the event represents.
71 * Each TRE in a channel ring has a set of flags. One flag indicates whether
73 * an interrupt) in the channel's event ring. Other flags allow transfer
76 * to signal completion of channel transfers.
78 * Elements in channel and event rings are completed (or consumed) strictly
116 * on a channel (in bytes). This determines the amount of prefetch
118 * the TLV FIFO for the channel.
121 * should update the channel doorbell. We configure this to equal
132 /** gsi_channel_scratch - channel scratch configuration area
153 /* Code assumes the size of channel and event ring element are in gsi_validate_build()
166 /* Return the channel id associated with a given channel */
167 static u32 gsi_channel_id(struct gsi_channel *channel) in gsi_channel_id() argument
169 return channel - &channel->gsi->channel[0]; in gsi_channel_id()
172 /* An initialized channel has a non-null GSI pointer */
173 static bool gsi_channel_initialized(struct gsi_channel *channel) in gsi_channel_initialized() argument
175 return !!channel->gsi; in gsi_channel_initialized()
178 /* Encode the channel protocol for the CH_C_CNTXT_0 register */
246 /* Channel commands are performed one at a time. Their completion is
247 * signaled by the channel control GSI interrupt type, which is only
248 * enabled when we issue a channel command. Only the channel being
269 /* Disable channel control interrupts */
292 /* Enable the interrupt type if this is the first channel enabled */ in gsi_irq_ieob_enable_one()
304 /* Disable the interrupt type if this was the last enabled channel */ in gsi_irq_ieob_disable()
508 /* Fetch the current state of a channel from hardware */
509 static enum gsi_channel_state gsi_channel_state(struct gsi_channel *channel) in gsi_channel_state() argument
511 const struct reg *reg = gsi_reg(channel->gsi, CH_C_CNTXT_0); in gsi_channel_state()
512 u32 channel_id = gsi_channel_id(channel); in gsi_channel_state()
513 struct gsi *gsi = channel->gsi; in gsi_channel_state()
523 /* Issue a channel command and wait for it to complete */
525 gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode) in gsi_channel_command() argument
527 u32 channel_id = gsi_channel_id(channel); in gsi_channel_command()
528 struct gsi *gsi = channel->gsi; in gsi_channel_command()
548 dev_err(dev, "GSI command %u for channel %u timed out, state %u\n", in gsi_channel_command()
549 opcode, channel_id, gsi_channel_state(channel)); in gsi_channel_command()
552 /* Allocate GSI channel in NOT_ALLOCATED state */
555 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_alloc_command() local
559 /* Get initial channel state */ in gsi_channel_alloc_command()
560 state = gsi_channel_state(channel); in gsi_channel_alloc_command()
562 dev_err(dev, "channel %u bad state %u before alloc\n", in gsi_channel_alloc_command()
567 gsi_channel_command(channel, GSI_CH_ALLOCATE); in gsi_channel_alloc_command()
569 /* If successful the channel state will have changed */ in gsi_channel_alloc_command()
570 state = gsi_channel_state(channel); in gsi_channel_alloc_command()
574 dev_err(dev, "channel %u bad state %u after alloc\n", in gsi_channel_alloc_command()
580 /* Start an ALLOCATED channel */
581 static int gsi_channel_start_command(struct gsi_channel *channel) in gsi_channel_start_command() argument
583 struct device *dev = channel->gsi->dev; in gsi_channel_start_command()
586 state = gsi_channel_state(channel); in gsi_channel_start_command()
589 dev_err(dev, "channel %u bad state %u before start\n", in gsi_channel_start_command()
590 gsi_channel_id(channel), state); in gsi_channel_start_command()
594 gsi_channel_command(channel, GSI_CH_START); in gsi_channel_start_command()
596 /* If successful the channel state will have changed */ in gsi_channel_start_command()
597 state = gsi_channel_state(channel); in gsi_channel_start_command()
601 dev_err(dev, "channel %u bad state %u after start\n", in gsi_channel_start_command()
602 gsi_channel_id(channel), state); in gsi_channel_start_command()
607 /* Stop a GSI channel in STARTED state */
608 static int gsi_channel_stop_command(struct gsi_channel *channel) in gsi_channel_stop_command() argument
610 struct device *dev = channel->gsi->dev; in gsi_channel_stop_command()
613 state = gsi_channel_state(channel); in gsi_channel_stop_command()
615 /* Channel could have entered STOPPED state since last call in gsi_channel_stop_command()
623 dev_err(dev, "channel %u bad state %u before stop\n", in gsi_channel_stop_command()
624 gsi_channel_id(channel), state); in gsi_channel_stop_command()
628 gsi_channel_command(channel, GSI_CH_STOP); in gsi_channel_stop_command()
630 /* If successful the channel state will have changed */ in gsi_channel_stop_command()
631 state = gsi_channel_state(channel); in gsi_channel_stop_command()
639 dev_err(dev, "channel %u bad state %u after stop\n", in gsi_channel_stop_command()
640 gsi_channel_id(channel), state); in gsi_channel_stop_command()
645 /* Reset a GSI channel in ALLOCATED or ERROR state. */
646 static void gsi_channel_reset_command(struct gsi_channel *channel) in gsi_channel_reset_command() argument
648 struct device *dev = channel->gsi->dev; in gsi_channel_reset_command()
654 state = gsi_channel_state(channel); in gsi_channel_reset_command()
657 /* No need to reset a channel already in ALLOCATED state */ in gsi_channel_reset_command()
659 dev_err(dev, "channel %u bad state %u before reset\n", in gsi_channel_reset_command()
660 gsi_channel_id(channel), state); in gsi_channel_reset_command()
664 gsi_channel_command(channel, GSI_CH_RESET); in gsi_channel_reset_command()
666 /* If successful the channel state will have changed */ in gsi_channel_reset_command()
667 state = gsi_channel_state(channel); in gsi_channel_reset_command()
669 dev_err(dev, "channel %u bad state %u after reset\n", in gsi_channel_reset_command()
670 gsi_channel_id(channel), state); in gsi_channel_reset_command()
673 /* Deallocate an ALLOCATED GSI channel */
676 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_de_alloc_command() local
680 state = gsi_channel_state(channel); in gsi_channel_de_alloc_command()
682 dev_err(dev, "channel %u bad state %u before dealloc\n", in gsi_channel_de_alloc_command()
687 gsi_channel_command(channel, GSI_CH_DE_ALLOC); in gsi_channel_de_alloc_command()
689 /* If successful the channel state will have changed */ in gsi_channel_de_alloc_command()
690 state = gsi_channel_state(channel); in gsi_channel_de_alloc_command()
693 dev_err(dev, "channel %u bad state %u after dealloc\n", in gsi_channel_de_alloc_command()
750 val |= reg_encode(reg, EV_MODC, 1); /* comes from channel */ in gsi_evt_ring_program()
775 /* Find the transaction whose completion indicates a channel is quiesced */
776 static struct gsi_trans *gsi_channel_trans_last(struct gsi_channel *channel) in gsi_channel_trans_last() argument
778 struct gsi_trans_info *trans_info = &channel->trans_info; in gsi_channel_trans_last()
783 if (channel->toward_ipa && pending_id != trans_info->free_id) { in gsi_channel_trans_last()
803 trans = &trans_info->trans[trans_id % channel->tre_count]; in gsi_channel_trans_last()
809 /* Wait for transaction activity on a channel to complete */
810 static void gsi_channel_trans_quiesce(struct gsi_channel *channel) in gsi_channel_trans_quiesce() argument
815 trans = gsi_channel_trans_last(channel); in gsi_channel_trans_quiesce()
822 /* Program a channel for use; there is no gsi_channel_deprogram() */
823 static void gsi_channel_program(struct gsi_channel *channel, bool doorbell) in gsi_channel_program() argument
825 size_t size = channel->tre_ring.count * GSI_RING_ELEMENT_SIZE; in gsi_channel_program()
826 u32 channel_id = gsi_channel_id(channel); in gsi_channel_program()
829 struct gsi *gsi = channel->gsi; in gsi_channel_program()
839 if (channel->toward_ipa) in gsi_channel_program()
842 val |= reg_encode(reg, ERINDEX, channel->evt_ring_id); in gsi_channel_program()
849 val |= reg_encode(reg, CH_ERINDEX, channel->evt_ring_id); in gsi_channel_program()
853 * high-order 32 bits of the address of the channel ring, in gsi_channel_program()
857 val = lower_32_bits(channel->tre_ring.addr); in gsi_channel_program()
861 val = upper_32_bits(channel->tre_ring.addr); in gsi_channel_program()
866 /* Command channel gets low weighted round-robin priority */ in gsi_channel_program()
867 if (channel->command) in gsi_channel_program()
878 * on all but the AP command channel. in gsi_channel_program()
880 if (gsi->version >= IPA_VERSION_4_0 && !channel->command) { in gsi_channel_program()
895 gpi->max_outstanding_tre = channel->trans_tre_max * in gsi_channel_program()
924 static int __gsi_channel_start(struct gsi_channel *channel, bool resume) in __gsi_channel_start() argument
926 struct gsi *gsi = channel->gsi; in __gsi_channel_start()
935 ret = gsi_channel_start_command(channel); in __gsi_channel_start()
942 /* Start an allocated GSI channel */
945 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_start() local
949 napi_enable(&channel->napi); in gsi_channel_start()
950 gsi_irq_ieob_enable_one(gsi, channel->evt_ring_id); in gsi_channel_start()
952 ret = __gsi_channel_start(channel, false); in gsi_channel_start()
954 gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); in gsi_channel_start()
955 napi_disable(&channel->napi); in gsi_channel_start()
961 static int gsi_channel_stop_retry(struct gsi_channel *channel) in gsi_channel_stop_retry() argument
967 ret = gsi_channel_stop_command(channel); in gsi_channel_stop_retry()
976 static int __gsi_channel_stop(struct gsi_channel *channel, bool suspend) in __gsi_channel_stop() argument
978 struct gsi *gsi = channel->gsi; in __gsi_channel_stop()
982 gsi_channel_trans_quiesce(channel); in __gsi_channel_stop()
990 ret = gsi_channel_stop_retry(channel); in __gsi_channel_stop()
997 /* Stop a started channel */
1000 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_stop() local
1003 ret = __gsi_channel_stop(channel, false); in gsi_channel_stop()
1008 gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); in gsi_channel_stop()
1009 napi_disable(&channel->napi); in gsi_channel_stop()
1014 /* Reset and reconfigure a channel, (possibly) enabling the doorbell engine */
1017 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_reset() local
1021 gsi_channel_reset_command(channel); in gsi_channel_reset()
1023 if (gsi->version < IPA_VERSION_4_0 && !channel->toward_ipa) in gsi_channel_reset()
1024 gsi_channel_reset_command(channel); in gsi_channel_reset()
1027 channel->tre_ring.index = 0; in gsi_channel_reset()
1028 gsi_channel_program(channel, doorbell); in gsi_channel_reset()
1029 gsi_channel_trans_cancel_pending(channel); in gsi_channel_reset()
1034 /* Stop a started channel for suspend */
1037 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_suspend() local
1040 ret = __gsi_channel_stop(channel, true); in gsi_channel_suspend()
1045 napi_synchronize(&channel->napi); in gsi_channel_suspend()
1050 /* Resume a suspended channel (starting if stopped) */
1053 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_resume() local
1055 return __gsi_channel_start(channel, true); in gsi_channel_resume()
1072 struct gsi_channel *channel = &trans->gsi->channel[trans->channel_id]; in gsi_trans_tx_committed() local
1074 channel->trans_count++; in gsi_trans_tx_committed()
1075 channel->byte_count += trans->len; in gsi_trans_tx_committed()
1077 trans->trans_count = channel->trans_count; in gsi_trans_tx_committed()
1078 trans->byte_count = channel->byte_count; in gsi_trans_tx_committed()
1085 struct gsi_channel *channel; in gsi_trans_tx_queued() local
1089 channel = &gsi->channel[channel_id]; in gsi_trans_tx_queued()
1091 byte_count = channel->byte_count - channel->queued_byte_count; in gsi_trans_tx_queued()
1092 trans_count = channel->trans_count - channel->queued_trans_count; in gsi_trans_tx_queued()
1093 channel->queued_byte_count = channel->byte_count; in gsi_trans_tx_queued()
1094 channel->queued_trans_count = channel->trans_count; in gsi_trans_tx_queued()
1101 * @trans: TX channel transaction that has completed
1103 * Report that a transaction on a TX channel has completed. At the time a
1104 * transaction is committed, we record *in the transaction* its channel's
1106 * order, and the difference between the channel's byte/transaction count
1118 struct gsi_channel *channel; in gsi_trans_tx_completed() local
1122 channel = &gsi->channel[channel_id]; in gsi_trans_tx_completed()
1123 trans_count = trans->trans_count - channel->compl_trans_count; in gsi_trans_tx_completed()
1124 byte_count = trans->byte_count - channel->compl_byte_count; in gsi_trans_tx_completed()
1126 channel->compl_trans_count += trans_count; in gsi_trans_tx_completed()
1127 channel->compl_byte_count += byte_count; in gsi_trans_tx_completed()
1132 /* Channel control interrupt handler */
1174 /* Global channel error interrupt handler */
1179 dev_err(gsi->dev, "channel %u out of resources\n", channel_id); in gsi_isr_glob_chan_err()
1185 dev_err(gsi->dev, "channel %u global error ee 0x%08x code 0x%08x\n", in gsi_isr_glob_chan_err()
1195 u32 channel_id = gsi_channel_id(evt_ring->channel); in gsi_isr_glob_evt_err()
1198 dev_err(gsi->dev, "evt_ring for channel %u out of resources\n", in gsi_isr_glob_evt_err()
1254 * way of knowing whether a modem channel's state has been changed. in gsi_isr_gp_int1()
1256 * We also use GENERIC commands to enable/disable channel flow in gsi_isr_gp_int1()
1260 * when shutting down, but it's possible the channel isn't running in gsi_isr_gp_int1()
1262 * that case, but it's harmless (the channel is already halted). in gsi_isr_gp_int1()
1264 * on a channel because it's not in the proper state. in gsi_isr_gp_int1()
1337 napi_schedule(&gsi->evt_ring[evt_ring_id].channel->napi); in gsi_isr_ieob()
1439 struct gsi_channel *channel; in gsi_event_trans() local
1444 channel = &gsi->channel[channel_id]; in gsi_event_trans()
1445 if (WARN(!channel->gsi, "event has bad channel %u\n", channel_id)) in gsi_event_trans()
1450 tre_index = gsi_ring_index(&channel->tre_ring, tre_offset); in gsi_event_trans()
1452 trans = gsi_channel_trans_mapped(channel, tre_index); in gsi_event_trans()
1454 if (WARN(!trans, "channel %u event with no transaction\n", channel_id)) in gsi_event_trans()
1470 * When an event for a TX channel arrives we use information in the
1494 * transaction (and which channel) is associated with the event. in gsi_evt_ring_update()
1585 /* Ring a channel doorbell, reporting the first un-filled entry */
1586 void gsi_channel_doorbell(struct gsi_channel *channel) in gsi_channel_doorbell() argument
1588 struct gsi_ring *tre_ring = &channel->tre_ring; in gsi_channel_doorbell()
1589 u32 channel_id = gsi_channel_id(channel); in gsi_channel_doorbell()
1590 struct gsi *gsi = channel->gsi; in gsi_channel_doorbell()
1601 void gsi_channel_update(struct gsi_channel *channel) in gsi_channel_update() argument
1603 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_update()
1604 struct gsi *gsi = channel->gsi; in gsi_channel_update()
1638 * gsi_channel_poll_one() - Return a single completed transaction on a channel
1639 * @channel: Channel to be polled
1643 * This function returns the first of a channel's completed transactions.
1649 static struct gsi_trans *gsi_channel_poll_one(struct gsi_channel *channel) in gsi_channel_poll_one() argument
1654 trans = gsi_channel_trans_complete(channel); in gsi_channel_poll_one()
1662 * gsi_channel_poll() - NAPI poll function for a channel
1663 * @napi: NAPI structure for the channel
1675 struct gsi_channel *channel; in gsi_channel_poll() local
1678 channel = container_of(napi, struct gsi_channel, napi); in gsi_channel_poll()
1682 trans = gsi_channel_poll_one(channel); in gsi_channel_poll()
1689 gsi_irq_ieob_enable_one(channel->gsi, channel->evt_ring_id); in gsi_channel_poll()
1708 /* Setup function for a single channel */
1711 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_setup_one() local
1712 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_setup_one()
1715 if (!gsi_channel_initialized(channel)) in gsi_channel_setup_one()
1728 gsi_channel_program(channel, true); in gsi_channel_setup_one()
1730 if (channel->toward_ipa) in gsi_channel_setup_one()
1731 netif_napi_add_tx(gsi->dummy_dev, &channel->napi, in gsi_channel_setup_one()
1734 netif_napi_add(gsi->dummy_dev, &channel->napi, in gsi_channel_setup_one()
1749 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_teardown_one() local
1750 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_teardown_one()
1752 if (!gsi_channel_initialized(channel)) in gsi_channel_teardown_one()
1755 netif_napi_del(&channel->napi); in gsi_channel_teardown_one()
1763 * the ability to determine channel state for a modem channel, so we simply
1781 * channel), and only from this function. So we enable the GP_INT1 in gsi_generic_command()
1813 dev_err(gsi->dev, "GSI generic command %u to channel %u timed out\n", in gsi_generic_command()
1836 dev_err(gsi->dev, "error %d halting modem channel %u\n", in gsi_modem_channel_halt()
1840 /* Enable or disable flow control for a modem GSI TX channel (IPA v4.2+) */
1862 "error %d %sabling mode channel %u flow control\n", in gsi_modem_channel_flow_control()
1885 struct gsi_channel *channel = &gsi->channel[channel_id++]; in gsi_channel_setup() local
1887 if (!gsi_channel_initialized(channel)) in gsi_channel_setup()
1891 dev_err(gsi->dev, "channel %u not supported by hardware\n", in gsi_channel_setup()
2012 /* Get # supported channel and event rings; there is no gsi_ring_teardown() */
2110 /* Initialize a channel's event ring */
2111 static int gsi_channel_evt_ring_init(struct gsi_channel *channel) in gsi_channel_evt_ring_init() argument
2113 struct gsi *gsi = channel->gsi; in gsi_channel_evt_ring_init()
2120 channel->evt_ring_id = ret; in gsi_channel_evt_ring_init()
2122 evt_ring = &gsi->evt_ring[channel->evt_ring_id]; in gsi_channel_evt_ring_init()
2123 evt_ring->channel = channel; in gsi_channel_evt_ring_init()
2125 ret = gsi_ring_alloc(gsi, &evt_ring->ring, channel->event_count); in gsi_channel_evt_ring_init()
2129 dev_err(gsi->dev, "error %d allocating channel %u event ring\n", in gsi_channel_evt_ring_init()
2130 ret, gsi_channel_id(channel)); in gsi_channel_evt_ring_init()
2132 gsi_evt_ring_id_free(gsi, channel->evt_ring_id); in gsi_channel_evt_ring_init()
2138 static void gsi_channel_evt_ring_exit(struct gsi_channel *channel) in gsi_channel_evt_ring_exit() argument
2140 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_evt_ring_exit()
2141 struct gsi *gsi = channel->gsi; in gsi_channel_evt_ring_exit()
2156 /* Make sure channel ids are in the range driver supports */ in gsi_channel_data_valid()
2158 dev_err(dev, "bad channel id %u; must be less than %u\n", in gsi_channel_data_valid()
2169 dev_err(dev, "command channel %u is not TX\n", channel_id); in gsi_channel_data_valid()
2173 channel_data = &data->channel; in gsi_channel_data_valid()
2177 dev_err(dev, "channel %u bad tlv_count %u; must be 1..%u\n", in gsi_channel_data_valid()
2183 dev_err(dev, "command TRE max too big for channel %u (%u > %u)\n", in gsi_channel_data_valid()
2195 dev_err(dev, "channel %u TLV count %u exceeds TRE count %u\n", in gsi_channel_data_valid()
2202 dev_err(dev, "channel %u bad tre_count %u; not power of 2\n", in gsi_channel_data_valid()
2208 dev_err(dev, "channel %u bad event_count %u; not power of 2\n", in gsi_channel_data_valid()
2216 /* Init function for a single channel */
2221 struct gsi_channel *channel; in gsi_channel_init_one() local
2229 if (data->channel.tre_count > data->channel.event_count) { in gsi_channel_init_one()
2230 tre_count = data->channel.event_count; in gsi_channel_init_one()
2231 dev_warn(gsi->dev, "channel %u limited to %u TREs\n", in gsi_channel_init_one()
2234 tre_count = data->channel.tre_count; in gsi_channel_init_one()
2237 channel = &gsi->channel[data->channel_id]; in gsi_channel_init_one()
2238 memset(channel, 0, sizeof(*channel)); in gsi_channel_init_one()
2240 channel->gsi = gsi; in gsi_channel_init_one()
2241 channel->toward_ipa = data->toward_ipa; in gsi_channel_init_one()
2242 channel->command = command; in gsi_channel_init_one()
2243 channel->trans_tre_max = data->channel.tlv_count; in gsi_channel_init_one()
2244 channel->tre_count = tre_count; in gsi_channel_init_one()
2245 channel->event_count = data->channel.event_count; in gsi_channel_init_one()
2247 ret = gsi_channel_evt_ring_init(channel); in gsi_channel_init_one()
2251 ret = gsi_ring_alloc(gsi, &channel->tre_ring, data->channel.tre_count); in gsi_channel_init_one()
2253 dev_err(gsi->dev, "error %d allocating channel %u ring\n", in gsi_channel_init_one()
2265 ret = ipa_cmd_pool_init(channel, tre_max); in gsi_channel_init_one()
2270 gsi_channel_trans_exit(channel); in gsi_channel_init_one()
2272 gsi_ring_free(gsi, &channel->tre_ring); in gsi_channel_init_one()
2274 gsi_channel_evt_ring_exit(channel); in gsi_channel_init_one()
2276 channel->gsi = NULL; /* Mark it not (fully) initialized */ in gsi_channel_init_one()
2282 static void gsi_channel_exit_one(struct gsi_channel *channel) in gsi_channel_exit_one() argument
2284 if (!gsi_channel_initialized(channel)) in gsi_channel_exit_one()
2287 if (channel->command) in gsi_channel_exit_one()
2288 ipa_cmd_pool_exit(channel); in gsi_channel_exit_one()
2289 gsi_channel_trans_exit(channel); in gsi_channel_exit_one()
2290 gsi_ring_free(channel->gsi, &channel->tre_ring); in gsi_channel_exit_one()
2291 gsi_channel_evt_ring_exit(channel); in gsi_channel_exit_one()
2338 gsi_channel_exit_one(&gsi->channel[data->channel_id]); in gsi_channel_init()
2350 gsi_channel_exit_one(&gsi->channel[channel_id]); in gsi_channel_exit()
2368 * for the channel NAPI contexts to be associated with. in gsi_init()
2407 /* The maximum number of outstanding TREs on a channel. This limits
2408 * a channel's maximum number of transactions outstanding (worst case
2411 * The absolute limit is the number of TREs in the channel's TRE ring,
2429 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_tre_max() local
2431 /* Hardware limit is channel->tre_count - 1 */ in gsi_channel_tre_max()
2432 return channel->tre_count - (channel->trans_tre_max - 1); in gsi_channel_tre_max()