coreboot/src/drivers
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
..
amd/agesa drivers/amd/agesa: Fix AGESA heap deallocator 2018-01-19 18:35:16 +00:00
ams include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
aspeed src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
ati/ragexl src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog elog: Support logging S0ix sleep/wake info in elog 2017-10-19 00:42:49 +00:00
emulation/qemu src/drivers: Add license headers 2017-06-12 04:08:14 +02:00
generic device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c security/tpm: Change TPM naming for different layers. 2018-01-18 01:45:35 +00:00
intel security/tpm: Change TPM naming for different layers. 2018-01-18 01:45:35 +00:00
ipmi src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
lenovo drvs/lenovo/hybrid_graphics/romstage: Fix dGPU activation 2017-12-20 16:52:06 +00:00
maxim include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
mrc_cache drivers/mrc_cache: Always generate an FMAP region 2018-01-20 16:11:44 +00:00
net drivers/net: Add device index for multiple NIC cards 2018-01-22 23:04:34 +00:00
parade include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
pc80 security/tpm: Change TPM naming for different layers. 2018-01-18 01:45:35 +00:00
ricoh/rce822 buildsystem: Drop explicit (k)config.h includes 2016-12-08 19:46:53 +01:00
siemens/nc_fpga src: Fix all Siemens copyrights 2017-11-07 12:33:51 +00:00
sil/3114 src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
spi security/tpm: Change TPM naming for different layers. 2018-01-18 01:45:35 +00:00
ti include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00
uart drivers/uart8250mem: Check for zero base address 2017-10-16 00:12:35 +00:00
usb drivers/usb/Kconfig: remove USBDEBUG_DONGLE_BEAGLEBONE_BLACK 2017-09-28 01:32:49 +00:00
xgi src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
xpowers/axp209 include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00