codebje opened a new pull request #2923: URL: https://github.com/apache/incubator-nuttx/pull/2923
## Summary IRQs cannot be individually disabled on the eZ80, so using `up_disable_irq()` had no effect. This left the IRQ handler being constantly triggered without the lower half handler running. The macro for EMAC stats was incompatible with Clang. The simplified form gives identical results under ZDS-II. The MII clock speed must be set before trying to read MII registers. It's now done before resetting the PHY using the Mode Control Register. A few typos, unused variables, and other miscellaneous issues were also fixed. ## Impact These changes permit building the eZ80 EMAC driver and enable basic Ethernet functionality. ## Testing Successful ICMP echo receive and response: ``` ez80emac_receive: rxnext=0xffdd00 {ffdd80, 102, 8020} rrp=0xffdd00 rwp=0xffdd80 blkslft=003e ez80emac_receive: rxnext=0xffdd80 {653734, 14128, 3166} rrp=0xffdd80 rwp=0xffdd80 blkslft=0040 ez80emac_receive: IPv4 frame icmp_input: Outgoing ICMP packet length: 84 (84) ez80emac_transmit: txnext=0xffc6c0 {000000, 0, 0000} trp=06c0 ez80emac_transmit: txdesc=0xffc6c0 {ffc740, 98, 8000} ez80emac_transmit: txnext=0xffc740 {000000, 0, 0000} trp=0740 ez80emac_txinterrupt_work: txhead=0xffc6c0 {ffc740, 98, 0000} trp=0740 istat=01 ez80emac_txinterrupt_work: txhead=0xffc740 {000000, 0, 0000} trp=0740 ez80emac_txinterrupt_work: No pending Tx.. Stopping XMIT function. ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org