Skip to content

Commit

Permalink
bnx2x: do not deal with power if no capability
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Oct 18, 2010
1 parent e3dba81 commit adf5f6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,12 @@ int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state)
{
u16 pmcsr;

/* If there is no power capability, silently succeed */
if (!bp->pm_cap) {
DP(NETIF_MSG_HW, "No power capability. Breaking.\n");
return 0;
}

pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr);

switch (state) {
Expand Down

0 comments on commit adf5f6a

Please sign in to comment.