From 7d13f3ea4ef295a2e688ede982dcca69ae7947b6 Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 2 Jun 2021 21:41:38 +0000 Subject: [PATCH] Linux folks introduced "10gbase-r" since it is "more correct" and we're starting to see firmware that uses this instead of the "10gbase-kr" that was used before to describe the PHYs. So recognize both and treat that the same. ok deraadt@, patrick@ --- sys/dev/fdt/if_mvpp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c index dbf59d31757..0350b467354 100644 --- a/sys/dev/fdt/if_mvpp.c +++ b/sys/dev/fdt/if_mvpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvpp.c,v 1.44 2020/12/12 11:48:52 jan Exp $ */ +/* $OpenBSD: if_mvpp.c,v 1.45 2021/06/02 21:41:38 kettenis Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis * Copyright (c) 2017, 2020 Patrick Wildt @@ -1354,7 +1354,9 @@ mvpp2_port_attach(struct device *parent, struct device *self, void *aux) phy_mode = malloc(len, M_TEMP, M_WAITOK); OF_getprop(sc->sc_node, "phy-mode", phy_mode, len); - if (!strncmp(phy_mode, "10gbase-kr", strlen("10gbase-kr"))) + if (!strncmp(phy_mode, "10gbase-r", strlen("10gbase-r"))) + sc->sc_phy_mode = PHY_MODE_10GBASER; + else if (!strncmp(phy_mode, "10gbase-kr", strlen("10gbase-kr"))) sc->sc_phy_mode = PHY_MODE_10GBASER; else if (!strncmp(phy_mode, "2500base-x", strlen("2500base-x"))) sc->sc_phy_mode = PHY_MODE_2500BASEX; -- 2.20.1