<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/pcie/err.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-11-20T17:47:39Z</updated>
<entry>
<title>PCI/ERR: Run error recovery callbacks for all affected devices</title>
<updated>2019-11-20T17:47:39Z</updated>
<author>
<name>Keith Busch</name>
</author>
<published>2018-09-20T16:27:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9de276a804c719f553fe9bc90b6b1998e8747557'/>
<id>urn:sha1:9de276a804c719f553fe9bc90b6b1998e8747557</id>
<content type='text'>
[ Upstream commit bfcb79fca19d267712e425af1dd48812c40dec0c ]

If an Endpoint reported an error with ERR_FATAL, we previously ran driver
error recovery callbacks only for the Endpoint's driver.  But if we reset a
Link to recover from the error, all downstream components are affected,
including the Endpoint, any multi-function peers, and children of those
peers.

Initiate the Link reset from the deepest Downstream Port that is
reliable, and call the error recovery callbacks for all its children.

If a Downstream Port (including a Root Port) reports an error, we assume
the Port itself is reliable and we need to reset its downstream Link.  In
all other cases (Switch Upstream Ports, Endpoints, Bridges, etc), we assume
the Link leading to the component needs to be reset, so we initiate the
reset at the parent Downstream Port.

This allows two other clean-ups.  First, we currently only use a Link
reset, which can only be initiated using a Downstream Port, so we can
remove checks for Endpoints.  Second, the Downstream Port where we initiate
the Link reset is reliable (unlike components downstream from it), so the
special cases for error detect and resume are no longer necessary.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Sinan Kaya &lt;okaya@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI/ERR: Use slot reset if available</title>
<updated>2019-11-20T17:47:13Z</updated>
<author>
<name>Keith Busch</name>
</author>
<published>2018-09-20T16:27:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3536c05af6f41877caa033b4a5c15063152d1562'/>
<id>urn:sha1:3536c05af6f41877caa033b4a5c15063152d1562</id>
<content type='text'>
[ Upstream commit c4eed62a214330908eec11b0dc170d34fa50b412 ]

The secondary bus reset may have link side effects that a hotplug capable
port may incorrectly react to.  Use the slot specific reset for hotplug
ports, fixing the undesirable link down-up handling during error
recovering.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
[bhelgaas: fold in
https://lore.kernel.org/linux-pci/20180926152326.14821-1-keith.busch@intel.com
for issue reported by Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Sinan Kaya &lt;okaya@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pci/virtualization'</title>
<updated>2018-08-15T19:59:06Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2018-08-15T19:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a48dc6fc260c9cac302a9ffaeab95359431c485'/>
<id>urn:sha1:3a48dc6fc260c9cac302a9ffaeab95359431c485</id>
<content type='text'>
  - To avoid bus errors, enable PASID only if entire path supports End-End
    TLP prefixes (Sinan Kaya)

  - Unify slot and bus reset functions and remove hotplug knowledge from
    callers (Sinan Kaya)

  - Add Function-Level Reset quirks for Intel and Samsung NVMe devices to
    fix guest reboot issues (Alex Williamson)

  - Add function 1 DMA alias quirk for Marvell 88SS9183 PCIe SSD Controller
    (Bjorn Helgaas)

* pci/virtualization:
  PCI: Add function 1 DMA alias quirk for Marvell 88SS9183
  PCI: Delay after FLR of Intel DC P3700 NVMe
  PCI: Disable Samsung SM961/PM961 NVMe before FLR
  PCI: Export pcie_has_flr()
  PCI: Rename pci_try_reset_bus() to pci_reset_bus()
  PCI: Deprecate pci_reset_bus() and pci_reset_slot() functions
  PCI: Unify try slot and bus reset API
  PCI: Hide pci_reset_bridge_secondary_bus() from drivers
  IB/hfi1: Use pci_try_reset_bus() for initiating PCI Secondary Bus Reset
  PCI: Handle error return from pci_reset_bridge_secondary_bus()
  PCI/IOV: Tidy pci_sriov_set_totalvfs()
  PCI: Enable PASID only if entire path supports End-End TLP prefixes

# Conflicts:
#	drivers/pci/hotplug/pciehp_hpc.c
</content>
</entry>
<entry>
<title>Merge branch 'pci/aer'</title>
<updated>2018-08-15T19:58:45Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2018-08-15T19:58:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c3ab37f4c03dc9c7c917ff3c1e71d6da81d3bd3'/>
<id>urn:sha1:3c3ab37f4c03dc9c7c917ff3c1e71d6da81d3bd3</id>
<content type='text'>
  - Decode AER errors with names similar to "lspci" (Tyler Baicar)

  - Expose AER statistics in sysfs (Rajat Jain)

  - Clear AER status bits selectively based on the type of recovery (Oza
    Pawandeep)

  - Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST (Alexandru
    Gagniuc)

  - Don't clear AER status bits if we're using the "Firmware-First"
    strategy where firmware owns the registers (Alexandru Gagniuc)

* pci/aer:
  PCI/AER: Don't clear AER bits if error handling is Firmware-First
  PCI/AER: Remove duplicate PCI_EXP_AER_FLAGS definition
  PCI/portdrv: Remove pcie_portdrv_err_handler.slot_reset
  PCI/AER: Clear device status bits during ERR_COR handling
  PCI/AER: Clear device status bits during ERR_FATAL and ERR_NONFATAL
  PCI/AER: Remove ERR_FATAL code from ERR_NONFATAL path
  PCI/AER: Factor out ERR_NONFATAL status bit clearing
  PCI/AER: Clear only ERR_NONFATAL bits during non-fatal recovery
  PCI/AER: Clear only ERR_FATAL status bits during fatal recovery
  PCI/AER: Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST
  PCI/AER: Add sysfs attributes for rootport cumulative stats
  PCI/AER: Add sysfs attributes to provide AER stats and breakdown
  PCI/AER: Define aer_stats structure for AER capable devices
  PCI/AER: Move internal declarations to drivers/pci/pci.h
  PCI/AER: Adopt lspci names for AER error decoding
  PCI/AER: Expose internal API for obtaining AER information

# Conflicts:
#	drivers/pci/pci.h
</content>
</entry>
<entry>
<title>PCI/AER: Work around use-after-free in pcie_do_fatal_recovery()</title>
<updated>2018-07-26T17:13:04Z</updated>
<author>
<name>Thomas Tai</name>
</author>
<published>2018-07-26T17:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd91b56cb3b27492963caeb5fccefe20a986ca8d'/>
<id>urn:sha1:bd91b56cb3b27492963caeb5fccefe20a986ca8d</id>
<content type='text'>
When an fatal error is received by a non-bridge device, the device is
removed, and pci_stop_and_remove_bus_device() deallocates the device
structure.  The freed device structure is used by subsequent code to send
uevents and print messages.

Hold a reference on the device until we're finished using it.  This is not
an ideal fix because pcie_do_fatal_recovery() should not use the device at
all after removing it, but that's too big a project for right now.

Fixes: 7e9084b36740 ("PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices")
Signed-off-by: Thomas Tai &lt;thomas.tai@oracle.com&gt;
[bhelgaas: changelog, reduce get/put coverage]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI/AER: Clear device status bits during ERR_FATAL and ERR_NONFATAL</title>
<updated>2018-07-20T20:27:11Z</updated>
<author>
<name>Oza Pawandeep</name>
</author>
<published>2018-07-19T22:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec752f5d54d723af3df03959637f963079643cd8'/>
<id>urn:sha1:ec752f5d54d723af3df03959637f963079643cd8</id>
<content type='text'>
Clear the device status bits while handling both ERR_FATAL and ERR_NONFATAL
cases.

Signed-off-by: Oza Pawandeep &lt;poza@codeaurora.org&gt;
[bhelgaas: rename to pci_aer_clear_device_status(), declare internal to PCI
core instead of exposing it everywhere]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/AER: Remove ERR_FATAL code from ERR_NONFATAL path</title>
<updated>2018-07-20T20:27:10Z</updated>
<author>
<name>Oza Pawandeep</name>
</author>
<published>2018-07-19T22:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43ec03a9e5f382ff70fdef35b4ea813263cd8270'/>
<id>urn:sha1:43ec03a9e5f382ff70fdef35b4ea813263cd8270</id>
<content type='text'>
broadcast_error_message() is only used for ERR_NONFATAL events, when the
state is always pci_channel_io_normal, so remove the unused alternate path.

Signed-off-by: Oza Pawandeep &lt;poza@codeaurora.org&gt;
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/AER: Clear only ERR_FATAL status bits during fatal recovery</title>
<updated>2018-07-20T20:27:07Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2018-07-19T22:55:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ab92e89bf8b0a93f0d53b6d83270e4cd0f7c563'/>
<id>urn:sha1:7ab92e89bf8b0a93f0d53b6d83270e4cd0f7c563</id>
<content type='text'>
During recovery from fatal errors, we previously called
pci_cleanup_aer_uncorrect_error_status(), which cleared *all* uncorrectable
error status bits (both ERR_FATAL and ERR_NONFATAL).

Instead, call a new pci_aer_clear_fatal_status() that clears only the
ERR_FATAL bits (as indicated by the PCI_ERR_UNCOR_SEVER register).

Based-on-patch-by: Oza Pawandeep &lt;poza@codeaurora.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Hide pci_reset_bridge_secondary_bus() from drivers</title>
<updated>2018-07-19T23:04:23Z</updated>
<author>
<name>Sinan Kaya</name>
</author>
<published>2018-07-19T23:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=381634cad15b711e033a2638d558232b60f753f6'/>
<id>urn:sha1:381634cad15b711e033a2638d558232b60f753f6</id>
<content type='text'>
Rename pci_reset_bridge_secondary_bus() to pci_bridge_secondary_bus_reset()
and move the declaration from linux/pci.h to drivers/pci.h to be used
internally in PCI directory only.

Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Handle error return from pci_reset_bridge_secondary_bus()</title>
<updated>2018-07-19T23:04:23Z</updated>
<author>
<name>Sinan Kaya</name>
</author>
<published>2018-07-19T23:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1842623850d09b0b1147d4974573aa305658d97f'/>
<id>urn:sha1:1842623850d09b0b1147d4974573aa305658d97f</id>
<content type='text'>
Commit 01fd61c0b9bd ("PCI: Add a return type for
pci_reset_bridge_secondary_bus()") added a return value to the function to
return if a device is accessible following a reset.  Callers are not
checking the value.

Pass error code up high in the stack if device is not accessible.

Fixes: 01fd61c0b9bd ("PCI: Add a return type for pci_reset_bridge_secondary_bus()")
Signed-off-by: Sinan Kaya &lt;okaya@codeaurora.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
</feed>
