Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, John Zhao. Maulik V Vaghela has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56024 )
Change subject: drivers/usb/acpi: Create function to get PLD information ......................................................................
Patch Set 6:
(1 comment)
File src/drivers/usb/acpi/usb_acpi.c:
https://review.coreboot.org/c/coreboot/+/56024/comment/a5a1a6e2_564069e2 PS6, Line 129: struct acpi_pld pld; : : if (!usb_device || !usb_device->chip_info || : usb_device->chip_ops != &drivers_usb_acpi_ops) : return NULL; : : if (config->use_custom_pld) : memcpy(&pld, &config->custom_pld, sizeof(pld)); : else : acpi_pld_fill_usb(&pld, config->type, &config->group); : : return &pld;
A hacky solution would be to fill &config->custom_pld and set config->use_custom_pld. […]
Can I add structure pointer PLD to chip.h and then malloc memory to it and reuse it?
struct drivers_usb_acpi_config *config;
if (!usb_device || !usb_device->chip_info || usb_device->chip_ops != &drivers_usb_acpi_ops) return NULL;
config = usb_device->chip_info;
if (config->use_custom_pld) return &config->custom_pld;
if (config->pld != NULL) { return config->pld;
config->pld = malloc(sizeof(*pld)); if (acpi_pld_fill_usb(config->pld, config->type, &config->group)) return NULL;
return config->pld;