OSDN Git Service

bnxt_en: Refactor the initialization of the ethtool link settings.
authorMichael Chan <michael.chan@broadcom.com>
Sun, 24 Nov 2019 03:30:47 +0000 (22:30 -0500)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 24 Nov 2019 22:48:02 +0000 (14:48 -0800)
commit8119e49b68fa1ec778f9ec8be05b5492046100b2
treeba65ca4fd7343ce4f87836f31bb2a672e24edea0
parent8a60efd1decbaf9ef71d4296b75ff262e653bd34
bnxt_en: Refactor the initialization of the ethtool link settings.

Refactor this logic in bnxt_probe_phy() into a separate function
bnxt_init_ethtool_link_settings().  It used to be that the settable
link settings will never be changed without going through ethtool.
So we only needed to do this once in bnxt_probe_phy().  Now, another
function sharing the port may change it and we may need to re-initialize
the ethtool settings again in run-time.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c