NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/42314: IC Plus IP100x PHY support



On 2019/11/18 23:46, SAITOH Masanobu wrote:
> On 2019/11/15 2:42, Andrius V wrote:
>> Hi,
>>
>> Tested, didn't notice any regressions, auto-negotiation configures
>> 1000baseT full-duplex as expected (doesn't matter if on boot or using
>> "ifconfig vge0 media auto" manually). Setting media type explicitly to
>> 1000baseT selects 100baseTX though (which is an improvement, since it
>> was completely  failing with the original code).
> 
> On my machine, forcing 1000baseT-FDX usually got a link as it is, but
> sometimes got a link as 100baseTX-FDX. I suspect it depend on your
> cable and/or the link partner. Some PHYs include IP1000A and IP1001
> have a feature called downshift. If the PHY detect it can't link 1000baseT,
> it downgrade to 100baseT. It can be disabled by clearing IPGPHY_SCSR_DOWNSHIFT_ENB
> bit.
> 
>>  From dmesg:
>>
>> [     1.050249] vge0 at pci4 dev 0 function 0: VIA VT612X Gigabit
>> Ethernet (rev. 0x82)
>> [     1.050249] vge0: interrupting at ioapic1 pin 12
>> [     1.050249] vge0: Ethernet address xx:xx:xx:xx:xx:xx
>> [     1.050249] ipgphy0 at vge0 phy 22: IP1001 10/100/1000 PHY, rev. 0
>> [     1.050249] 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
>> 1000baseT, 1000baseT-FDX, auto
> 
> I have the same one (I have both stge+IP1000A and vge+IP1001).
> 
>> ifconfig vge0 (auto)
>> vge0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>>         capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
>>         capabilities=3f00<UDP4CSUM_Rx,UDP4CSUM_Tx>
>>         enabled=0
>>         ec_capabilities=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
>>         ec_enabled=2<VLAN_HWTAGGING>
>>         address: xx:xx:xx:xx:xx:xx
>>         media: Ethernet autoselect (1000baseT
>> full-duplex,flowcontrol,master,rxpause,txpause)
>>         status: active
>>         inet 192.168.1.10/24 broadcast 192.168.1.255 flags 0x0
>>         inet6 fe80::8c9e:c8a0:eb4b:731f%vge0/64 flags 0x0 scopeid 0x1
>> ifconfig vge0 (1000baseT):
>> vge0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>>         capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
>>         capabilities=3f00<UDP4CSUM_Rx,UDP4CSUM_Tx>
>>         enabled=0
>>         ec_capabilities=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
>>         ec_enabled=2<VLAN_HWTAGGING>
>>         address: xx:xx:xx:xx:xx:xx
>>         media: Ethernet 1000baseT (100baseTX
>> full-duplex,flowcontrol,rxpause,txpause)
>>         status: active
> 
> It seems you  set "ifconfig vge0 media 1000baseT" and the resulted link
> is 100baseT. It would be good to try ifconfig vge0 media "1000baseT-FDX"
> 
> On my environment:
>> # ifconfig vge0
>> vge0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>>         capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
>>         capabilities=3f00<UDP4CSUM_Rx,UDP4CSUM_Tx>
>>         enabled=0
>>         ec_capabilities=7<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU>
>>         ec_enabled=2<VLAN_HWTAGGING>
>>         address: 00:02:2a:e0:4b:a9
>>         media: Ethernet 1000baseT full-duplex (1000baseT full-duplex,flowcontrol,rxpause,txpause)
>>         status: active

Even though the link was established as 1000baseTX-FDX,
vge0 got watchdog timeout as:
> vge0: soft reset timed outvge0: watchdog timeout

and repeat linkdown -> linkup -> watchdog. I suspect some addition
might be required into if_vge.c. stge0 doesn't have such problem.


> Thanks.
> 
>>         inet 192.168.1.10/24 broadcast 192.168.1.255 flags 0x0
>>         inet6 fe80::8c9e:c8a0:eb4b:731f%vge0/64 flags 0x0 scopeid 0x1
>>
>> Regards,
>> Andrius V
>>
>>
>> On Thu, Nov 14, 2019 at 11:48 AM Andrius V <vezhlys%gmail.com@localhost> wrote:
>>>
>>> Hi,
>>>
>>> Sure, will do sometime today, once the changes will be synced with
>>> fossil/git repos.
>>>
>>> On Thu, Nov 14, 2019 at 11:10 AM Masanobu SAITOH <msaitoh%execsw.org@localhost> wrote:
>>>>
>>>> The following reply was made to PR kern/42314; it has been noted by GNATS.
>>>>
>>>> From: Masanobu SAITOH <msaitoh%execsw.org@localhost>
>>>> To: Andrius V <vezhlys%gmail.com@localhost>
>>>> Cc: msaitoh%execsw.org@localhost, msaitoh%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
>>>>  netbsd-bugs%netbsd.org@localhost, tharada%oucrc.org@localhost, gnats-bugs%netbsd.org@localhost
>>>> Subject: Re: kern/42314: IC Plus IP100x PHY support
>>>> Date: Thu, 14 Nov 2019 18:09:20 +0900
>>>>
>>>>  On 2019/10/09 0:38, Andrius V wrote:
>>>>  > Hi,
>>>>  >
>>>>  >> It's merged!
>>>>  >
>>>>  > Thank you! Tested, working as expected.
>>>>  >
>>>>  >> Additional patch are also welcomed.
>>>>  >
>>>>  > Sure, if I will have something.
>>>>  >
>>>>  > Regards,
>>>>  > Andrius V
>>>>
>>>>  Could you test with the latest ipgphy.c(rev. 1.4)?
>>>>
>>>>  Also please show me the output of the dmesg (both MAC and PHY).
>>>>
>>>>  Thanks in advance.
>>>>
>>>>  --
>>>>  -----------------------------------------------
>>>>                  SAITOH Masanobu (msaitoh%execsw.org@localhost
>>>>                                   msaitoh%netbsd.org@localhost)
>>>>
> 
> 


-- 
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index