All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] liquidio: use pcie_flr instead of duplicating it
@ 2017-05-16 14:21 Christoph Hellwig
  2017-05-16 20:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2017-05-16 14:21 UTC (permalink / raw)
  To: felix.manlunas, raghu.vatsavayi, satananda.burla, derek.chickles; +Cc: netdev

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Felix Manlunas <felix.manlunas@cavium.com>
---
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
index 34c77821fad9..d51c8d8d9a35 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
@@ -879,8 +879,6 @@ liquidio_vf_probe(struct pci_dev *pdev,
  */
 static void octeon_pci_flr(struct octeon_device *oct)
 {
-	u16 status;
-
 	pci_save_state(oct->pci_dev);
 
 	pci_cfg_access_lock(oct->pci_dev);
@@ -889,20 +887,7 @@ static void octeon_pci_flr(struct octeon_device *oct)
 	pci_write_config_word(oct->pci_dev, PCI_COMMAND,
 			      PCI_COMMAND_INTX_DISABLE);
 
-	/* Wait for Transaction Pending bit clean */
-	msleep(100);
-	pcie_capability_read_word(oct->pci_dev, PCI_EXP_DEVSTA, &status);
-	if (status & PCI_EXP_DEVSTA_TRPND) {
-		dev_info(&oct->pci_dev->dev, "Function reset incomplete after 100ms, sleeping for 5 seconds\n");
-		ssleep(5);
-		pcie_capability_read_word(oct->pci_dev, PCI_EXP_DEVSTA,
-					  &status);
-		if (status & PCI_EXP_DEVSTA_TRPND)
-			dev_info(&oct->pci_dev->dev, "Function reset still incomplete after 5s, reset anyway\n");
-	}
-	pcie_capability_set_word(oct->pci_dev, PCI_EXP_DEVCTL,
-				 PCI_EXP_DEVCTL_BCR_FLR);
-	mdelay(100);
+	pcie_flr(oct->pci_dev);
 
 	pci_cfg_access_unlock(oct->pci_dev);
 
-- 
2.11.0

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

* Re: [PATCH] liquidio: use pcie_flr instead of duplicating it
  2017-05-16 14:21 [PATCH] liquidio: use pcie_flr instead of duplicating it Christoph Hellwig
@ 2017-05-16 20:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-05-16 20:00 UTC (permalink / raw)
  To: hch
  Cc: felix.manlunas, raghu.vatsavayi, satananda.burla, derek.chickles, netdev

From: Christoph Hellwig <hch@lst.de>
Date: Tue, 16 May 2017 16:21:46 +0200

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Felix Manlunas <felix.manlunas@cavium.com>

Applied to net-next, thanks.

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

end of thread, other threads:[~2017-05-16 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 14:21 [PATCH] liquidio: use pcie_flr instead of duplicating it Christoph Hellwig
2017-05-16 20:00 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.