• Felipe Balbi's avatar
    PCI: Add support for Immediate Readiness · d6112f8d
    Felipe Balbi authored
    PCIe r4.0, sec 7.5.1.1.4 defines a new bit in the Status Register:
    
      Immediate Readiness – This optional bit, when Set, indicates the Function
      is guaranteed to be ready to successfully complete valid configuration
      accesses at any time following any reset that the host is capable of
      issuing Configuration Requests to this Function.
    
      When this bit is Set, for accesses to this Function, software is exempt
      from all requirements to delay configuration accesses following any type
      of reset, including but not limited to the timing requirements defined in
      Section 6.6.
    
    This means that all delays after a Conventional or Function Reset can be
    skipped.
    
    This patch reads such bit and caches its value in a flag inside struct
    pci_dev to be checked later if we should delay or can skip delays after a
    reset.  While at that, also move the explicit msleep(100) call from
    pcie_flr() and pci_af_flr() to pci_dev_wait().
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    [bhelgaas: rename PCI_STATUS_IMMEDIATE to PCI_STATUS_IMM_READY]
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    d6112f8d
pci.c 161 KB