Revision 3dcd219f
b/hw/e1000.c | ||
---|---|---|
150 | 150 |
} |
151 | 151 |
|
152 | 152 |
static void |
153 |
update_irqs(E1000State *s) |
|
154 |
{ |
|
155 |
qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0); |
|
156 |
} |
|
157 |
|
|
158 |
static void |
|
153 | 159 |
set_interrupt_cause(E1000State *s, int index, uint32_t val) |
154 | 160 |
{ |
155 | 161 |
if (val) |
156 | 162 |
val |= E1000_ICR_INT_ASSERTED; |
157 | 163 |
s->mac_reg[ICR] = val; |
158 |
qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);
|
|
164 |
update_irqs(s);
|
|
159 | 165 |
} |
160 | 166 |
|
161 | 167 |
static void |
... | ... | |
970 | 976 |
for (j = 0; j < mac_regarraystosave[i].size; j++) |
971 | 977 |
qemu_get_be32s(f, |
972 | 978 |
s->mac_reg + mac_regarraystosave[i].array0 + j); |
979 |
update_irqs(s); |
|
973 | 980 |
return 0; |
974 | 981 |
} |
975 | 982 |
|
... | ... | |
1068 | 1075 |
memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init); |
1069 | 1076 |
d->rxbuf_min_shift = 1; |
1070 | 1077 |
memset(&d->tx, 0, sizeof d->tx); |
1078 |
update_irqs(d); |
|
1071 | 1079 |
} |
1072 | 1080 |
|
1073 | 1081 |
static void pci_e1000_init(PCIDevice *pci_dev) |
b/hw/rtl8139.c | ||
---|---|---|
3314 | 3314 |
s->cplus_enabled = s->CpCmd != 0; |
3315 | 3315 |
} |
3316 | 3316 |
|
3317 |
rtl8139_update_irq(s); |
|
3318 |
|
|
3317 | 3319 |
return 0; |
3318 | 3320 |
} |
3319 | 3321 |
|
Also available in: Unified diff