Commit f252fa8e authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Jakub Kicinski

s390/qeth: clean up default cases for ethtool link mode

Remove the default case for PORT_* and SPEED_* in our ethtool code.

The only time these could be hit is if qeth_init_link_info() was unable
to determine the port type from an OSA adapter's link_type.
We already throw a message in this case, so reduce the noise and don't
report bad data (ie. it's much more likely that any future link_type
will represent a PORT_FIBRE link ...).
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent baf7998d
...@@ -343,9 +343,7 @@ static void qeth_set_ethtool_link_modes(struct ethtool_link_ksettings *cmd) ...@@ -343,9 +343,7 @@ static void qeth_set_ethtool_link_modes(struct ethtool_link_ksettings *cmd)
ethtool_link_ksettings_add_link_mode(cmd, advertising, FIBRE); ethtool_link_ksettings_add_link_mode(cmd, advertising, FIBRE);
break; break;
default: default:
ethtool_link_ksettings_add_link_mode(cmd, supported, TP); break;
ethtool_link_ksettings_add_link_mode(cmd, advertising, TP);
WARN_ON_ONCE(1);
} }
/* partially does fall through, to also select lower speeds */ /* partially does fall through, to also select lower speeds */
...@@ -393,15 +391,7 @@ static void qeth_set_ethtool_link_modes(struct ethtool_link_ksettings *cmd) ...@@ -393,15 +391,7 @@ static void qeth_set_ethtool_link_modes(struct ethtool_link_ksettings *cmd)
10baseT_Half); 10baseT_Half);
break; break;
default: default:
ethtool_link_ksettings_add_link_mode(cmd, supported, break;
10baseT_Full);
ethtool_link_ksettings_add_link_mode(cmd, advertising,
10baseT_Full);
ethtool_link_ksettings_add_link_mode(cmd, supported,
10baseT_Half);
ethtool_link_ksettings_add_link_mode(cmd, advertising,
10baseT_Half);
WARN_ON_ONCE(1);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment