Skip to contentSkip to conversation

PCI: Make reset warning messages different

PATCH Applied Gavin Shan 2 participants 2 messages Nov 12, 2014 – Nov 13, 2014 PCI

lore
Share & tools
lore

Gavin Shan

author
#0 lore raw

PATCH v2 1/1 PCI: Make reset warning messages different

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.

---
v2: Adjusted messages according to Bjorn's suggestion

---
 drivers/pci/pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pci/pci.c +4 -2
index 625a4ac..3f12383 100644
@@ -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);
Signature · 1 line
1.8.3.2
maintainer Applied
#1 lore raw
Quoted 6 lines · 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.

Applied to pci/misc for v3.19, thanks!

Quoted 33 lines

---
v2: Adjusted messages according to Bjorn's suggestion

---
 drivers/pci/pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pci/pci.c +4 -2
index 625a4ac..3f12383 100644
@@ -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);
Signature · 1 line
1.8.3.2