sfc: handle limited FEC support
authorEdward Cree <ecree@solarflare.com>
Mon, 7 Sep 2020 16:15:08 +0000 (17:15 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 7 Sep 2020 21:46:13 +0000 (14:46 -0700)
commit400d64cf2d1ddedd798c9ff3c1cc03564e67ca5a
treef396949e6f223bb6ad6e9117f643d827f58b3ee7
parent4404c0898dc116b0d173620ed546609fab83007a
sfc: handle limited FEC support

If the reported PHY capabilities do not include a given FEC mode, don't
 attempt to select that FEC mode anyway.  If the user tries to set a mode
 through ethtool that is not supported, return an error.
The _REQUESTED bits don't appear in the supported caps, but are implied
 by the corresponding FEC bits.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/mcdi_port_common.c
drivers/net/ethernet/sfc/mcdi_port_common.h