net: hns: bug fix about restart auto-negotiation

When set auto-negotiation off and duplex half, if run "ethtool -r ethX"
on port with phy, then the port will be failed to work. It should
forbid to start auto-negotiation when auto-negotiate is off. This
patch add the limited condition.

Reported-by: Jinchuang Tian <>
Signed-off-by: Daode Huang <>
Reviewed-by: Yisen Zhuang <>
Reviewed-by: lipeng <>
Signed-off-by: Salil Mehta <>
Signed-off-by: David S. Miller <>
1 file changed