]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit1ad51a970ae89ec7ad290743896c42cd353c059f
tree6f3323cff76dc70a1ae4f75758d164e24fa5d7f1
parentb31482c65e199b1fb595f336a29ae6d4c1b8a634
net: hns3: Fix speed/duplex information loss problem when executing ethtool ethx cmd of VF

BugLink: https://bugs.launchpad.net/bugs/1810457
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: 12f46bc1d447 ("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>
(cherry picked from commit 5f373b1585234bb15c7377076d01af2aed62d0a2)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c