net: hns3: fix the port information display when sfp is absent
authorYisen Zhuang <yisen.zhuang@huawei.com>
Wed, 6 Sep 2023 07:20:17 +0000 (15:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:04 +0000 (12:28 +0200)
commit1368067718648431f2b66abc13eabb4a92da1e1b
tree0a5eaebe6bb884315e0c67241ac3a6d9e61023f8
parent9bd9afd55c523670fac649b393288d0430419c26
net: hns3: fix the port information display when sfp is absent

[ Upstream commit 674d9591a32d01df75d6b5fffed4ef942a294376 ]

When sfp is absent or unidentified, the port type should be
displayed as PORT_OTHERS, rather than PORT_FIBRE.

Fixes: 88d10bd6f730 ("net: hns3: add support for multiple media type")
Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c