]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix speed/duplex information loss problem when executing ethtool ethx...
authorFuyun Liang <liangfuyun1@huawei.com>
Fri, 21 Sep 2018 15:41:47 +0000 (16:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Sep 2018 02:29:32 +0000 (19:29 -0700)
commitdb1d367f68da2e0541e0960bd310e133b8cf6b0a
treefebb232efedb68264bb0e54d13e99d9c828ce608
parent0e10bb1adc28381822925095b166e1ab59292f44
net: hns3: Fix speed/duplex information loss problem when executing ethtool ethx cmd of VF

Our VF has not implemented the ops for get_port_type. So when we executing
ethtool ethx cmd of VF, hns3_get_link_ksettings will return directly. And
we can not query anything.

To support get_link_ksettings for VF, this patch replaces get_port_type
with get_media_type. If the media type is HNAE3_MEDIA_TYPE_NONE,
hns3_get_link_ksettings will return link information of VF.

Fixes: 05afe79cba93 ("net: hns3: Refine hns3_get_link_ksettings()")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c