lkml.org 
[lkml]   [2016]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 5/5] PCI: handle CRS returned by device after FLR
Date
An endpoint is allowed to issue CRS following an FLR request to indicate
that it is not ready to accept new requests. Changing the polling mechanism
in FLR wait function to go read the vendor ID instead of the command/status
register. A CRS indication will only be given if the address to be read is
vendor ID.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/pci/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e913467..1def11e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3729,7 +3729,8 @@ static void pci_flr_wait(struct pci_dev *dev)

do {
msleep(100);
- pci_read_config_dword(dev, PCI_COMMAND, &id);
+ pci_bus_read_dev_vendor_id(dev->bus, dev->devfn, &id,
+ 60 * 1000);
} while (i++ < 10 && id == ~0);

if (id == ~0)
--
1.9.1
\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.107 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site