Kapil Porwal has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70016 )
Change subject: drivers/net/r8168: Add support for ACPI DmaProperty ......................................................................
drivers/net/r8168: Add support for ACPI DmaProperty
BUG=b:259716145 TEST=TBD
Signed-off-by: Kapil Porwal kapilporwal@google.com Change-Id: I647230082362b1093b63793a201eba23a6289121 --- M src/drivers/net/chip.h M src/drivers/net/r8168.c 2 files changed, 29 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/70016/1
diff --git a/src/drivers/net/chip.h b/src/drivers/net/chip.h index f253cae..203707c 100644 --- a/src/drivers/net/chip.h +++ b/src/drivers/net/chip.h @@ -34,6 +34,10 @@
/* Allow kernel driver to enable ASPM L1.2. */ bool enable_aspm_l1_2; + + /* When set to true, this will add a _DSD which contains a single + property, `DmaProperty`, set to 1, under the ACPI Device. */ + bool add_acpi_dma_property; };
#endif /* __DRIVERS_R8168_CHIP_H__ */ diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c index 32e0275..585ee9d 100644 --- a/src/drivers/net/r8168.c +++ b/src/drivers/net/r8168.c @@ -24,6 +24,9 @@
#include "chip.h"
+/* ID for the DmaProperty in _DSD */ +#define ACPI_DSD_DMA_PROPERTY_UUID "70D24161-6DD5-4C9E-8070-705531292865" + #define NIC_TIMEOUT 1000
#define CMD_REG 0x37 @@ -400,6 +403,15 @@ if (config->wake) acpigen_write_PRW(config->wake, 3);
+ if (config->add_acpi_dma_property) { + struct acpi_dp *dsd, *pkg; + dsd = acpi_dp_new_table("_DSD"); + pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID); + acpi_dp_add_integer(pkg, "DmaProperty", 1); + acpi_dp_add_package(dsd, pkg); + acpi_dp_write(dsd); + } + acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */