From: Igal Liberman <[email protected]> In get_speed_string() we have an array (speed_strings[]) which includes all possible speed strings. This array size and content must be aligned to the speed defines in comphy_data.h.
This patch adds missing 5.125G speed, aligns speed_strings[] and fixes incorrect printing when speed > 5.0G. Signed-off-by: Igal Liberman <[email protected]> Signed-off-by: Stefan Roese <[email protected]> --- drivers/phy/marvell/comphy_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c index f1f061d7c116..835fc2e907f2 100644 --- a/drivers/phy/marvell/comphy_core.c +++ b/drivers/phy/marvell/comphy_core.c @@ -25,8 +25,9 @@ static const char *get_speed_string(u32 speed) { static const char * const speed_strings[] = { "1.25 Gbps", "1.5 Gbps", "2.5 Gbps", - "3.0 Gbps", "3.125 Gbps", "5 Gbps", "6 Gbps", - "6.25 Gbps", "10.31 Gbps" + "3.0 Gbps", "3.125 Gbps", "5 Gbps", + "5.125 Gpbs", "6 Gbps", "6.25 Gbps", + "10.3125 Gbps" }; if (speed < 0 || speed > COMPHY_SPEED_MAX) -- 2.31.0

