Of all the gin joints in all the towns in all the world, Guenter Roeck had to walk into mine at 13:38 on Friday 09 March 2018 and say:
[...] > > > > Do I have that right? > > > > > > Pretty much. > > > > There may be a 4th option. > > > > Since older kernels work because they were looking at vector 151, you > > could patch the imx_fec.c module so that when it signals an event for > > vector 150, it also signals vector 151 too. This would keep newer > > versions of QEMU "bug- compatible" with older versions while also fixing > > support for newer Linux kernels and other guests (e.g. VxWorks) that > > follow the hardware spec correctly. > > > > I think this would require only a small modification to this function: > > > > static void imx_eth_update(IMXFECState *s) > > { > > > > if (s->regs[ENET_EIR] & s->regs[ENET_EIMR] & ENET_INT_TS_TIMER) { > > > > qemu_set_irq(s->irq[1], 1); > > > > } else { > > > > qemu_set_irq(s->irq[1], 0); > > > > } > > > > if (s->regs[ENET_EIR] & s->regs[ENET_EIMR] & ENET_INT_MAC) { > > > > qemu_set_irq(s->irq[0], 1); > > > > } else { > > > > qemu_set_irq(s->irq[0], 0); > > > > } > > > > } > > > > (For ENET_INT_MAC events, just signal both s->irq[0] and s->irq[1]). > > Now this is an excellent idea. > > > This of course means signaling spurious events on vector 151, but you're > > doing that now anyway. :) > > Actually, it doesn't. It looks like the first interrupt is handled, > resetting the interrupt status, and the second interrupt is never even > executed. I tested this with all kernel releases back to v3.16. I just did a quick test with your patch and I can confirm that VxWorks 7 also works correctly. -Bill > I'll send out patch v2 with this change and let Peter decide which version > to apply. > > Thanks, > Guenter -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Member of Technical Staff, wp...@windriver.com | Master of Unix-Fu - Wind River Systems ============================================================================= "I put a dollar in a change machine. Nothing changed." - George Carlin =============================================================================