]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: add netif_carrier_off before change speed and duplex
authorPeng Li <lipeng321@huawei.com>
Mon, 27 Aug 2018 01:59:30 +0000 (09:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2018 01:08:20 +0000 (18:08 -0700)
commite9eb54096f04d070332f8fd8b70b3a7a0cabe953
tree1d0e8330fda26f8dfe73346cec46f01f159bdbe9
parentd08e2a25dbe45cba40211523a58f00e9de8d6704
net: hns: add netif_carrier_off before change speed and duplex

If there are packets in hardware when changing the speed
or duplex, it may cause hardware hang up.

This patch adds netif_carrier_off before change speed and
duplex in ethtool_ops.set_link_ksettings, and adds
netif_carrier_on after complete the change.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c