From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Dmitry Fleytman <dmitry@daynix.com>,
Jason Wang <jasowang@redhat.com>
Subject: [Qemu-devel] [PULL V2 24/27] e1000e: Fix EIAC register implementation
Date: Tue, 27 Sep 2016 18:13:04 +0800 [thread overview]
Message-ID: <1474971187-15627-25-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1474971187-15627-1-git-send-email-jasowang@redhat.com>
From: Dmitry Fleytman <dmitry@daynix.com>
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 <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
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
next prev parent reply other threads:[~2016-09-27 10:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 10:12 [Qemu-devel] [PULL V2 00/27] Net patches Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 01/27] virtio-net: allow increasing rx queue size Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 02/27] net: hmp_host_net_remove: Del the -net option of the removed host_net Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 03/27] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 04/27] colo-compare: introduce colo compare initialization Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 05/27] net/colo.c: add colo.c to define and handle packet Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 06/27] Jhash: add linux kernel jhashtable in qemu Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 07/27] colo-compare: track connection and enqueue packet Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 08/27] colo-compare: introduce packet comparison thread Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 09/27] colo-compare: add TCP, UDP, ICMP packet comparison Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 10/27] filter-rewriter: introduce filter-rewriter initialization Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 11/27] filter-rewriter: track connection and parse packet Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 12/27] filter-rewriter: rewrite tcp packet to keep secondary connection Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 13/27] MAINTAINERS: add maintainer for COLO-proxy Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 14/27] docs: Add documentation " Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 15/27] e1000: fix buliding complaint Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 16/27] tap: Allow specifying a bridge Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 17/27] net: limit allocation in nc_sendv_compat Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 18/27] e1000e: Flush all receive queues on receive enable Jason Wang
2016-09-27 10:12 ` [Qemu-devel] [PULL V2 19/27] e1000e: Flush receive queues on link up Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 20/27] e1000e: Fix CTRL_EXT.EIAME behavior Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 21/27] e1000e: Fix PBACLR implementation Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 22/27] e1000e: Fix OTHER interrupts processing for MSI-X Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 23/27] e1000e: Fix spurious RX TCP ACK interrupts Jason Wang
2016-09-27 10:13 ` Jason Wang [this message]
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 25/27] net: mcf: limit buffer descriptor count Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 26/27] mcf_fec: fix error in qemu_send_packet argument Jason Wang
2016-09-27 10:13 ` [Qemu-devel] [PULL V2 27/27] imx_fec: " Jason Wang
2016-09-27 18:24 ` [Qemu-devel] [PULL V2 00/27] Net patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474971187-15627-25-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=dmitry@daynix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).