Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310711
b: refs/heads/master
c: 470a542
h: refs/heads/master
i:
  310709: 1d4fee6
  310707: e788a5f
  310703: ac084b1
v: v3
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Jun 6, 2012
1 parent 7a7a743 commit 087a5a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc5cd894cace7bda4a743487a9f87d59a3f0a095
refs/heads/master: 470a54207ccf7045a59df727573bd9d148988582
6 changes: 4 additions & 2 deletions trunk/drivers/net/ethernet/intel/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ static int e1000_set_settings(struct net_device *netdev,
* When SoL/IDER sessions are active, autoneg/speed/duplex
* cannot be changed
*/
if (hw->phy.ops.check_reset_block(hw)) {
if (hw->phy.ops.check_reset_block &&
hw->phy.ops.check_reset_block(hw)) {
e_err("Cannot change link characteristics when SoL/IDER is active.\n");
return -EINVAL;
}
Expand Down Expand Up @@ -1615,7 +1616,8 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data)
* PHY loopback cannot be performed if SoL/IDER
* sessions are active
*/
if (hw->phy.ops.check_reset_block(hw)) {
if (hw->phy.ops.check_reset_block &&
hw->phy.ops.check_reset_block(hw)) {
e_err("Cannot do PHY loopback test when SoL/IDER is active.\n");
*data = 0;
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/intel/e1000e/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ s32 e1000e_setup_link_generic(struct e1000_hw *hw)
* In the case of the phy reset being blocked, we already have a link.
* We do not need to set it up again.
*/
if (hw->phy.ops.check_reset_block(hw))
if (hw->phy.ops.check_reset_block && hw->phy.ops.check_reset_block(hw))
return 0;

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6237,7 +6237,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
adapter->hw.phy.ms_type = e1000_ms_hw_default;
}

if (hw->phy.ops.check_reset_block(hw))
if (hw->phy.ops.check_reset_block && hw->phy.ops.check_reset_block(hw))
e_info("PHY reset is blocked due to SOL/IDER session.\n");

/* Set initial default active device features */
Expand Down Expand Up @@ -6404,7 +6404,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
if (!(adapter->flags & FLAG_HAS_AMT))
e1000e_release_hw_control(adapter);
err_eeprom:
if (!hw->phy.ops.check_reset_block(hw))
if (hw->phy.ops.check_reset_block && !hw->phy.ops.check_reset_block(hw))
e1000_phy_hw_reset(&adapter->hw);
err_hw_init:
kfree(adapter->tx_ring);
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/net/ethernet/intel/e1000e/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2155,9 +2155,11 @@ s32 e1000e_phy_hw_reset_generic(struct e1000_hw *hw)
s32 ret_val;
u32 ctrl;

ret_val = phy->ops.check_reset_block(hw);
if (ret_val)
return 0;
if (phy->ops.check_reset_block) {
ret_val = phy->ops.check_reset_block(hw);
if (ret_val)
return 0;
}

ret_val = phy->ops.acquire(hw);
if (ret_val)
Expand Down

0 comments on commit 087a5a9

Please sign in to comment.