Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1738089 > unrolled thread
| Started by | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| First post | 2017-09-24 02:20 +0200 |
| Last post | 2017-09-24 02:30 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 5/5] PCI: add device wait after slot and bus reset Sinan Kaya <okaya@codeaurora.org> - 2017-09-24 02:20 +0200
Re: [PATCH 5/5] PCI: add device wait after slot and bus reset Sinan Kaya <okaya@codeaurora.org> - 2017-09-24 02:30 +0200
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Date | 2017-09-24 02:20 +0200 |
| Subject | [PATCH 5/5] PCI: add device wait after slot and bus reset |
| Message-ID | <ut2Ol-1AW-1@gated-at.bofh.it> |
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>
---
drivers/pci/pci.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 074adf9..7131aab 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4056,7 +4056,7 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe)
pci_reset_bridge_secondary_bus(dev->bus->self);
- return 0;
+ return pci_dev_wait(dev, "bus reset", 1000, 60000);
}
static int pci_reset_hotplug_slot(struct hotplug_slot *hotplug, int probe)
@@ -4077,6 +4077,7 @@ static int pci_reset_hotplug_slot(struct hotplug_slot *hotplug, int probe)
static int pci_dev_reset_slot_function(struct pci_dev *dev, int probe)
{
struct pci_dev *pdev;
+ int rc;
if (dev->subordinate || !dev->slot ||
dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET)
@@ -4086,7 +4087,11 @@ static int pci_dev_reset_slot_function(struct pci_dev *dev, int probe)
if (pdev != dev && pdev->slot == dev->slot)
return -ENOTTY;
- return pci_reset_hotplug_slot(dev->slot->hotplug, probe);
+ rc = pci_reset_hotplug_slot(dev->slot->hotplug, probe);
+ if (!rc && !probe)
+ rc = pci_dev_wait(dev, "slot reset", 1000, 60000);
+
+ return rc;
}
static void pci_dev_lock(struct pci_dev *dev)
--
1.9.1
[toc] | [next] | [standalone]
| From | Sinan Kaya <okaya@codeaurora.org> |
|---|---|
| Date | 2017-09-24 02:30 +0200 |
| Message-ID | <ut2Y1-1DY-1@gated-at.bofh.it> |
| In reply to | #1738089 |
On 9/23/2017 8:16 PM, Sinan Kaya wrote: > @@ -4056,7 +4056,7 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe) > > pci_reset_bridge_secondary_bus(dev->bus->self); > > - return 0; > + return pci_dev_wait(dev, "bus reset", 1000, 60000); > } This doesn't solve the warm reset message getting broadcasted. I wanted to get feedback on the direction first with this version. -- 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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web