]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
cxgb4: do not return DUPLEX_UNKNOWN when link is down
authorGanesh Goudar <ganeshgr@chelsio.com>
Fri, 13 Jul 2018 12:26:55 +0000 (17:56 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jul 2018 20:43:10 +0000 (13:43 -0700)
commitbc1b50309ce19bb2ccb1340fa83ab56ca6da8f96
treef490a08e7116d14a0cf1a5697596973aadf4ea21
parentd9f37d01e294e5338aa3e9d3b2eda61b59b619df
cxgb4: do not return DUPLEX_UNKNOWN when link is down

We were returning DUPLEX_UNKNOWN in get_link_ksettings() when
the link was down.  Unfortunately, this causes a problem when
"ethtool -s autoneg on" is issued for a link which is down because
the ethtool code first reads the settings and then reapplies them
with only the changes provided on the command line. Which results
in us diving into set_link_ksettings() with DUPLEX_UNKNOWN which is
not DUPLEX_FULL, so set_link_ksettings() throws an -EINVAL error.
do not return DUPLEX_UNKNOWN to fix the issue.

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c