]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fbnic: Retire "AUTO" flags and cleanup handling of FW link settings
authorAlexander Duyck <alexanderduyck@fb.com>
Wed, 18 Jun 2025 22:07:35 +0000 (15:07 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 24 Jun 2025 07:31:45 +0000 (09:31 +0200)
commita6bbbc5bc4c671f6cd791a65743f0c6c83d69edd
treeb252784632be805976a1988d0a50e94a5473569d
parent3b180b227eb19fb37714293d601ad49dcc7cf08f
fbnic: Retire "AUTO" flags and cleanup handling of FW link settings

There were several issues in the way we were handling the link info coming
from firmware.

First is the fact that we were carrying around "AUTO" flags to indicate
that we needed to populate the values. We can just drop this and assume
that we will always be populating the settings from firmware. With this we
can also clean up the masking as the "AUTO" flags were just there to be
stripped anyway.

Second since we are getting rid of the "AUTO" setting we still need a way
to report that the link is not configured. We convert the link_mode "AUTO"
to "UNKNOWN" to do this. With this we can avoid reporting link up in the
phylink_pcs_get_state call as we will just set link to 0 and return without
updating the link speed. This is preferred versus the driver just forcing
50G which makes it harder to recover when the FW does start providing valid
settings.

With this the plan is to eventually replace the link_mode we use with the
interface_mode from phylink for all intents and purposes and have the two
be interchangeable. At that point we can convert the FW provided settings
over to something closer to link partner settings and give phylink greater
control of the interface allowing for user override of the settings and an
asynchronous setup of the link versus having to pull early settings from
firmware.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://patch.msgid.link/175028445548.625704.1367708155813490215.stgit@ahduyck-xeon-server.home.arpa
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic_mac.c
drivers/net/ethernet/meta/fbnic/fbnic_mac.h
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
drivers/net/ethernet/meta/fbnic/fbnic_phylink.c