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 2020/07/23 22:14:40 UTC

[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request #1455: Fix imxrt

masayuki2009 opened a new pull request #1455:
URL: https://github.com/apache/incubator-nuttx/pull/1455


   ## Summary
   
   - I noticed that imxrt1060evk ethernet works in 10Base-T full duplex mode.
   - This PR fixes auto-negotiation for KSZ8081 PHY in imxrt_enet.c
   - Also fixes style violations.
   
   ## Impact
   
   - This PR affects ethernet with KSZ8081 PHY for IMXRT series.
   
   ## Testing
   
   - I tested this PR with imxrt1060-evk.
   
   


----------------------------------------------------------------
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] masayuki2009 commented on pull request #1455: Fix imxrt

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


   > @masayuki2009 I ran the test on the imxrt-1052 to verify the issue and the fix, but when I check the link I dont see any changes. This is on master, it looks like it negotiated 100. When I apply your patch I dont see a change to `Link partner advertised link modes: Not reported`
   > 
   > ```
   > Settings for enp0s20u2:
   > 	Supported ports: [ TP	 MII ]
   > 	Supported link modes:   10baseT/Half 10baseT/Full
   > 	                        100baseT/Half 100baseT/Full
   > 	                        1000baseT/Half 1000baseT/Full
   > 	Supported pause frame use: No
   > 	Supports auto-negotiation: Yes
   > 	Supported FEC modes: Not reported
   > 	Advertised link modes:  10baseT/Half 10baseT/Full
   > 	                        100baseT/Half 100baseT/Full
   > 	                        1000baseT/Full
   > 	Advertised pause frame use: No
   > 	Advertised auto-negotiation: Yes
   > 	Advertised FEC modes: Not reported
   > 	Link partner advertised link modes:  Not reported
   > 	Link partner advertised pause frame use: No
   > 	Link partner advertised auto-negotiation: No
   > 	Link partner advertised FEC modes: No
   > 	Speed: 100Mb/s
   > 	Duplex: Full
   > 	Auto-negotiation: on
   > 	Port: MII
   > 	PHYAD: 3
   > 	Transceiver: internal
   > 	Supports Wake-on: pg
   > 	Wake-on: g
   >         Current message level: 0x00000007 (7)
   >                                drv probe link
   > 	Link detected: yes
   > ```
   
   Hi @btashton 
   
   Could you tell me your network topology and how to show the above log?
   In my case I’m using NETGEAR Gigabit Ethernet switch with imxrt1060evk.
   And without my patch, it only works in 10BaseT/Full mode.
   


----------------------------------------------------------------
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] btashton commented on pull request #1455: Fix imxrt

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


   Sounds good. I'm mostly concerned that I don't see the partner advertised mode, but maybe I'm reading that wrong. Also there are some pins on the phy that control default states of the MII so I'll see if there is a difference on the schematic between the 1050 and 1060 boards. Your fix looks correct. 


----------------------------------------------------------------
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] btashton commented on pull request #1455: Fix imxrt

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


   
   > Could you tell me your network topology and how to show the above log?
   > In my case I’m using NETGEAR Gigabit Ethernet switch with imxrt1060evk.
   > And without my patch, it only works in 10BaseT/Full mode.
   > 
   
   Sure. I have the board directly connected to a generic 1G usb-eth adapter, so no switch or router. That log is generated using `ethtool <interface>`
   
   I see the link start at 10 and then move to 100 after a few seconds.
   
   


----------------------------------------------------------------
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] btashton merged pull request #1455: Fix imxrt

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


   


----------------------------------------------------------------
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] masayuki2009 commented on pull request #1455: Fix imxrt

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


   > > Could you tell me your network topology and how to show the above log?
   > > In my case I’m using NETGEAR Gigabit Ethernet switch with imxrt1060evk.
   > > And without my patch, it only works in 10BaseT/Full mode.
   > 
   > Sure. I have the board directly connected to a generic 1G usb-eth adapter, so no switch or router. That log is generated using `ethtool <interface>`
   > 
   > I see the link start at 10 and then move to 100 after a few seconds.
   
   @btashton 
   
   Thanks for your comments.
   I am currently traveling and can not access to the board.
   So I will check a direct connection next week.
   


----------------------------------------------------------------
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] masayuki2009 commented on pull request #1455: Fix imxrt

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


   Hi @btashton,
    
   I tried a direct connection to my ubuntu 18.04 machine with ANKER Gigabit Ethernet Adapter.
   
   Without my patch, the speed was 10Mb/s in full duplex mode.
   
   ```
   $ ethtool enx00e04c0329b7 
   Settings for enx00e04c0329b7:
   	Supported ports: [ TP MII ]
   	Supported link modes:   10baseT/Half 10baseT/Full 
   	                        100baseT/Half 100baseT/Full 
   	                        1000baseT/Half 1000baseT/Full 
   	Supported pause frame use: No
   	Supports auto-negotiation: Yes
   	Supported FEC modes: Not reported
   	Advertised link modes:  10baseT/Half 10baseT/Full 
   	                        100baseT/Half 100baseT/Full 
   	                        1000baseT/Full 
   	Advertised pause frame use: Symmetric Receive-only
   	Advertised auto-negotiation: Yes
   	Advertised FEC modes: Not reported
   	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
   	Link partner advertised pause frame use: No
   	Link partner advertised auto-negotiation: Yes
   	Link partner advertised FEC modes: Not reported
   	Speed: 10Mb/s
   	Duplex: Full
   	Port: MII
   	PHYAD: 32
   	Transceiver: internal
   	Auto-negotiation: on
   Cannot get wake-on-lan settings: Operation not permitted
   	Current message level: 0x00007fff (32767)
   			       drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
   	Link detected: yes
   ```
   
   With my patch, the speed was 100Mb/s in full duplex mode.
   So it seems that my patch is working as expected.
   
   ```
   $ ethtool enx00e04c0329b7 
   Settings for enx00e04c0329b7:
   	Supported ports: [ TP MII ]
   	Supported link modes:   10baseT/Half 10baseT/Full 
   	                        100baseT/Half 100baseT/Full 
   	                        1000baseT/Half 1000baseT/Full 
   	Supported pause frame use: No
   	Supports auto-negotiation: Yes
   	Supported FEC modes: Not reported
   	Advertised link modes:  10baseT/Half 10baseT/Full 
   	                        100baseT/Half 100baseT/Full 
   	                        1000baseT/Full 
   	Advertised pause frame use: Symmetric Receive-only
   	Advertised auto-negotiation: Yes
   	Advertised FEC modes: Not reported
   	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
   	                                     100baseT/Half 100baseT/Full 
   	Link partner advertised pause frame use: No
   	Link partner advertised auto-negotiation: Yes
   	Link partner advertised FEC modes: Not reported
   	Speed: 100Mb/s
   	Duplex: Full
   	Port: MII
   	PHYAD: 32
   	Transceiver: internal
   	Auto-negotiation: on
   Cannot get wake-on-lan settings: Operation not permitted
   	Current message level: 0x00007fff (32767)
   			       drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
   	Link detected: yes
   ```


----------------------------------------------------------------
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] btashton commented on pull request #1455: Fix imxrt

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


   Thanks for testing. I'm still not sure why my computer negotiated the 100 but did not see the partner advertised settings. This patch looks right to me so I'll 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] btashton commented on pull request #1455: Fix imxrt

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


   @masayuki2009 I ran the test on the imxrt-1052 to verify the issue and the fix, but when I check the link I dont see any changes.  This is on master, it looks like it negotiated 100.  When I apply your patch I dont see a change to `Link partner advertised link modes:  Not reported`
   ```
   Settings for enp0s20u2:
   	Supported ports: [ TP	 MII ]
   	Supported link modes:   10baseT/Half 10baseT/Full
   	                        100baseT/Half 100baseT/Full
   	                        1000baseT/Half 1000baseT/Full
   	Supported pause frame use: No
   	Supports auto-negotiation: Yes
   	Supported FEC modes: Not reported
   	Advertised link modes:  10baseT/Half 10baseT/Full
   	                        100baseT/Half 100baseT/Full
   	                        1000baseT/Full
   	Advertised pause frame use: No
   	Advertised auto-negotiation: Yes
   	Advertised FEC modes: Not reported
   	Link partner advertised link modes:  Not reported
   	Link partner advertised pause frame use: No
   	Link partner advertised auto-negotiation: No
   	Link partner advertised FEC modes: No
   	Speed: 100Mb/s
   	Duplex: Full
   	Auto-negotiation: on
   	Port: MII
   	PHYAD: 3
   	Transceiver: internal
   	Supports Wake-on: pg
   	Wake-on: g
           Current message level: 0x00000007 (7)
                                  drv probe link
   	Link detected: yes
   ```


----------------------------------------------------------------
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