Skip to content

Commit 897b934

Browse files
dcskidmoJeff Kirsher
authored andcommitted
ixgbe: cleanup to use cached mask value
We already cache this FW/SW semaphore mask so might as well use it for consistency. Signed-off-by: Don Skidmore <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent d5702de commit 897b934

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,7 @@ s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
606606
u32 device_type, u16 phy_data)
607607
{
608608
s32 status;
609-
u32 gssr;
610-
611-
if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
612-
gssr = IXGBE_GSSR_PHY1_SM;
613-
else
614-
gssr = IXGBE_GSSR_PHY0_SM;
609+
u32 gssr = hw->phy.phy_semaphore_mask;
615610

616611
if (hw->mac.ops.acquire_swfw_sync(hw, gssr) == 0) {
617612
status = ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,

0 commit comments

Comments
 (0)