[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/7] e1000: set E1000_ICR_INT_ASSERTED only for 8257
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PATCH 7/7] e1000: set E1000_ICR_INT_ASSERTED only for 8257x |
Date: |
Thu, 22 Mar 2012 18:02:34 +0800 |
User-agent: |
StGit/0.16-1-g60c4 |
E1000_ICR_INT_ASSERTED were introduced only for 8257x, so we need to
check the E1000_DEVID before setting this bit in ICS.
Signed-off-by: Jason Wang <address@hidden>
---
hw/e1000.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 921f0cc..5584cc6 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -199,8 +199,10 @@ static const char phy_regcap[0x20] = {
static void
set_interrupt_cause(E1000State *s, int index, uint32_t val)
{
- if (val)
+ if (val && (E1000_DEVID >= E1000_DEV_ID_82547EI_MOBILE)) {
+ /* Only for 8257x */
val |= E1000_ICR_INT_ASSERTED;
+ }
s->mac_reg[ICR] = val;
s->mac_reg[ICS] = val;
qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
- [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, 2012/03/22
- [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 <=