Lines Matching full:channel

54  * of data to or from the IPA.  A channel is implemented as a ring buffer,
61 * one or more TREs to a channel, the writer (either the IPA or an EE) writes
65 * Each channel has a GSI "event ring" associated with it. An event ring
66 * is implemented very much like a channel ring, but is always directed from
67 * the IPA to an EE. The IPA notifies an EE (such as the AP) about channel
68 * events by adding an entry to the event ring associated with the channel.
71 * to the channel TRE whose completion the event represents.
73 * Each TRE in a channel ring has a set of flags. One flag indicates whether
75 * an interrupt) in the channel's event ring. Other flags allow transfer
78 * to signal completion of channel transfers.
80 * Elements in channel and event rings are completed (or consumed) strictly
118 * on a channel (in bytes). This determines the amount of prefetch
120 * the TLV FIFO for the channel.
123 * should update the channel doorbell. We configure this to equal
134 /** gsi_channel_scratch - channel scratch configuration area
155 /* Code assumes the size of channel and event ring element are in gsi_validate_build()
168 /* Return the channel id associated with a given channel */
169 static u32 gsi_channel_id(struct gsi_channel *channel) in gsi_channel_id() argument
171 return channel - &channel->gsi->channel[0]; in gsi_channel_id()
174 /* An initialized channel has a non-null GSI pointer */
175 static bool gsi_channel_initialized(struct gsi_channel *channel) in gsi_channel_initialized() argument
177 return !!channel->gsi; in gsi_channel_initialized()
180 /* Encode the channel protocol for the CH_C_CNTXT_0 register */
248 /* Channel commands are performed one at a time. Their completion is
249 * signaled by the channel control GSI interrupt type, which is only
250 * enabled when we issue a channel command. Only the channel being
271 /* Disable channel control interrupts */
294 /* Enable the interrupt type if this is the first channel enabled */ in gsi_irq_ieob_enable_one()
306 /* Disable the interrupt type if this was the last enabled channel */ in gsi_irq_ieob_disable()
510 /* Fetch the current state of a channel from hardware */
511 static enum gsi_channel_state gsi_channel_state(struct gsi_channel *channel) in gsi_channel_state() argument
513 const struct reg *reg = gsi_reg(channel->gsi, CH_C_CNTXT_0); in gsi_channel_state()
514 u32 channel_id = gsi_channel_id(channel); in gsi_channel_state()
515 struct gsi *gsi = channel->gsi; in gsi_channel_state()
525 /* Issue a channel command and wait for it to complete */
527 gsi_channel_command(struct gsi_channel *channel, enum gsi_ch_cmd_opcode opcode) in gsi_channel_command() argument
529 u32 channel_id = gsi_channel_id(channel); in gsi_channel_command()
530 struct gsi *gsi = channel->gsi; in gsi_channel_command()
550 dev_err(dev, "GSI command %u for channel %u timed out, state %u\n", in gsi_channel_command()
551 opcode, channel_id, gsi_channel_state(channel)); in gsi_channel_command()
554 /* Allocate GSI channel in NOT_ALLOCATED state */
557 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_alloc_command() local
561 /* Get initial channel state */ in gsi_channel_alloc_command()
562 state = gsi_channel_state(channel); in gsi_channel_alloc_command()
564 dev_err(dev, "channel %u bad state %u before alloc\n", in gsi_channel_alloc_command()
569 gsi_channel_command(channel, GSI_CH_ALLOCATE); in gsi_channel_alloc_command()
571 /* If successful the channel state will have changed */ in gsi_channel_alloc_command()
572 state = gsi_channel_state(channel); in gsi_channel_alloc_command()
576 dev_err(dev, "channel %u bad state %u after alloc\n", in gsi_channel_alloc_command()
582 /* Start an ALLOCATED channel */
583 static int gsi_channel_start_command(struct gsi_channel *channel) in gsi_channel_start_command() argument
585 struct device *dev = channel->gsi->dev; in gsi_channel_start_command()
588 state = gsi_channel_state(channel); in gsi_channel_start_command()
591 dev_err(dev, "channel %u bad state %u before start\n", in gsi_channel_start_command()
592 gsi_channel_id(channel), state); in gsi_channel_start_command()
596 gsi_channel_command(channel, GSI_CH_START); in gsi_channel_start_command()
598 /* If successful the channel state will have changed */ in gsi_channel_start_command()
599 state = gsi_channel_state(channel); in gsi_channel_start_command()
603 dev_err(dev, "channel %u bad state %u after start\n", in gsi_channel_start_command()
604 gsi_channel_id(channel), state); in gsi_channel_start_command()
609 /* Stop a GSI channel in STARTED state */
610 static int gsi_channel_stop_command(struct gsi_channel *channel) in gsi_channel_stop_command() argument
612 struct device *dev = channel->gsi->dev; in gsi_channel_stop_command()
615 state = gsi_channel_state(channel); in gsi_channel_stop_command()
617 /* Channel could have entered STOPPED state since last call in gsi_channel_stop_command()
625 dev_err(dev, "channel %u bad state %u before stop\n", in gsi_channel_stop_command()
626 gsi_channel_id(channel), state); in gsi_channel_stop_command()
630 gsi_channel_command(channel, GSI_CH_STOP); in gsi_channel_stop_command()
632 /* If successful the channel state will have changed */ in gsi_channel_stop_command()
633 state = gsi_channel_state(channel); in gsi_channel_stop_command()
641 dev_err(dev, "channel %u bad state %u after stop\n", in gsi_channel_stop_command()
642 gsi_channel_id(channel), state); in gsi_channel_stop_command()
647 /* Reset a GSI channel in ALLOCATED or ERROR state. */
648 static void gsi_channel_reset_command(struct gsi_channel *channel) in gsi_channel_reset_command() argument
650 struct device *dev = channel->gsi->dev; in gsi_channel_reset_command()
656 state = gsi_channel_state(channel); in gsi_channel_reset_command()
659 /* No need to reset a channel already in ALLOCATED state */ in gsi_channel_reset_command()
661 dev_err(dev, "channel %u bad state %u before reset\n", in gsi_channel_reset_command()
662 gsi_channel_id(channel), state); in gsi_channel_reset_command()
666 gsi_channel_command(channel, GSI_CH_RESET); in gsi_channel_reset_command()
668 /* If successful the channel state will have changed */ in gsi_channel_reset_command()
669 state = gsi_channel_state(channel); in gsi_channel_reset_command()
671 dev_err(dev, "channel %u bad state %u after reset\n", in gsi_channel_reset_command()
672 gsi_channel_id(channel), state); in gsi_channel_reset_command()
675 /* Deallocate an ALLOCATED GSI channel */
678 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_de_alloc_command() local
682 state = gsi_channel_state(channel); in gsi_channel_de_alloc_command()
684 dev_err(dev, "channel %u bad state %u before dealloc\n", in gsi_channel_de_alloc_command()
689 gsi_channel_command(channel, GSI_CH_DE_ALLOC); in gsi_channel_de_alloc_command()
691 /* If successful the channel state will have changed */ in gsi_channel_de_alloc_command()
692 state = gsi_channel_state(channel); in gsi_channel_de_alloc_command()
695 dev_err(dev, "channel %u bad state %u after dealloc\n", in gsi_channel_de_alloc_command()
752 val |= reg_encode(reg, EV_MODC, 1); /* comes from channel */ in gsi_evt_ring_program()
777 /* Find the transaction whose completion indicates a channel is quiesced */
778 static struct gsi_trans *gsi_channel_trans_last(struct gsi_channel *channel) in gsi_channel_trans_last() argument
780 struct gsi_trans_info *trans_info = &channel->trans_info; in gsi_channel_trans_last()
785 if (channel->toward_ipa && pending_id != trans_info->free_id) { in gsi_channel_trans_last()
805 trans = &trans_info->trans[trans_id % channel->tre_count]; in gsi_channel_trans_last()
811 /* Wait for transaction activity on a channel to complete */
812 static void gsi_channel_trans_quiesce(struct gsi_channel *channel) in gsi_channel_trans_quiesce() argument
817 trans = gsi_channel_trans_last(channel); in gsi_channel_trans_quiesce()
824 /* Program a channel for use; there is no gsi_channel_deprogram() */
825 static void gsi_channel_program(struct gsi_channel *channel, bool doorbell) in gsi_channel_program() argument
827 size_t size = channel->tre_ring.count * GSI_RING_ELEMENT_SIZE; in gsi_channel_program()
828 u32 channel_id = gsi_channel_id(channel); in gsi_channel_program()
831 struct gsi *gsi = channel->gsi; in gsi_channel_program()
841 if (channel->toward_ipa) in gsi_channel_program()
844 val |= reg_encode(reg, ERINDEX, channel->evt_ring_id); in gsi_channel_program()
851 val |= reg_encode(reg, CH_ERINDEX, channel->evt_ring_id); in gsi_channel_program()
855 * high-order 32 bits of the address of the channel ring, in gsi_channel_program()
859 val = lower_32_bits(channel->tre_ring.addr); in gsi_channel_program()
863 val = upper_32_bits(channel->tre_ring.addr); in gsi_channel_program()
868 /* Command channel gets low weighted round-robin priority */ in gsi_channel_program()
869 if (channel->command) in gsi_channel_program()
880 * on all but the AP command channel. in gsi_channel_program()
882 if (gsi->version >= IPA_VERSION_4_0 && !channel->command) { in gsi_channel_program()
897 gpi->max_outstanding_tre = channel->trans_tre_max * in gsi_channel_program()
926 static int __gsi_channel_start(struct gsi_channel *channel, bool resume) in __gsi_channel_start() argument
928 struct gsi *gsi = channel->gsi; in __gsi_channel_start()
937 ret = gsi_channel_start_command(channel); in __gsi_channel_start()
944 /* Start an allocated GSI channel */
947 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_start() local
951 napi_enable(&channel->napi); in gsi_channel_start()
952 gsi_irq_ieob_enable_one(gsi, channel->evt_ring_id); in gsi_channel_start()
954 ret = __gsi_channel_start(channel, false); in gsi_channel_start()
956 gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); in gsi_channel_start()
957 napi_disable(&channel->napi); in gsi_channel_start()
963 static int gsi_channel_stop_retry(struct gsi_channel *channel) in gsi_channel_stop_retry() argument
969 ret = gsi_channel_stop_command(channel); in gsi_channel_stop_retry()
978 static int __gsi_channel_stop(struct gsi_channel *channel, bool suspend) in __gsi_channel_stop() argument
980 struct gsi *gsi = channel->gsi; in __gsi_channel_stop()
984 gsi_channel_trans_quiesce(channel); in __gsi_channel_stop()
992 ret = gsi_channel_stop_retry(channel); in __gsi_channel_stop()
999 /* Stop a started channel */
1002 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_stop() local
1005 ret = __gsi_channel_stop(channel, false); in gsi_channel_stop()
1010 gsi_irq_ieob_disable_one(gsi, channel->evt_ring_id); in gsi_channel_stop()
1011 napi_disable(&channel->napi); in gsi_channel_stop()
1016 /* Reset and reconfigure a channel, (possibly) enabling the doorbell engine */
1019 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_reset() local
1023 gsi_channel_reset_command(channel); in gsi_channel_reset()
1025 if (gsi->version < IPA_VERSION_4_0 && !channel->toward_ipa) in gsi_channel_reset()
1026 gsi_channel_reset_command(channel); in gsi_channel_reset()
1029 channel->tre_ring.index = 0; in gsi_channel_reset()
1030 gsi_channel_program(channel, doorbell); in gsi_channel_reset()
1031 gsi_channel_trans_cancel_pending(channel); in gsi_channel_reset()
1036 /* Stop a started channel for suspend */
1039 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_suspend() local
1042 ret = __gsi_channel_stop(channel, true); in gsi_channel_suspend()
1047 napi_synchronize(&channel->napi); in gsi_channel_suspend()
1052 /* Resume a suspended channel (starting if stopped) */
1055 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_resume() local
1057 return __gsi_channel_start(channel, true); in gsi_channel_resume()
1074 struct gsi_channel *channel = &trans->gsi->channel[trans->channel_id]; in gsi_trans_tx_committed() local
1076 channel->trans_count++; in gsi_trans_tx_committed()
1077 channel->byte_count += trans->len; in gsi_trans_tx_committed()
1079 trans->trans_count = channel->trans_count; in gsi_trans_tx_committed()
1080 trans->byte_count = channel->byte_count; in gsi_trans_tx_committed()
1087 struct gsi_channel *channel; in gsi_trans_tx_queued() local
1091 channel = &gsi->channel[channel_id]; in gsi_trans_tx_queued()
1093 byte_count = channel->byte_count - channel->queued_byte_count; in gsi_trans_tx_queued()
1094 trans_count = channel->trans_count - channel->queued_trans_count; in gsi_trans_tx_queued()
1095 channel->queued_byte_count = channel->byte_count; in gsi_trans_tx_queued()
1096 channel->queued_trans_count = channel->trans_count; in gsi_trans_tx_queued()
1103 * @trans: TX channel transaction that has completed
1105 * Report that a transaction on a TX channel has completed. At the time a
1106 * transaction is committed, we record *in the transaction* its channel's
1108 * order, and the difference between the channel's byte/transaction count
1120 struct gsi_channel *channel; in gsi_trans_tx_completed() local
1124 channel = &gsi->channel[channel_id]; in gsi_trans_tx_completed()
1125 trans_count = trans->trans_count - channel->compl_trans_count; in gsi_trans_tx_completed()
1126 byte_count = trans->byte_count - channel->compl_byte_count; in gsi_trans_tx_completed()
1128 channel->compl_trans_count += trans_count; in gsi_trans_tx_completed()
1129 channel->compl_byte_count += byte_count; in gsi_trans_tx_completed()
1134 /* Channel control interrupt handler */
1176 /* Global channel error interrupt handler */
1181 dev_err(gsi->dev, "channel %u out of resources\n", channel_id); in gsi_isr_glob_chan_err()
1187 dev_err(gsi->dev, "channel %u global error ee 0x%08x code 0x%08x\n", in gsi_isr_glob_chan_err()
1197 u32 channel_id = gsi_channel_id(evt_ring->channel); in gsi_isr_glob_evt_err()
1200 dev_err(gsi->dev, "evt_ring for channel %u out of resources\n", in gsi_isr_glob_evt_err()
1256 * way of knowing whether a modem channel's state has been changed. in gsi_isr_gp_int1()
1258 * We also use GENERIC commands to enable/disable channel flow in gsi_isr_gp_int1()
1262 * when shutting down, but it's possible the channel isn't running in gsi_isr_gp_int1()
1264 * that case, but it's harmless (the channel is already halted). in gsi_isr_gp_int1()
1266 * on a channel because it's not in the proper state. in gsi_isr_gp_int1()
1339 napi_schedule(&gsi->evt_ring[evt_ring_id].channel->napi); in gsi_isr_ieob()
1441 struct gsi_channel *channel; in gsi_event_trans() local
1446 channel = &gsi->channel[channel_id]; in gsi_event_trans()
1447 if (WARN(!channel->gsi, "event has bad channel %u\n", channel_id)) in gsi_event_trans()
1452 tre_index = gsi_ring_index(&channel->tre_ring, tre_offset); in gsi_event_trans()
1454 trans = gsi_channel_trans_mapped(channel, tre_index); in gsi_event_trans()
1456 if (WARN(!trans, "channel %u event with no transaction\n", channel_id)) in gsi_event_trans()
1472 * When an event for a TX channel arrives we use information in the
1496 * transaction (and which channel) is associated with the event. in gsi_evt_ring_update()
1587 /* Ring a channel doorbell, reporting the first un-filled entry */
1588 void gsi_channel_doorbell(struct gsi_channel *channel) in gsi_channel_doorbell() argument
1590 struct gsi_ring *tre_ring = &channel->tre_ring; in gsi_channel_doorbell()
1591 u32 channel_id = gsi_channel_id(channel); in gsi_channel_doorbell()
1592 struct gsi *gsi = channel->gsi; in gsi_channel_doorbell()
1603 void gsi_channel_update(struct gsi_channel *channel) in gsi_channel_update() argument
1605 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_update()
1606 struct gsi *gsi = channel->gsi; in gsi_channel_update()
1640 * gsi_channel_poll_one() - Return a single completed transaction on a channel
1641 * @channel: Channel to be polled
1645 * This function returns the first of a channel's completed transactions.
1651 static struct gsi_trans *gsi_channel_poll_one(struct gsi_channel *channel) in gsi_channel_poll_one() argument
1656 trans = gsi_channel_trans_complete(channel); in gsi_channel_poll_one()
1664 * gsi_channel_poll() - NAPI poll function for a channel
1665 * @napi: NAPI structure for the channel
1677 struct gsi_channel *channel; in gsi_channel_poll() local
1680 channel = container_of(napi, struct gsi_channel, napi); in gsi_channel_poll()
1684 trans = gsi_channel_poll_one(channel); in gsi_channel_poll()
1691 gsi_irq_ieob_enable_one(channel->gsi, channel->evt_ring_id); in gsi_channel_poll()
1710 /* Setup function for a single channel */
1713 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_setup_one() local
1714 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_setup_one()
1717 if (!gsi_channel_initialized(channel)) in gsi_channel_setup_one()
1730 gsi_channel_program(channel, true); in gsi_channel_setup_one()
1732 if (channel->toward_ipa) in gsi_channel_setup_one()
1733 netif_napi_add_tx(&gsi->dummy_dev, &channel->napi, in gsi_channel_setup_one()
1736 netif_napi_add(&gsi->dummy_dev, &channel->napi, in gsi_channel_setup_one()
1751 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_teardown_one() local
1752 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_teardown_one()
1754 if (!gsi_channel_initialized(channel)) in gsi_channel_teardown_one()
1757 netif_napi_del(&channel->napi); in gsi_channel_teardown_one()
1765 * the ability to determine channel state for a modem channel, so we simply
1783 * channel), and only from this function. So we enable the GP_INT1 in gsi_generic_command()
1815 dev_err(gsi->dev, "GSI generic command %u to channel %u timed out\n", in gsi_generic_command()
1838 dev_err(gsi->dev, "error %d halting modem channel %u\n", in gsi_modem_channel_halt()
1842 /* Enable or disable flow control for a modem GSI TX channel (IPA v4.2+) */
1864 "error %d %sabling mode channel %u flow control\n", in gsi_modem_channel_flow_control()
1887 struct gsi_channel *channel = &gsi->channel[channel_id++]; in gsi_channel_setup() local
1889 if (!gsi_channel_initialized(channel)) in gsi_channel_setup()
1893 dev_err(gsi->dev, "channel %u not supported by hardware\n", in gsi_channel_setup()
2014 /* Get # supported channel and event rings; there is no gsi_ring_teardown() */
2112 /* Initialize a channel's event ring */
2113 static int gsi_channel_evt_ring_init(struct gsi_channel *channel) in gsi_channel_evt_ring_init() argument
2115 struct gsi *gsi = channel->gsi; in gsi_channel_evt_ring_init()
2122 channel->evt_ring_id = ret; in gsi_channel_evt_ring_init()
2124 evt_ring = &gsi->evt_ring[channel->evt_ring_id]; in gsi_channel_evt_ring_init()
2125 evt_ring->channel = channel; in gsi_channel_evt_ring_init()
2127 ret = gsi_ring_alloc(gsi, &evt_ring->ring, channel->event_count); in gsi_channel_evt_ring_init()
2131 dev_err(gsi->dev, "error %d allocating channel %u event ring\n", in gsi_channel_evt_ring_init()
2132 ret, gsi_channel_id(channel)); in gsi_channel_evt_ring_init()
2134 gsi_evt_ring_id_free(gsi, channel->evt_ring_id); in gsi_channel_evt_ring_init()
2140 static void gsi_channel_evt_ring_exit(struct gsi_channel *channel) in gsi_channel_evt_ring_exit() argument
2142 u32 evt_ring_id = channel->evt_ring_id; in gsi_channel_evt_ring_exit()
2143 struct gsi *gsi = channel->gsi; in gsi_channel_evt_ring_exit()
2158 /* Make sure channel ids are in the range driver supports */ in gsi_channel_data_valid()
2160 dev_err(dev, "bad channel id %u; must be less than %u\n", in gsi_channel_data_valid()
2171 dev_err(dev, "command channel %u is not TX\n", channel_id); in gsi_channel_data_valid()
2175 channel_data = &data->channel; in gsi_channel_data_valid()
2179 dev_err(dev, "channel %u bad tlv_count %u; must be 1..%u\n", in gsi_channel_data_valid()
2185 dev_err(dev, "command TRE max too big for channel %u (%u > %u)\n", in gsi_channel_data_valid()
2197 dev_err(dev, "channel %u TLV count %u exceeds TRE count %u\n", in gsi_channel_data_valid()
2204 dev_err(dev, "channel %u bad tre_count %u; not power of 2\n", in gsi_channel_data_valid()
2210 dev_err(dev, "channel %u bad event_count %u; not power of 2\n", in gsi_channel_data_valid()
2218 /* Init function for a single channel */
2223 struct gsi_channel *channel; in gsi_channel_init_one() local
2231 if (data->channel.tre_count > data->channel.event_count) { in gsi_channel_init_one()
2232 tre_count = data->channel.event_count; in gsi_channel_init_one()
2233 dev_warn(gsi->dev, "channel %u limited to %u TREs\n", in gsi_channel_init_one()
2236 tre_count = data->channel.tre_count; in gsi_channel_init_one()
2239 channel = &gsi->channel[data->channel_id]; in gsi_channel_init_one()
2240 memset(channel, 0, sizeof(*channel)); in gsi_channel_init_one()
2242 channel->gsi = gsi; in gsi_channel_init_one()
2243 channel->toward_ipa = data->toward_ipa; in gsi_channel_init_one()
2244 channel->command = command; in gsi_channel_init_one()
2245 channel->trans_tre_max = data->channel.tlv_count; in gsi_channel_init_one()
2246 channel->tre_count = tre_count; in gsi_channel_init_one()
2247 channel->event_count = data->channel.event_count; in gsi_channel_init_one()
2249 ret = gsi_channel_evt_ring_init(channel); in gsi_channel_init_one()
2253 ret = gsi_ring_alloc(gsi, &channel->tre_ring, data->channel.tre_count); in gsi_channel_init_one()
2255 dev_err(gsi->dev, "error %d allocating channel %u ring\n", in gsi_channel_init_one()
2267 ret = ipa_cmd_pool_init(channel, tre_max); in gsi_channel_init_one()
2272 gsi_channel_trans_exit(channel); in gsi_channel_init_one()
2274 gsi_ring_free(gsi, &channel->tre_ring); in gsi_channel_init_one()
2276 gsi_channel_evt_ring_exit(channel); in gsi_channel_init_one()
2278 channel->gsi = NULL; /* Mark it not (fully) initialized */ in gsi_channel_init_one()
2284 static void gsi_channel_exit_one(struct gsi_channel *channel) in gsi_channel_exit_one() argument
2286 if (!gsi_channel_initialized(channel)) in gsi_channel_exit_one()
2289 if (channel->command) in gsi_channel_exit_one()
2290 ipa_cmd_pool_exit(channel); in gsi_channel_exit_one()
2291 gsi_channel_trans_exit(channel); in gsi_channel_exit_one()
2292 gsi_ring_free(channel->gsi, &channel->tre_ring); in gsi_channel_exit_one()
2293 gsi_channel_evt_ring_exit(channel); in gsi_channel_exit_one()
2340 gsi_channel_exit_one(&gsi->channel[data->channel_id]); in gsi_channel_init()
2352 gsi_channel_exit_one(&gsi->channel[channel_id]); in gsi_channel_exit()
2370 * for the channel NAPI contexts to be associated with. in gsi_init()
2405 /* The maximum number of outstanding TREs on a channel. This limits
2406 * a channel's maximum number of transactions outstanding (worst case
2409 * The absolute limit is the number of TREs in the channel's TRE ring,
2427 struct gsi_channel *channel = &gsi->channel[channel_id]; in gsi_channel_tre_max() local
2429 /* Hardware limit is channel->tre_count - 1 */ in gsi_channel_tre_max()
2430 return channel->tre_count - (channel->trans_tre_max - 1); in gsi_channel_tre_max()