From 0e1380683fae3fd042ff30274add110a45720aa1 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 23 Mar 2020 13:06:42 +1100 Subject: drivers/net/r8168: Fix ethernet_mac[0-9] format for vpd The format for VPD has changed s.t. the first NIC should always have a zero concat to the end. Adjust all the respective boards to shift back by one and adjust drivers/net friends to remove the 'special casing' of idx == 0. Background: https://chromeos.google.com/partner/dlm/docs/factory/vpd.html#field-ethernet_macn V.2: Fixup a code comment typo while we are here. V.3: Vary special casing semantics for idx==0 => default mac addr is set. V.4: Rework to still support the legacy path. BUG=b:152157720 BRANCH=none TEST=none Change-Id: Idf83cc621a9333186dabb668b22c4b78e211930a Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/coreboot/+/39771 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/net/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/drivers/net/Kconfig') diff --git a/src/drivers/net/Kconfig b/src/drivers/net/Kconfig index 92de1ed0e7..282075b31d 100644 --- a/src/drivers/net/Kconfig +++ b/src/drivers/net/Kconfig @@ -19,6 +19,14 @@ config RT8168_GET_MAC_FROM_VPD default n select REALTEK_8168_RESET +config RT8168_SUPPORT_LEGACY_VPD_MAC + bool + default n + help + Previously VPD expected that device_indexes set to zero were + special cased. Selecting this Kconfig restores the legacy + VPD format and behaviour. If unsure, you likely do not need this! + config RT8168_SET_LED_MODE bool default n -- cgit v1.2.3