netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 12/19] niu: remove unnecessary read of PCI_CAP_ID_EXP
@ 2011-06-27 17:45 Jon Mason
  2011-06-28  4:41 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Mason @ 2011-06-27 17:45 UTC (permalink / raw)
  To: davem; +Cc: netdev

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
---
 drivers/net/niu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 1c7b790..cd6c231 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -9797,7 +9797,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
 		goto err_out_disable_pdev;
 	}
 
-	pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+	pos = pci_pcie_cap(pdev);
 	if (pos <= 0) {
 		dev_err(&pdev->dev, "Cannot find PCI Express capability, aborting\n");
 		goto err_out_free_res;
-- 
1.7.5.4


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

* Re: [PATCH 12/19] niu: remove unnecessary read of PCI_CAP_ID_EXP
  2011-06-27 17:45 [PATCH 12/19] niu: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
@ 2011-06-28  4:41 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-06-28  4:41 UTC (permalink / raw)
  To: jdmason; +Cc: netdev

From: Jon Mason <jdmason@kudzu.us>
Date: Mon, 27 Jun 2011 12:45:44 -0500

> The PCIE capability offset is saved during PCI bus walking.  It will
> remove an unnecessary search in the PCI configuration space if this
> value is referenced instead of reacquiring it.
> 
> Signed-off-by: Jon Mason <jdmason@kudzu.us>

Applied.

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

end of thread, other threads:[~2011-06-28  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-27 17:45 [PATCH 12/19] niu: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
2011-06-28  4:41 ` David Miller

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).