You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/25 12:16:29 UTC

[GitHub] [incubator-nuttx] codebje opened a new pull request #2923: ez80: fix several bugs in emac driver

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:
users@infra.apache.org



[GitHub] [incubator-nuttx] codebje edited a comment on pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
codebje edited a comment on pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923#issuecomment-785854200


   There are further issues with networking on the eZ80 to resolve:
   
     - ~~Large frames put the EMAC driver into an endless loop failing to process the invalid message~~
     - A DHCP lease cannot be obtained, but I don't yet know why - it may not be related to the EMAC driver
     - ~~Auto-negotiation is successful on the DP83848C but not correctly detected as begun or complete~~
   
   I can continue to update this PR if it's preferable to merge any further changes into one.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923#issuecomment-786443691


   @codebje is this patch ready for merge?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] codebje commented on pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
codebje commented on pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923#issuecomment-785854200


   There are further issues with networking on the eZ80 to resolve:
   
     - Large frames put the EMAC driver into an endless loop failing to process the invalid message
     - A DHCP lease cannot be obtained, but I don't yet know why - it may not be related to the EMAC driver
     - Auto-negotiation is successful on the DP83848C but not correctly detected as begun or complete
   
   I can continue to update this PR if it's preferable to merge any further changes into one.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923#issuecomment-786522952


   Ok, let's merge it.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-nuttx] codebje commented on pull request #2923: ez80: fix several bugs in emac driver

Posted by GitBox <gi...@apache.org>.
codebje commented on pull request #2923:
URL: https://github.com/apache/incubator-nuttx/pull/2923#issuecomment-786465360


   I think so - I've traced the DHCP issue far enough to know that it reaches `udp_input` with the right data, so whatever's causing the DCHP offer to be lost is probably not in the EMAC.


----------------------------------------------------------------
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:
users@infra.apache.org