Skip to content

Commit 43a5107

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Improve bnxt_probe_phy().
If the 2nd parameter fw_dflt is not set, we are calling bnxt_probe_phy() after the firmware has reset. There is no need to query the current PHY settings from firmware as these settings may be different from the ethtool settings that the driver will re-establish later. So return earlier in bnxt_probe_phy() to save one firmware call. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 83d8f5e commit 43a5107

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+3
-3
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11471,6 +11471,9 @@ static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt)
1147111471
rc);
1147211472
return rc;
1147311473
}
11474+
if (!fw_dflt)
11475+
return 0;
11476+
1147411477
rc = bnxt_update_link(bp, false);
1147511478
if (rc) {
1147611479
netdev_err(bp->dev, "Probe phy can't update link (rc: %x)\n",
@@ -11484,9 +11487,6 @@ static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt)
1148411487
if (link_info->auto_link_speeds && !link_info->support_auto_speeds)
1148511488
link_info->support_auto_speeds = link_info->support_speeds;
1148611489

11487-
if (!fw_dflt)
11488-
return 0;
11489-
1149011490
bnxt_init_ethtool_link_settings(bp);
1149111491
return 0;
1149211492
}

0 commit comments

Comments
 (0)