Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
igb: Clear-on-read ICR when ICR.INTA is set
For GPIE.NSICR, Section 7.3.2.1.2 says:
> ICR bits are cleared on register read. If GPIE.NSICR = 0b, then the
> clear on read occurs only if no bit is set in the IMS or at least one
> bit is set in the IMS and there is a true interrupt as reflected in
> ICR.INTA.

e1000e does similar though it checks for CTRL_EXT.IAME, which does not
exist on igb.

Suggested-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
  • Loading branch information
akihikodaki authored and jasowang committed May 23, 2023
1 parent 5844562 commit efb1fd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/net/igb_core.c
Expand Up @@ -2598,6 +2598,8 @@ igb_mac_icr_read(IGBCore *core, int index)
} else if (core->mac[IMS] == 0) {
trace_e1000e_irq_icr_clear_zero_ims();
igb_lower_interrupts(core, ICR, 0xffffffff);
} else if (core->mac[ICR] & E1000_ICR_INT_ASSERTED) {
igb_lower_interrupts(core, ICR, 0xffffffff);
} else if (!msix_enabled(core->owner)) {
trace_e1000e_irq_icr_clear_nonmsix_icr_read();
igb_lower_interrupts(core, ICR, 0xffffffff);
Expand Down

0 comments on commit efb1fd7

Please sign in to comment.