提交 f1219091 编写于 作者: J Jason Wang 提交者: Michael S. Tsirkin

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: NJason Wang <jasowang@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 b9d03e35
...@@ -223,8 +223,10 @@ static const uint32_t mac_reg_init[] = { ...@@ -223,8 +223,10 @@ static const uint32_t mac_reg_init[] = {
static void static void
set_interrupt_cause(E1000State *s, int index, uint32_t val) 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; val |= E1000_ICR_INT_ASSERTED;
}
s->mac_reg[ICR] = val; s->mac_reg[ICR] = val;
s->mac_reg[ICS] = val; s->mac_reg[ICS] = val;
qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0); qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册