Skip to content

Commit 4ce0f5b

Browse files
author
Desnes Nunes
committed
usb: xhci: cleanup IMOD register comments
JIRA: https://issues.redhat.com/browse/RHEL-116016 commit 5f5816d Author: Niklas Neronin <niklas.neronin@linux.intel.com> Date: Thu, 15 May 2025 16:56:17 +0300 Patch does not contain any functional changes. Add missing macro descriptions with specific bit definitions for each data field and reordered them accordingly. Remove "HW use only" from Interrupt Moderation Counter. xHCI Specification 1.2, section 5.5.2.2, states "This counter may be directly written by software at any time to alter the interrupt rate." Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250515135621.335595-21-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent c57f9ac commit 4ce0f5b

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

drivers/usb/host/xhci.h

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,13 @@ struct xhci_op_regs {
210210
#define XHCI_PAGE_SIZE_MASK 0xffff
211211

212212
/**
213-
* struct xhci_intr_reg - Interrupt Register Set
214-
* @irq_pending: IMAN - Interrupt Management Register. Used to enable
213+
* struct xhci_intr_reg - Interrupt Register Set, v1.2 section 5.5.2.
214+
* @irq_pending: IMAN - Interrupt Management Register. Used to enable
215215
* interrupts and check for pending interrupts.
216-
* @irq_control: IMOD - Interrupt Moderation Register.
217-
* Used to throttle interrupts.
218-
* @erst_size: Number of segments in the Event Ring Segment Table (ERST).
219-
* @erst_base: ERST base address.
220-
* @erst_dequeue: Event ring dequeue pointer.
216+
* @irq_control: IMOD - Interrupt Moderation Register. Used to throttle interrupts.
217+
* @erst_size: ERSTSZ - Number of segments in the Event Ring Segment Table (ERST).
218+
* @erst_base: ERSTBA - Event ring segment table base address.
219+
* @erst_dequeue: ERDP - Event ring dequeue pointer.
221220
*
222221
* Each interrupter (defined by a MSI-X vector) has an event ring and an Event
223222
* Ring Segment Table (ERST) associated with it. The event ring is comprised of
@@ -242,12 +241,13 @@ struct xhci_intr_reg {
242241
#define IMAN_IE (1 << 1)
243242

244243
/* irq_control bitmasks */
245-
/* Minimum interval between interrupts (in 250ns intervals). The interval
246-
* between interrupts will be longer if there are no events on the event ring.
247-
* Default is 4000 (1 ms).
244+
/*
245+
* bits 15:0 - Interrupt Moderation Interval, the minimum interval between interrupts
246+
* (in 250ns intervals). The interval between interrupts will be longer if there are no
247+
* events on the event ring. Default is 4000 (1 ms).
248248
*/
249249
#define ER_IRQ_INTERVAL_MASK (0xffff)
250-
/* Counter used to count down the time to the next interrupt - HW use only */
250+
/* bits 31:16 - Interrupt Moderation Counter, used to count down the time to the next interrupt */
251251
#define ER_IRQ_COUNTER_MASK (0xffff << 16)
252252

253253
/* erst_size bitmasks */
@@ -259,15 +259,18 @@ struct xhci_intr_reg {
259259
#define ERST_BASE_ADDRESS_MASK GENMASK_ULL(63, 6)
260260

261261
/* erst_dequeue bitmasks */
262-
/* Dequeue ERST Segment Index (DESI) - Segment number (or alias)
263-
* where the current dequeue pointer lies. This is an optional HW hint.
262+
/*
263+
* bits 2:0 - Dequeue ERST Segment Index (DESI), is the segment number (or alias) where the
264+
* current dequeue pointer lies. This is an optional HW hint.
264265
*/
265266
#define ERST_DESI_MASK (0x7)
266-
/* Event Handler Busy (EHB) - is the event ring scheduled to be serviced by
267+
/*
268+
* bit 3 - Event Handler Busy (EHB), whether the event ring is scheduled to be serviced by
267269
* a work queue (or delayed service routine)?
268270
*/
269271
#define ERST_EHB (1 << 3)
270-
#define ERST_PTR_MASK (GENMASK_ULL(63, 4))
272+
/* bits 63:4 - Event Ring Dequeue Pointer */
273+
#define ERST_PTR_MASK GENMASK_ULL(63, 4)
271274

272275
/**
273276
* struct xhci_run_regs

0 commit comments

Comments
 (0)