linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] Bnx2x: remove redundant D0 power state set
@ 2013-06-18  8:05 Yijing Wang
  2013-06-18  9:37 ` Yuval Mintz
  2013-06-20  5:24 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Yijing Wang @ 2013-06-18  8:05 UTC (permalink / raw)
  To: David S. Miller
  Cc: linux-kernel, Hanjun Guo, jiang.liu, Yijing Wang,
	Eilon Greenstein, netdev

Pci_enable_device() will set device power state to D0,
so it's no need to do it again in bnx2x_init_dev().
Also remove redundant PM Cap find code, because pci core
has been saved the pci device pm cap value.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index b4c9dea..6ecd497 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -11959,7 +11959,7 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
 	}
 
 	if (IS_PF(bp)) {
-		bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
+		bp->pm_cap = pdev->pm_cap;
 		if (bp->pm_cap == 0) {
 			dev_err(&bp->pdev->dev,
 				"Cannot find power management capability, aborting\n");
@@ -12008,8 +12008,6 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
 	}
 	BNX2X_DEV_INFO("me reg PF num: %d\n", bp->pf_num);
 
-	bnx2x_set_power_state(bp, PCI_D0);
-
 	/* clean indirect addresses */
 	pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS,
 			       PCICFG_VENDOR_ID_OFFSET);
-- 
1.7.1



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

* RE: [PATCH 1/9] Bnx2x: remove redundant D0 power state set
  2013-06-18  8:05 [PATCH 1/9] Bnx2x: remove redundant D0 power state set Yijing Wang
@ 2013-06-18  9:37 ` Yuval Mintz
  2013-06-20  5:23   ` David Miller
  2013-06-20  5:24 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Yuval Mintz @ 2013-06-18  9:37 UTC (permalink / raw)
  To: Yijing Wang, David S. Miller
  Cc: linux-kernel, Hanjun Guo, jiang.liu, Eilon Greenstein, netdev

> Pci_enable_device() will set device power state to D0,
> so it's no need to do it again in bnx2x_init_dev().
> Also remove redundant PM Cap find code, because pci core
> has been saved the pci device pm cap value.
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Cc: Eilon Greenstein <eilong@broadcom.com>
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
[...]

Acked-by: Yuval Mintz <yuvalmin@broadcom.com>

Thanks,
Yuval


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

* Re: [PATCH 1/9] Bnx2x: remove redundant D0 power state set
  2013-06-18  9:37 ` Yuval Mintz
@ 2013-06-20  5:23   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-06-20  5:23 UTC (permalink / raw)
  To: yuvalmin; +Cc: wangyijing, linux-kernel, guohanjun, jiang.liu, eilong, netdev

From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Tue, 18 Jun 2013 09:37:27 +0000

>> Pci_enable_device() will set device power state to D0,
>> so it's no need to do it again in bnx2x_init_dev().
>> Also remove redundant PM Cap find code, because pci core
>> has been saved the pci device pm cap value.
>> 
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> Cc: Eilon Greenstein <eilong@broadcom.com>
>> Cc: netdev@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
> [...]
> 
> Acked-by: Yuval Mintz <yuvalmin@broadcom.com>

Applied.

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

* Re: [PATCH 1/9] Bnx2x: remove redundant D0 power state set
  2013-06-18  8:05 [PATCH 1/9] Bnx2x: remove redundant D0 power state set Yijing Wang
  2013-06-18  9:37 ` Yuval Mintz
@ 2013-06-20  5:24 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-06-20  5:24 UTC (permalink / raw)
  To: wangyijing; +Cc: linux-kernel, guohanjun, jiang.liu, eilong, netdev

From: Yijing Wang <wangyijing@huawei.com>
Date: Tue, 18 Jun 2013 16:05:39 +0800

> Pci_enable_device() will set device power state to D0,
> so it's no need to do it again in bnx2x_init_dev().
> Also remove redundant PM Cap find code, because pci core
> has been saved the pci device pm cap value.
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>

Applied.

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

end of thread, other threads:[~2013-06-20  5:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18  8:05 [PATCH 1/9] Bnx2x: remove redundant D0 power state set Yijing Wang
2013-06-18  9:37 ` Yuval Mintz
2013-06-20  5:23   ` David Miller
2013-06-20  5:24 ` 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).