allwinner_sun8i_emac dosen't work in uboot
## Host environment - Operating system: GNU Guix - OS/kernel version: Linux noisemaker 6.18.22-gnu #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux - Architecture: x86 - QEMU flavor: qemu-system-arm - QEMU version: 10.2.1, master - QEMU command line: ``` qemu-system-arm \ -M orangepi-pc \ -nic bridge,br=br0 \ -nographic \ -sd sdcard.img ``` ## Description of problem Inside qemu orangepi-pc machine, `dhcp`, `ping` doesn't work in uboot. ## Steps to reproduce 1. prepare a `sdcard.img` with orangepi-pc u-boot installed. 2. run qemu-system-arm according to the wiki, with bridge networking. 3. test `dhcp` or `ping` in u-boot. ## Additional information in `allwinner_sun8i_emac_write`, add `qemu_flush_queued_packets` for the `REG_RX_CTL_0` case seems fix the issue. ``` case REG_RX_CTL_0: /* Receive Control 0 */ s->rx_ctl0 = value; if ((value & RX_CTL0_RX_EN) && allwinner_sun8i_emac_can_receive(nc)) { qemu_flush_queued_packets(&s->nic->ncs[0]); } break; ```
issue