Commit b0735e8d authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/error'

- Use pci_channel_state_t instead of enum pci_channel_state (Luc Van
  Oostenryck)

- Simplify __aer_print_error() (Bjorn Helgaas)

- Log AER correctable errors as warning, not error (Matt Jolly)

- Rename pci_aer_clear_device_status() to pcie_clear_device_status() (Bjorn
  Helgaas)

- Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron)

* pci/error:
  PCI/ERR: Clear PCIe Device Status errors only if OS owns AER
  PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status()
  PCI/AER: Log correctable errors as warning, not error
  PCI/AER: Simplify __aer_print_error()
  PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state'
parents 3f906da7 068c29a2
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -79,7 +79,7 @@ This structure has the form::


	struct pci_error_handlers
	struct pci_error_handlers
	{
	{
		int (*error_detected)(struct pci_dev *dev, enum pci_channel_state);
		int (*error_detected)(struct pci_dev *dev, pci_channel_state_t);
		int (*mmio_enabled)(struct pci_dev *dev);
		int (*mmio_enabled)(struct pci_dev *dev);
		int (*slot_reset)(struct pci_dev *dev);
		int (*slot_reset)(struct pci_dev *dev);
		void (*resume)(struct pci_dev *dev);
		void (*resume)(struct pci_dev *dev);
@@ -87,11 +87,11 @@ This structure has the form::


The possible channel states are::
The possible channel states are::


	enum pci_channel_state {
	typedef enum {
		pci_channel_io_normal,  /* I/O channel is in normal state */
		pci_channel_io_normal,  /* I/O channel is in normal state */
		pci_channel_io_frozen,  /* I/O to channel is blocked */
		pci_channel_io_frozen,  /* I/O to channel is blocked */
		pci_channel_io_perm_failure, /* PCI card is dead */
		pci_channel_io_perm_failure, /* PCI card is dead */
	};
	} pci_channel_state_t;


Possible return values are::
Possible return values are::


@@ -348,7 +348,7 @@ STEP 6: Permanent Failure
-------------------------
-------------------------
A "permanent failure" has occurred, and the platform cannot recover
A "permanent failure" has occurred, and the platform cannot recover
the device.  The platform will call error_detected() with a
the device.  The platform will call error_detected() with a
pci_channel_state value of pci_channel_io_perm_failure.
pci_channel_state_t value of pci_channel_io_perm_failure.


The device driver should, at this point, assume the worst. It should
The device driver should, at this point, assume the worst. It should
cancel all pending I/O, refuse all new I/O, returning -EIO to
cancel all pending I/O, refuse all new I/O, returning -EIO to
+1 −1
Original line number Original line Diff line number Diff line
@@ -214,7 +214,7 @@ static void eeh_dev_save_state(struct eeh_dev *edev, void *userdata)
	pci_save_state(pdev);
	pci_save_state(pdev);
}
}


static void eeh_set_channel_state(struct eeh_pe *root, enum pci_channel_state s)
static void eeh_set_channel_state(struct eeh_pe *root, pci_channel_state_t s)
{
{
	struct eeh_pe *pe;
	struct eeh_pe *pe;
	struct eeh_dev *edev, *tmp;
	struct eeh_dev *edev, *tmp;
+1 −1
Original line number Original line Diff line number Diff line
@@ -625,7 +625,7 @@ static int rsxx_eeh_fifo_flush_poll(struct rsxx_cardinfo *card)
}
}


static pci_ers_result_t rsxx_error_detected(struct pci_dev *dev,
static pci_ers_result_t rsxx_error_detected(struct pci_dev *dev,
					    enum pci_channel_state error)
					    pci_channel_state_t error)
{
{
	int st;
	int st;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1267,7 +1267,7 @@ static void ioat_resume(struct ioatdma_device *ioat_dma)
#define DRV_NAME "ioatdma"
#define DRV_NAME "ioatdma"


static pci_ers_result_t ioat_pcie_error_detected(struct pci_dev *pdev,
static pci_ers_result_t ioat_pcie_error_detected(struct pci_dev *pdev,
						 enum pci_channel_state error)
						 pci_channel_state_t error)
{
{
	dev_dbg(&pdev->dev, "%s: PCIe AER error %d\n", DRV_NAME, error);
	dev_dbg(&pdev->dev, "%s: PCIe AER error %d\n", DRV_NAME, error);


+1 −1
Original line number Original line Diff line number Diff line
@@ -1186,7 +1186,7 @@ MODULE_DEVICE_TABLE(pci, ngene_id_tbl);
/****************************************************************************/
/****************************************************************************/


static pci_ers_result_t ngene_error_detected(struct pci_dev *dev,
static pci_ers_result_t ngene_error_detected(struct pci_dev *dev,
					     enum pci_channel_state state)
					     pci_channel_state_t state)
{
{
	dev_err(&dev->dev, "PCI error\n");
	dev_err(&dev->dev, "PCI error\n");
	if (state == pci_channel_io_perm_failure)
	if (state == pci_channel_io_perm_failure)
Loading