summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2026-02-27 19:51:45 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-05-19 14:20:18 +0200
commitc51777370ac2ef435401340e205ef1d0c778df28 (patch)
tree72124d7aeb1193e9c89efe778812ed0d510fab57 /include
parent5140737c592d23b4de0f98c47dd347684a0c8de3 (diff)
thunderbolt / net: Let the service drivers configure interrupt throttling
Instead of the core driver programming fixed value for throttling let the service drivers to specify the interval if they need this. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/thunderbolt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h
index 1d1bd458b5af..1160e0bf5c5b 100644
--- a/include/linux/thunderbolt.h
+++ b/include/linux/thunderbolt.h
@@ -554,6 +554,8 @@ struct tb_nhi {
* @start_poll: Called when ring interrupt is triggered to start
* polling. Passing %NULL keeps the ring in interrupt mode.
* @poll_data: Data passed to @start_poll
+ * @interval_nsec: Interval counter if interrupt throttling is to be
+ * used with this ring (in ns)
*/
struct tb_ring {
spinlock_t lock;
@@ -577,6 +579,7 @@ struct tb_ring {
u16 eof_mask;
void (*start_poll)(void *data);
void *poll_data;
+ unsigned int interval_nsec;
};
/* Leave ring interrupt enabled on suspend */
@@ -697,6 +700,8 @@ static inline int tb_ring_tx(struct tb_ring *ring, struct ring_frame *frame)
struct ring_frame *tb_ring_poll(struct tb_ring *ring);
void tb_ring_poll_complete(struct tb_ring *ring);
+int tb_ring_throttling(struct tb_ring *ring, unsigned int interval_nsec);
+
/**
* tb_ring_dma_device() - Return device used for DMA mapping
* @ring: Ring whose DMA device is retrieved