* [PATCH v2] PCI: Make reset warning messages different
@ 2014-11-12 2:41 Gavin Shan
2014-11-13 17:32 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2014-11-12 2:41 UTC (permalink / raw)
To: linux-pci; +Cc: bhelgaas, Gavin Shan
We have same warning message for FLR and AF FLR and users can't
know which type of resets the PCI device is taking when there are
pending transactions. The patch makes them different for FLR and
AF FLR cases.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
v2: Adjusted messages according to Bjorn's suggestion
---
drivers/pci/pci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 625a4ac..3f12383 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3144,7 +3144,8 @@ static int pcie_flr(struct pci_dev *dev, int probe)
return 0;
if (!pci_wait_for_pending_transaction(dev))
- dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n");
+ dev_err(&dev->dev, "timed out waiting for pending transaction; "
+ "performing function level reset\n");
pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
@@ -3178,7 +3179,8 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
PCI_AF_STATUS_TP << 8))
goto clear;
- dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n");
+ dev_err(&dev->dev, "timed out waiting for pending transaction; "
+ "performing AF function level reset\n");
clear:
pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] PCI: Make reset warning messages different
2014-11-12 2:41 [PATCH v2] PCI: Make reset warning messages different Gavin Shan
@ 2014-11-13 17:32 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2014-11-13 17:32 UTC (permalink / raw)
To: Gavin Shan; +Cc: linux-pci
On Wed, Nov 12, 2014 at 01:41:51PM +1100, Gavin Shan wrote:
> We have same warning message for FLR and AF FLR and users can't
> know which type of resets the PCI device is taking when there are
> pending transactions. The patch makes them different for FLR and
> AF FLR cases.
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to pci/misc for v3.19, thanks!
> ---
> v2: Adjusted messages according to Bjorn's suggestion
> ---
> drivers/pci/pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 625a4ac..3f12383 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -3144,7 +3144,8 @@ static int pcie_flr(struct pci_dev *dev, int probe)
> return 0;
>
> if (!pci_wait_for_pending_transaction(dev))
> - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n");
> + dev_err(&dev->dev, "timed out waiting for pending transaction; "
> + "performing function level reset\n");
>
> pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
>
> @@ -3178,7 +3179,8 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
> PCI_AF_STATUS_TP << 8))
> goto clear;
>
> - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n");
> + dev_err(&dev->dev, "timed out waiting for pending transaction; "
> + "performing AF function level reset\n");
>
> clear:
> pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);
> --
> 1.8.3.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-13 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 2:41 [PATCH v2] PCI: Make reset warning messages different Gavin Shan
2014-11-13 17:32 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).