NVIDIA: SAUCE: net: phy: add 10G, 5G for fixed link

BugLink: https://bugs.launchpad.net/bugs/2072591

Issue: currently there is no support for
10G, 5G fixed link speed

Fix: Add 10G and 5G speed entries for the
fixed link case

http://nvbugs/3978991

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
Narayan Reddy
2021-08-23 01:53:58 +05:30
committed by Noah Wager
parent 6e23023359
commit ed47711ba2
+7
View File
@@ -8,6 +8,7 @@
* Anton Vorontsov <avorontsov@ru.mvista.com>
*
* Copyright (c) 2006-2007 MontaVista Software, Inc.
* Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/export.h>
#include <linux/mii.h>
@@ -29,6 +30,8 @@ enum {
SWMII_SPEED_10 = 0,
SWMII_SPEED_100,
SWMII_SPEED_1000,
SWMII_SPEED_5000,
SWMII_SPEED_10000,
SWMII_DUPLEX_HALF = 0,
SWMII_DUPLEX_FULL,
};
@@ -71,6 +74,10 @@ static const struct swmii_regs duplex[] = {
static int swphy_decode_speed(int speed)
{
switch (speed) {
case 10000:
return SWMII_SPEED_10000;
case 5000:
return SWMII_SPEED_5000;
case 1000:
return SWMII_SPEED_1000;
case 100: