[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] e1000: conditionally raise irq at the end of MD
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PATCH 2/7] e1000: conditionally raise irq at the end of MDI cycle |
Date: |
Thu, 22 Mar 2012 18:01:50 +0800 |
User-agent: |
StGit/0.16-1-g60c4 |
According to the spec:
"When set to 1b by software, it causes an Interrupt to be
asserted to indicate the end of an MDI cycle."
We need check the Interrupt Enable bit and raise irq only when it is
set.
Signed-off-by: Jason Wang <address@hidden>
---
hw/e1000.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 7babc0b..dd6a97d 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -234,7 +234,10 @@ set_mdic(E1000State *s, int index, uint32_t val)
s->phy_reg[addr] = data;
}
s->mac_reg[MDIC] = val | E1000_MDIC_READY;
- set_ics(s, 0, E1000_ICR_MDAC);
+
+ if (val & E1000_MDIC_INT_EN) {
+ set_ics(s, 0, E1000_ICR_MDAC);
+ }
}
static uint32_t
- [Qemu-devel] [PATCH 1/7] e1000: introduce bits of PHY control register, Jason Wang, 2012/03/22
- [Qemu-devel] [PATCH 2/7] e1000: conditionally raise irq at the end of MDI cycle,
Jason Wang <=
- [Qemu-devel] [PATCH 3/7] e1000: PHY loopback mode support, Jason Wang, 2012/03/22
- [Qemu-devel] [PATCH 4/7] e1000: introduce helpers to manipulate link status, Jason Wang, 2012/03/22
- [Qemu-devel] [PATCH 5/7] e1000: introduce bit for debugging PHY emulation, Jason Wang, 2012/03/22
- [Qemu-devel] [PATCH 6/7] e1000: link auto-negotiation emulation, Jason Wang, 2012/03/22
- [Qemu-devel] [PATCH 7/7] e1000: set E1000_ICR_INT_ASSERTED only for 8257x, Jason Wang, 2012/03/22