]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: improve selection of ethtool link modes
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 17 Nov 2020 16:15:20 +0000 (17:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Nov 2020 01:34:19 +0000 (17:34 -0800)
commit27cf242887f51f29f0a0f5135a1eafa55b60f4f9
treeb84a0bf7f564141c0209d89f8f9ab51f0597d053
parent45b9470267e0fadc941243e6c5a05febdcf32fd9
s390/qeth: improve selection of ethtool link modes

The link mode is a combination of port speed and port mode. But we
currently only consider the speed, and then typically select the
corresponding TP-based link mode. For 1G and 10G Fibre links this means
we display the wrong link modes.

Move the SPEED_* switch statements inside the PORT_* cases, and only
consider valid combinations where we can select the corresponding
link mode. Add the relevant link modes (1000baseX, 10000baseSR and
1000baseLR) that were introduced back with
commit 746f8e4b0406 ("net: ethtool: add support for 1000BaseX and missing 10G link modes").

To differentiate between 10000baseSR and 10000baseLR, use the detailed
media_type information that QUERY OAT provides.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_ethtool.c