Skip to content

Commit c659a9e

Browse files
author
Desnes Nunes
committed
usb: xhci: rename 'irq_pending' to 'iman'
JIRA: https://issues.redhat.com/browse/RHEL-116016 commit bf9cce9 Author: Niklas Neronin <niklas.neronin@linux.intel.com> Date: Thu, 15 May 2025 16:56:18 +0300 The Interrupt Register Set contains Interrupt Management register (IMAN). The IMAN register contains the following fields: - Bit 0: Interrupt Pending (IP) - Bit 1: Interrupt Enable (IE) - Bits 31:2: RsvdP (Reserved and Preserved) Tn the xhci driver, the pointer currently named 'irq_pending' refers to the IMAN register. However, the name "irq_pending" only describes one of the fields within the IMAN register, rather than the entire register itself. To improve clarity and better align with the xHCI specification, the pointer is renamed to 'iman'. 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-22-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent 4ce0f5b commit c659a9e

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

drivers/usb/host/xhci-ring.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,14 +3082,14 @@ void xhci_update_erst_dequeue(struct xhci_hcd *xhci,
30823082
static void xhci_clear_interrupt_pending(struct xhci_interrupter *ir)
30833083
{
30843084
if (!ir->ip_autoclear) {
3085-
u32 irq_pending;
3085+
u32 iman;
30863086

3087-
irq_pending = readl(&ir->ir_set->irq_pending);
3088-
irq_pending |= IMAN_IP;
3089-
writel(irq_pending, &ir->ir_set->irq_pending);
3087+
iman = readl(&ir->ir_set->iman);
3088+
iman |= IMAN_IP;
3089+
writel(iman, &ir->ir_set->iman);
30903090

30913091
/* Read operation to guarantee the write has been flushed from posted buffers */
3092-
readl(&ir->ir_set->irq_pending);
3092+
readl(&ir->ir_set->iman);
30933093
}
30943094
}
30953095

drivers/usb/host/xhci.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,12 @@ int xhci_enable_interrupter(struct xhci_interrupter *ir)
330330
if (!ir || !ir->ir_set)
331331
return -EINVAL;
332332

333-
iman = readl(&ir->ir_set->irq_pending);
333+
iman = readl(&ir->ir_set->iman);
334334
iman |= IMAN_IE;
335-
writel(iman, &ir->ir_set->irq_pending);
335+
writel(iman, &ir->ir_set->iman);
336336

337337
/* Read operation to guarantee the write has been flushed from posted buffers */
338-
readl(&ir->ir_set->irq_pending);
338+
readl(&ir->ir_set->iman);
339339
return 0;
340340
}
341341

@@ -346,11 +346,11 @@ int xhci_disable_interrupter(struct xhci_hcd *xhci, struct xhci_interrupter *ir)
346346
if (!ir || !ir->ir_set)
347347
return -EINVAL;
348348

349-
iman = readl(&ir->ir_set->irq_pending);
349+
iman = readl(&ir->ir_set->iman);
350350
iman &= ~IMAN_IE;
351-
writel(iman, &ir->ir_set->irq_pending);
351+
writel(iman, &ir->ir_set->iman);
352352

353-
iman = readl(&ir->ir_set->irq_pending);
353+
iman = readl(&ir->ir_set->iman);
354354
if (iman & IMAN_IP)
355355
xhci_dbg(xhci, "%s: Interrupt pending\n", __func__);
356356

@@ -834,7 +834,7 @@ static void xhci_save_registers(struct xhci_hcd *xhci)
834834
ir->s3_erst_size = readl(&ir->ir_set->erst_size);
835835
ir->s3_erst_base = xhci_read_64(xhci, &ir->ir_set->erst_base);
836836
ir->s3_erst_dequeue = xhci_read_64(xhci, &ir->ir_set->erst_dequeue);
837-
ir->s3_irq_pending = readl(&ir->ir_set->irq_pending);
837+
ir->s3_iman = readl(&ir->ir_set->iman);
838838
ir->s3_irq_control = readl(&ir->ir_set->irq_control);
839839
}
840840
}
@@ -858,7 +858,7 @@ static void xhci_restore_registers(struct xhci_hcd *xhci)
858858
writel(ir->s3_erst_size, &ir->ir_set->erst_size);
859859
xhci_write_64(xhci, ir->s3_erst_base, &ir->ir_set->erst_base);
860860
xhci_write_64(xhci, ir->s3_erst_dequeue, &ir->ir_set->erst_dequeue);
861-
writel(ir->s3_irq_pending, &ir->ir_set->irq_pending);
861+
writel(ir->s3_iman, &ir->ir_set->iman);
862862
writel(ir->s3_irq_control, &ir->ir_set->irq_control);
863863
}
864864
}

drivers/usb/host/xhci.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ struct xhci_op_regs {
211211

212212
/**
213213
* struct xhci_intr_reg - Interrupt Register Set, v1.2 section 5.5.2.
214-
* @irq_pending: IMAN - Interrupt Management Register. Used to enable
214+
* @iman: IMAN - Interrupt Management Register. Used to enable
215215
* interrupts and check for pending interrupts.
216216
* @irq_control: IMOD - Interrupt Moderation Register. Used to throttle interrupts.
217217
* @erst_size: ERSTSZ - Number of segments in the Event Ring Segment Table (ERST).
@@ -226,15 +226,15 @@ struct xhci_op_regs {
226226
* updates the dequeue pointer.
227227
*/
228228
struct xhci_intr_reg {
229-
__le32 irq_pending;
229+
__le32 iman;
230230
__le32 irq_control;
231231
__le32 erst_size;
232232
__le32 rsvd;
233233
__le64 erst_base;
234234
__le64 erst_dequeue;
235235
};
236236

237-
/* irq_pending bitmasks */
237+
/* iman bitmasks */
238238
/* bit 0 - Interrupt Pending (IP), whether there is an interrupt pending. Write-1-to-clear. */
239239
#define IMAN_IP (1 << 0)
240240
/* bit 1 - Interrupt Enable (IE), whether the interrupter is capable of generating an interrupt */
@@ -1452,7 +1452,7 @@ struct xhci_interrupter {
14521452
bool ip_autoclear;
14531453
u32 isoc_bei_interval;
14541454
/* For interrupter registers save and restore over suspend/resume */
1455-
u32 s3_irq_pending;
1455+
u32 s3_iman;
14561456
u32 s3_irq_control;
14571457
u32 s3_erst_size;
14581458
u64 s3_erst_base;

0 commit comments

Comments
 (0)