linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0
@ 2018-01-02 17:00 Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 1/6] PCI: Protect restore with device lock to be consistent Sinan Kaya
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur; +Cc: Sinan Kaya, linux-arm-msm, linux-arm-kernel

Rev 3.1 Sec 2.3.1 Request Handling Rules:
Valid reset conditions after which a device is permitted to return CRS
are:
* Cold, Warm, and Hot Resets,
* FLR
* A reset initiated in response to a D3hot to D0 uninitialized

Try to reuse FLR implementation towards other reset types.

Changes from v2:
* Correct Conventional PCI spec reference for AF_FLR
* Commit message update to capitilize the first word following colon

Sinan Kaya (6):
  PCI: Protect restore with device lock to be consistent
  PCI: Handle FLR failure and allow other reset types
  PCI: Make pci_flr_wait() generic and rename to pci_dev_wait()
  PCI: Wait device ready after pci_pm_reset()
  PCI: Add a return type for pci_reset_bridge_secondary_bus()
  PCI: Add device wait after slot and bus reset

 drivers/pci/pci.c   | 70 ++++++++++++++++++++++++++++++++++-------------------
 include/linux/pci.h |  4 +--
 2 files changed, 47 insertions(+), 27 deletions(-)

-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH V3 1/6] PCI: Protect restore with device lock to be consistent
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 2/6] PCI: Handle FLR failure and allow other reset types Sinan Kaya
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: Sinan Kaya, linux-arm-msm, Bjorn Helgaas, open list, linux-arm-kernel

Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage
with device_lock()") added protection around pci_dev_restore() function so
that device specific remove callback does not cause a race condition
against hotplug.

pci_dev_lock() usage has been forgotten in two different places in the
code. Adding locks for pci_slot_restore() and moving pci_dev_restore()
inside the locks for pci_try_reset_function().

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 764ca7b..463b32d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4448,9 +4448,9 @@ int pci_try_reset_function(struct pci_dev *dev)
 
 	pci_dev_save_and_disable(dev);
 	rc = __pci_reset_function_locked(dev);
+	pci_dev_restore(dev);
 	pci_dev_unlock(dev);
 
-	pci_dev_restore(dev);
 	return rc;
 }
 EXPORT_SYMBOL_GPL(pci_try_reset_function);
@@ -4658,7 +4658,9 @@ static void pci_slot_restore(struct pci_slot *slot)
 	list_for_each_entry(dev, &slot->bus->devices, bus_list) {
 		if (!dev->slot || dev->slot != slot)
 			continue;
+		pci_dev_lock(dev);
 		pci_dev_restore(dev);
+		pci_dev_unlock(dev);
 		if (dev->subordinate)
 			pci_bus_restore(dev->subordinate);
 	}
-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V3 2/6] PCI: Handle FLR failure and allow other reset types
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 1/6] PCI: Protect restore with device lock to be consistent Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 3/6] PCI: Make pci_flr_wait() generic and rename to pci_dev_wait() Sinan Kaya
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Bjorn Helgaas, open list

pci_flr_wait() and pci_af_flr() functions assume graceful return even
though the device is inaccessible under error conditions.

Return -ENOTTY in error cases so that __pci_reset_function_locked() can
try other reset types if AF_FLR/FLR reset fails.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/pci.c   | 18 ++++++++++--------
 include/linux/pci.h |  2 +-
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 463b32d..ef15162 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3945,7 +3945,7 @@ int pci_wait_for_pending_transaction(struct pci_dev *dev)
 }
 EXPORT_SYMBOL(pci_wait_for_pending_transaction);
 
-static void pci_flr_wait(struct pci_dev *dev)
+static int pci_flr_wait(struct pci_dev *dev)
 {
 	int delay = 1, timeout = 60000;
 	u32 id;
@@ -3974,7 +3974,7 @@ static void pci_flr_wait(struct pci_dev *dev)
 		if (delay > timeout) {
 			dev_warn(&dev->dev, "not ready %dms after FLR; giving up\n",
 				 100 + delay - 1);
-			return;
+			return -ENOTTY;
 		}
 
 		if (delay > 1000)
@@ -3988,6 +3988,8 @@ static void pci_flr_wait(struct pci_dev *dev)
 
 	if (delay > 1000)
 		dev_info(&dev->dev, "ready %dms after FLR\n", 100 + delay - 1);
+
+	return 0;
 }
 
 /**
@@ -4016,13 +4018,13 @@ static bool pcie_has_flr(struct pci_dev *dev)
  * device supports FLR before calling this function, e.g. by using the
  * pcie_has_flr() helper.
  */
-void pcie_flr(struct pci_dev *dev)
+int pcie_flr(struct pci_dev *dev)
 {
 	if (!pci_wait_for_pending_transaction(dev))
 		dev_err(&dev->dev, "timed out waiting for pending transaction; performing function level reset anyway\n");
 
 	pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
-	pci_flr_wait(dev);
+	return pci_flr_wait(dev);
 }
 EXPORT_SYMBOL_GPL(pcie_flr);
 
@@ -4055,8 +4057,7 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
 		dev_err(&dev->dev, "timed out waiting for pending transaction; performing AF function level reset anyway\n");
 
 	pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);
-	pci_flr_wait(dev);
-	return 0;
+	return pci_flr_wait(dev);
 }
 
 /**
@@ -4307,8 +4308,9 @@ int __pci_reset_function_locked(struct pci_dev *dev)
 	if (rc != -ENOTTY)
 		return rc;
 	if (pcie_has_flr(dev)) {
-		pcie_flr(dev);
-		return 0;
+		rc = pcie_flr(dev);
+		if (rc != -ENOTTY)
+			return rc;
 	}
 	rc = pci_af_flr(dev, 0);
 	if (rc != -ENOTTY)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 66cca1c..0c1335a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1081,7 +1081,7 @@ static inline int pci_is_managed(struct pci_dev *pdev)
 int pcie_set_mps(struct pci_dev *dev, int mps);
 int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
 			  enum pcie_link_width *width);
-void pcie_flr(struct pci_dev *dev);
+int pcie_flr(struct pci_dev *dev);
 int __pci_reset_function_locked(struct pci_dev *dev);
 int pci_reset_function(struct pci_dev *dev);
 int pci_reset_function_locked(struct pci_dev *dev);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V3 3/6] PCI: Make pci_flr_wait() generic and rename to pci_dev_wait()
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 1/6] PCI: Protect restore with device lock to be consistent Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 2/6] PCI: Handle FLR failure and allow other reset types Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 4/6] PCI: Wait device ready after pci_pm_reset() Sinan Kaya
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: Sinan Kaya, linux-arm-msm, Bjorn Helgaas, open list, linux-arm-kernel

Rev 3.1 Sec 2.3.1 Request Handling Rules:
Valid reset conditions after which a device is permitted to return CRS
are:
* Cold, Warm, and Hot Resets,
* FLR
* A reset initiated in response to a D3hot to D0 uninitialized

Try to reuse FLR implementation towards other reset types.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
 drivers/pci/pci.c | 48 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 17 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index ef15162..736d809 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -125,6 +125,9 @@ static int __init pcie_port_pm_setup(char *str)
 }
 __setup("pcie_port_pm=", pcie_port_pm_setup);
 
+/* time to wait after a reset for device to become responsive */
+#define PCIE_RESET_READY_POLL_MS 60000
+
 /**
  * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
  * @bus: pointer to PCI bus structure to search
@@ -3945,20 +3948,13 @@ int pci_wait_for_pending_transaction(struct pci_dev *dev)
 }
 EXPORT_SYMBOL(pci_wait_for_pending_transaction);
 
-static int pci_flr_wait(struct pci_dev *dev)
+static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
 {
-	int delay = 1, timeout = 60000;
+	int delay = 1;
 	u32 id;
 
 	/*
-	 * Per PCIe r3.1, sec 6.6.2, a device must complete an FLR within
-	 * 100ms, but may silently discard requests while the FLR is in
-	 * progress.  Wait 100ms before trying to access the device.
-	 */
-	msleep(100);
-
-	/*
-	 * After 100ms, the device should not silently discard config
+	 * After reset, the device should not silently discard config
 	 * requests, but it may still indicate that it needs more time by
 	 * responding to them with CRS completions.  The Root Port will
 	 * generally synthesize ~0 data to complete the read (except when
@@ -3972,14 +3968,14 @@ static int pci_flr_wait(struct pci_dev *dev)
 	pci_read_config_dword(dev, PCI_COMMAND, &id);
 	while (id == ~0) {
 		if (delay > timeout) {
-			dev_warn(&dev->dev, "not ready %dms after FLR; giving up\n",
-				 100 + delay - 1);
+			dev_warn(&dev->dev, "not ready %dms after %s; giving up\n",
+				 delay - 1, reset_type);
 			return -ENOTTY;
 		}
 
 		if (delay > 1000)
-			dev_info(&dev->dev, "not ready %dms after FLR; waiting\n",
-				 100 + delay - 1);
+			dev_info(&dev->dev, "not ready %dms after %s; waiting\n",
+				 delay - 1, reset_type);
 
 		msleep(delay);
 		delay *= 2;
@@ -3987,7 +3983,8 @@ static int pci_flr_wait(struct pci_dev *dev)
 	}
 
 	if (delay > 1000)
-		dev_info(&dev->dev, "ready %dms after FLR\n", 100 + delay - 1);
+		dev_info(&dev->dev, "ready %dms after %s\n", delay - 1,
+			 reset_type);
 
 	return 0;
 }
@@ -4024,7 +4021,15 @@ int pcie_flr(struct pci_dev *dev)
 		dev_err(&dev->dev, "timed out waiting for pending transaction; performing function level reset anyway\n");
 
 	pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR);
-	return pci_flr_wait(dev);
+
+	/*
+	 * Per PCIe r3.1, sec 6.6.2, a device must complete an FLR within
+	 * 100ms, but may silently discard requests while the FLR is in
+	 * progress.  Wait 100ms before trying to access the device.
+	 */
+	msleep(100);
+
+	return pci_dev_wait(dev, "FLR", PCIE_RESET_READY_POLL_MS);
 }
 EXPORT_SYMBOL_GPL(pcie_flr);
 
@@ -4057,7 +4062,16 @@ static int pci_af_flr(struct pci_dev *dev, int probe)
 		dev_err(&dev->dev, "timed out waiting for pending transaction; performing AF function level reset anyway\n");
 
 	pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR);
-	return pci_flr_wait(dev);
+
+	/*
+	 * Per Advanced Capabilities for Conventional PCI ECN, 13 April 2006,
+	 * updated 27 July 2006; a device must complete an FLR within
+	 * 100ms, but may silently discard requests while the FLR is in
+	 * progress.  Wait 100ms before trying to access the device.
+	 */
+	msleep(100);
+
+	return pci_dev_wait(dev, "AF_FLR", PCIE_RESET_READY_POLL_MS);
 }
 
 /**
-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V3 4/6] PCI: Wait device ready after pci_pm_reset()
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
                   ` (2 preceding siblings ...)
  2018-01-02 17:00 ` [PATCH V3 3/6] PCI: Make pci_flr_wait() generic and rename to pci_dev_wait() Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 5/6] PCI: Add a return type for pci_reset_bridge_secondary_bus() Sinan Kaya
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: Sinan Kaya, linux-arm-msm, Bjorn Helgaas, open list, linux-arm-kernel

Rev 3.1 Sec 2.3.1 Request Handling Rules says a device can issue CRS
following a D3hot->D0 transition. Add pci_dev_wait() call to see if
device is available before returning.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 736d809..09eae93 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4116,7 +4116,7 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)
 	pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, csr);
 	pci_dev_d3_sleep(dev);
 
-	return 0;
+	return pci_dev_wait(dev, "PM D3->D0", PCIE_RESET_READY_POLL_MS);
 }
 
 void pci_reset_secondary_bus(struct pci_dev *dev)
-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V3 5/6] PCI: Add a return type for pci_reset_bridge_secondary_bus()
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
                   ` (3 preceding siblings ...)
  2018-01-02 17:00 ` [PATCH V3 4/6] PCI: Wait device ready after pci_pm_reset() Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-01-02 17:00 ` [PATCH V3 6/6] PCI: Add device wait after slot and bus reset Sinan Kaya
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Bjorn Helgaas, open list

Getting ready to return an error from pci_reset_bridge_secondary_bus() when
device is unreachable.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/pci.c   | 4 +++-
 include/linux/pci.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 09eae93..eae04aa 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4157,9 +4157,11 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
  * Use the bridge control register to assert reset on the secondary bus.
  * Devices on the secondary bus are left in power-on state.
  */
-void pci_reset_bridge_secondary_bus(struct pci_dev *dev)
+int pci_reset_bridge_secondary_bus(struct pci_dev *dev)
 {
 	pcibios_reset_secondary_bus(dev);
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus);
 
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0c1335a..dbd2ad2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1094,7 +1094,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
 int pci_try_reset_bus(struct pci_bus *bus);
 void pci_reset_secondary_bus(struct pci_dev *dev);
 void pcibios_reset_secondary_bus(struct pci_dev *dev);
-void pci_reset_bridge_secondary_bus(struct pci_dev *dev);
+int pci_reset_bridge_secondary_bus(struct pci_dev *dev);
 void pci_update_resource(struct pci_dev *dev, int resno);
 int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V3 6/6] PCI: Add device wait after slot and bus reset
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
                   ` (4 preceding siblings ...)
  2018-01-02 17:00 ` [PATCH V3 5/6] PCI: Add a return type for pci_reset_bridge_secondary_bus() Sinan Kaya
@ 2018-01-02 17:00 ` Sinan Kaya
  2018-02-25 22:25 ` [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
  2018-02-27 20:15 ` Bjorn Helgaas
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-01-02 17:00 UTC (permalink / raw)
  To: linux-pci, timur
  Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Bjorn Helgaas, open list

Rev 3.1 Sec 2.3.1 Request Handling Rules indicates that a device can issue
CRS following secondary bus reset. Handle device presence gracefully.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index eae04aa..2c9e9a9 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4161,7 +4161,7 @@ int pci_reset_bridge_secondary_bus(struct pci_dev *dev)
 {
 	pcibios_reset_secondary_bus(dev);
 
-	return 0;
+	return pci_dev_wait(dev, "bus reset", PCIE_RESET_READY_POLL_MS);
 }
 EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
                   ` (5 preceding siblings ...)
  2018-01-02 17:00 ` [PATCH V3 6/6] PCI: Add device wait after slot and bus reset Sinan Kaya
@ 2018-02-25 22:25 ` Sinan Kaya
  2018-02-27 20:15 ` Bjorn Helgaas
  7 siblings, 0 replies; 9+ messages in thread
From: Sinan Kaya @ 2018-02-25 22:25 UTC (permalink / raw)
  To: linux-pci, timur; +Cc: linux-arm-msm, linux-arm-kernel

Hi Bjorn,

On 1/2/2018 12:00 PM, Sinan Kaya wrote:
> Rev 3.1 Sec 2.3.1 Request Handling Rules:
> Valid reset conditions after which a device is permitted to return CRS
> are:
> * Cold, Warm, and Hot Resets,
> * FLR
> * A reset initiated in response to a D3hot to D0 uninitialized
> 
> Try to reuse FLR implementation towards other reset types.
> 
> Changes from v2:
> * Correct Conventional PCI spec reference for AF_FLR
> * Commit message update to capitilize the first word following colon
> 
> Sinan Kaya (6):
>   PCI: Protect restore with device lock to be consistent
>   PCI: Handle FLR failure and allow other reset types
>   PCI: Make pci_flr_wait() generic and rename to pci_dev_wait()
>   PCI: Wait device ready after pci_pm_reset()
>   PCI: Add a return type for pci_reset_bridge_secondary_bus()
>   PCI: Add device wait after slot and bus reset
> 
>  drivers/pci/pci.c   | 70 ++++++++++++++++++++++++++++++++++-------------------
>  include/linux/pci.h |  4 +--
>  2 files changed, 47 insertions(+), 27 deletions(-)
> 

Do you think this is ready for merge or do you have more feedback?

Sinan

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0
  2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
                   ` (6 preceding siblings ...)
  2018-02-25 22:25 ` [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
@ 2018-02-27 20:15 ` Bjorn Helgaas
  7 siblings, 0 replies; 9+ messages in thread
From: Bjorn Helgaas @ 2018-02-27 20:15 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: linux-pci, timur, linux-arm-kernel, linux-arm-msm

On Tue, Jan 02, 2018 at 12:00:17PM -0500, Sinan Kaya wrote:
> Rev 3.1 Sec 2.3.1 Request Handling Rules:
> Valid reset conditions after which a device is permitted to return CRS
> are:
> * Cold, Warm, and Hot Resets,
> * FLR
> * A reset initiated in response to a D3hot to D0 uninitialized
> 
> Try to reuse FLR implementation towards other reset types.
> 
> Changes from v2:
> * Correct Conventional PCI spec reference for AF_FLR
> * Commit message update to capitilize the first word following colon
> 
> Sinan Kaya (6):
>   PCI: Protect restore with device lock to be consistent
>   PCI: Handle FLR failure and allow other reset types
>   PCI: Make pci_flr_wait() generic and rename to pci_dev_wait()
>   PCI: Wait device ready after pci_pm_reset()
>   PCI: Add a return type for pci_reset_bridge_secondary_bus()
>   PCI: Add device wait after slot and bus reset
> 
>  drivers/pci/pci.c   | 70 ++++++++++++++++++++++++++++++++++-------------------
>  include/linux/pci.h |  4 +--
>  2 files changed, 47 insertions(+), 27 deletions(-)

Applied to pci/virtualization for v4.17, thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-02-27 20:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 17:00 [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 1/6] PCI: Protect restore with device lock to be consistent Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 2/6] PCI: Handle FLR failure and allow other reset types Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 3/6] PCI: Make pci_flr_wait() generic and rename to pci_dev_wait() Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 4/6] PCI: Wait device ready after pci_pm_reset() Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 5/6] PCI: Add a return type for pci_reset_bridge_secondary_bus() Sinan Kaya
2018-01-02 17:00 ` [PATCH V3 6/6] PCI: Add device wait after slot and bus reset Sinan Kaya
2018-02-25 22:25 ` [PATCH V3 0/6] PCI: handle CRS response following Hot Reset and D3hot->D0 Sinan Kaya
2018-02-27 20:15 ` 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).