OSDN Git Service

mlxbf_gige: support 10M/100M/1G speeds on BlueField-3
authorDavid Thompson <davthompson@nvidia.com>
Thu, 12 Jan 2023 20:26:07 +0000 (15:26 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Jan 2023 05:59:09 +0000 (21:59 -0800)
commit20d03d4d9437771a9b6d38d4a6027a70d78d9865
tree454ddf25a8b9f11f5e7aae7721bb1969bf58b2f1
parent2321d69f92aa7e6aa2cc98e7a8e005566943922f
mlxbf_gige: support 10M/100M/1G speeds on BlueField-3

The BlueField-3 OOB interface supports 10Mbps, 100Mbps, and 1Gbps speeds.
The external PHY is responsible for autonegotiating the speed with the
link partner. Once the autonegotiation is done, the BlueField PLU needs
to be configured accordingly.

This patch does two things:
1) Initialize the advertised control flow/duplex/speed in the probe
   based on the BlueField SoC generation (2 or 3)
2) Adjust the PLU speed config in the PHY interrupt handler

Signed-off-by: David Thompson <davthompson@nvidia.com>
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h