diff options
author | Jason Wang <jasowang@redhat.com> | 2012-03-22 18:02:34 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-04-25 10:53:48 +0300 |
commit | f1219091edd20e3b92544025c2b6dd5e4d98b61b (patch) | |
tree | eb1a9bca0afa76f476f598ca741876039825fc9d /hw/e1000.c | |
parent | b9d03e352cb6b31a66545763f6a1e20c9abf0c2c (diff) |
e1000: set E1000_ICR_INT_ASSERTED only for 8257x
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 <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/e1000.c')
-rw-r--r-- | hw/e1000.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/e1000.c b/hw/e1000.c index b5c26e0dd8..4573f1301e 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -223,8 +223,10 @@ static const uint32_t mac_reg_init[] = { 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); |