coreboot/src/drivers/net
Gaggery Tsai 1f84704636 drivers/net: Add device index for multiple NIC cards
This patch adds a member device_index to r8168 chip information which
allows driver to identify which NIC card requests MAC address.

In this implementation, only 10 NIC cards are supported, the device
index is in the range of 0 to 10. Regarding to MAC address mapping,
when there is only one NIC on DUT, it is treated as a special case
mapping to "ethernet_mac" in VPD for backward compatibility. When
there are multiple NICs on DUT, they are mapping to "ethernet_macN"
where N is [0-9].

Device tree configuration:
For single NIC: .device_index = "0", maps to "ethernet_mac"
For multiple NICs: .device_index = "[1-10]", maps to
"ethernet_mac[device_index - 1]"

BUG=b:69950854
BRANCH=None
TEST=Added device_index = [0-10] under /drivers/net in device tree &&
     Programmed the mac address to VPD in shell
     vpd -s ethernet_mac=<mac address> or
     vpd -s ethernet-mac[0-9]=<mac address> && reboot the system.
     Ensure the MAC address was fetched correctly by ifconfig command.

Change-Id: I108b9bfba39370c8906a2fa4d2b39b106e884e0c
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-on: https://review.coreboot.org/22984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-01-22 23:04:34 +00:00
..
chip.h drivers/net: Add device index for multiple NIC cards 2018-01-22 23:04:34 +00:00
Kconfig drivers/net/r8168: Add customized LED mode 2017-11-01 17:36:38 +00:00
Makefile.inc drivers/net/rt8168: Add a macaddress cbfsfile using Kconfig 2017-01-26 17:59:17 +01:00
ne2k.c src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
ns8390.h drivers: Trivial - drop trailing blank lines at EOF 2014-07-08 13:51:47 +02:00
r8168.c drivers/net: Add device index for multiple NIC cards 2018-01-22 23:04:34 +00:00