net/ice: fix firmware version result of ethtool
[dpdk.git] / drivers / net / e1000 / base / e1000_phy.c
index 6bbb379..33f478b 100644 (file)
@@ -1833,9 +1833,9 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
                                             phy_data);
                if (ret_val)
                        return ret_val;
-       }
 
-       DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+               DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+       }
 
        ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
        if (ret_val)
@@ -4153,12 +4153,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data)
        *data = E1000_READ_REG(hw, E1000_MPHY_DATA);
 
        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }
 
        return E1000_SUCCESS;
 }
@@ -4218,12 +4219,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data,
        E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);
 
        /* Disable access to mPHY if it was originally disabled */
-       if (locked)
+       if (locked) {
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
                                E1000_MPHY_DIS_ACCESS);
+       }
 
        return E1000_SUCCESS;
 }