lkml.org 
[lkml]   [2013]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/3] PCI/AER: Fix incorrect return from aer_hest_parse()
    Date
    The function aer_hest_parse() is called to determine if the given
    PCI device is firmware first or not. The code loops through each
    section of the HEST table to look for a match. The bug is that
    the function always returns whether the last HEST section is firmware
    first. The fix stops the iteration once the info.firmware_first
    variable is set. This is similar to how the function aer_hest_parse_aff()
    stops the iteration.

    Signed-off-by: Betty Dall <betty.dall@hp.com>
    ---

    drivers/pci/pcie/aer/aerdrv_acpi.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)


    diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
    index 5194a7d..39b8671 100644
    --- a/drivers/pci/pcie/aer/aerdrv_acpi.c
    +++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
    @@ -42,6 +42,9 @@ static int aer_hest_parse(struct acpi_hest_header *hest_hdr, void *data)
    u8 bridge = 0;
    int ff = 0;

    + if (info->firmware_first)
    + return 0;
    +
    switch (hest_hdr->type) {
    case ACPI_HEST_TYPE_AER_ROOT_PORT:
    pcie_type = PCI_EXP_TYPE_ROOT_PORT;

    \
     
     \ /
      Last update: 2013-05-28 22:21    [W:3.119 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site