[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/27] e1000e: Fix EIAC register implementation
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PULL 24/27] e1000e: Fix EIAC register implementation |
Date: |
Mon, 26 Sep 2016 16:59:32 +0800 |
From: Dmitry Fleytman <address@hidden>
This patch fixes 2 issues:
1. Bits set in EIAC register should be cleared
from IMS when EIAM is not used.
2. Only bit that corresonds to the interrupt being
raised should be cleared.
See spec. 10.2.4.7 Interrupt Auto Clear
Signed-off-by: Dmitry Fleytman <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/net/e1000e_core.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 0298136..6505983 100644
--- a/hw/net/e1000e_core.c
+++ b/hw/net/e1000e_core.c
@@ -2015,13 +2015,17 @@ e1000e_msix_notify_one(E1000ECore *core, uint32_t
cause, uint32_t int_cfg)
trace_e1000e_irq_icr_clear_eiac(core->mac[ICR], core->mac[EIAC]);
- if (core->mac[EIAC] & E1000_ICR_OTHER) {
- effective_eiac = (core->mac[EIAC] & E1000_EIAC_MASK) |
- E1000_ICR_OTHER_CAUSES;
- } else {
- effective_eiac = core->mac[EIAC] & E1000_EIAC_MASK;
+ effective_eiac = core->mac[EIAC] & cause;
+
+ if (effective_eiac == E1000_ICR_OTHER) {
+ effective_eiac |= E1000_ICR_OTHER_CAUSES;
}
+
core->mac[ICR] &= ~effective_eiac;
+
+ if (!(core->mac[CTRL_EXT] & E1000_CTRL_EXT_IAME)) {
+ core->mac[IMS] &= ~effective_eiac;
+ }
}
static void
--
2.7.4
- [Qemu-devel] [PULL 13/27] MAINTAINERS: add maintainer for COLO-proxy, (continued)
- [Qemu-devel] [PULL 13/27] MAINTAINERS: add maintainer for COLO-proxy, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 14/27] docs: Add documentation for COLO-proxy, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 15/27] e1000: fix buliding complaint, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 16/27] tap: Allow specifying a bridge, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 18/27] e1000e: Flush all receive queues on receive enable, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 17/27] net: limit allocation in nc_sendv_compat, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 19/27] e1000e: Flush receive queues on link up, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 20/27] e1000e: Fix CTRL_EXT.EIAME behavior, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 23/27] e1000e: Fix spurious RX TCP ACK interrupts, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 21/27] e1000e: Fix PBACLR implementation, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 24/27] e1000e: Fix EIAC register implementation,
Jason Wang <=
- [Qemu-devel] [PULL 22/27] e1000e: Fix OTHER interrupts processing for MSI-X, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 26/27] mcf_fec: fix error in qemu_send_packet argument, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 25/27] net: mcf: limit buffer descriptor count, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 27/27] imx_fec: fix error in qemu_send_packet argument, Jason Wang, 2016/09/26
- Re: [Qemu-devel] [PULL 00/27] Net patches, Peter Maydell, 2016/09/26