lkml.org 
[lkml]   [2018]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] PCI/AER: Determine AER ownership based on _OSC instead of HEST
On Thu, Nov 15, 2018 at 05:16:03PM -0600, Alexandru Gagniuc wrote:
> static void aer_set_firmware_first(struct pci_dev *pci_dev)
> {
> - int rc;
> - struct aer_hest_parse_info info = {
> - .pci_dev = pci_dev,
> - .firmware_first = 0,
> - };
> + struct pci_host_bridge *host = pci_find_host_bridge(pci_dev->bus);
>
> - rc = apei_hest_parse(aer_hest_parse, &info);
> -
> - if (rc)
> - pci_dev->__aer_firmware_first = 0;
> - else
> - pci_dev->__aer_firmware_first = info.firmware_first;
> + pci_dev->__aer_firmware_first = !host->native_aer;
> pci_dev->__aer_firmware_first_valid = 1;
> }

I think we can clean this up even more by removing the setter and the
__aer_firmware_first fields, and have the pcie_aer_get_firmware_first()
go directly to the host bride->native_aer.

\
 
 \ /
  Last update: 2018-11-16 00:48    [W:0.185 / U:7.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site