OpenCloudOS-Kernel/drivers/net/ethernet/hisilicon/hns3/hns3vf
Jian Shen 88d10bd6f7 net: hns3: add support for multiple media type
Previously, we can only identify copper and fiber type, the
supported link modes of port information are always showing
SR type. This patch adds support for multiple media types,
include SR, LR CR, KR. Driver needs to query the media type
from firmware periodicly, and updates the port information.

The new port information looks like this:
Settings for eth0:
        Supported ports: [ FIBRE ]
        Supported link modes:   25000baseCR/Full
                                25000baseSR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: No
        Supported FEC modes: None BaseR
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        Current message level: 0x00000036 (54)
                               probe link ifdown ifup
        Link detected: yes

In order to be compatible with old firmware which only support
sfp speed, we remained using the same query command, and kept
the former logic.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-04 00:02:40 -04:00
..
Makefile net: hns3: fix compile error 2019-03-27 22:47:58 -07:00
hclgevf_cmd.c net: hns3: use atomic_t replace u32 for arq's count 2019-04-26 12:13:28 -04:00
hclgevf_cmd.h net: hns3: Enable HW GRO for Rev B(=0x21) HNS3 hardware 2018-11-15 09:44:46 -08:00
hclgevf_main.c net: hns3: add support for multiple media type 2019-05-04 00:02:40 -04:00
hclgevf_main.h net: hns3: add support for multiple media type 2019-05-04 00:02:40 -04:00
hclgevf_mbx.c net: hns3: use a reserved byte to identify need_resp flag 2019-04-26 12:13:28 -04:00