Skip to content

Commit b8a39dd

Browse files
YijingWangdavem330
authored andcommitted
Bnx2x: remove redundant D0 power state set
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 <[email protected]> Cc: Eilon Greenstein <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Yuval Mintz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2206209 commit b8a39dd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12091,7 +12091,7 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
1209112091
}
1209212092

1209312093
if (IS_PF(bp)) {
12094-
bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
12094+
bp->pm_cap = pdev->pm_cap;
1209512095
if (bp->pm_cap == 0) {
1209612096
dev_err(&bp->pdev->dev,
1209712097
"Cannot find power management capability, aborting\n");
@@ -12140,8 +12140,6 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
1214012140
}
1214112141
BNX2X_DEV_INFO("me reg PF num: %d\n", bp->pf_num);
1214212142

12143-
bnx2x_set_power_state(bp, PCI_D0);
12144-
1214512143
/* clean indirect addresses */
1214612144
pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS,
1214712145
PCICFG_VENDOR_ID_OFFSET);

0 commit comments

Comments
 (0)