ixgbe: Remove second instance of lan_id variable
authorDon Skidmore <donald.c.skidmore@intel.com>
Fri, 19 Jun 2015 16:23:36 +0000 (12:23 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 2 Sep 2015 00:03:36 +0000 (17:03 -0700)
This patch removes the redundant lan_id in the phy struct and uses
the bus version.  Both variables exist and intend to represent the
STATUS register LAN_ID field.  However, phy.lan_id is not bit shifted
so the phy.lan_id = 0x0 for LAN Id 0 and phy.lan_id = 0x4 for LAN Id 1.
Where bus.lan_id is bit shifted so bus.lan_id = 0x0 for LAN Id 0 and
bus.lan_id = 0x1 for LAN Id 1. There seems no need for the additional
lan_id variable and this should make the code less confusing.

Signed-off-by: Donald C Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h

index 526a20bf74888b7c770a9381d63cc7a6a711bd09..740e566cca077bc20f3f722aca03fdab8417ff4b 100644 (file)
@@ -243,9 +243,7 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
        u16 ext_ability = 0;
 
        if (!hw->phy.phy_semaphore_mask) {
-               hw->phy.lan_id = IXGBE_READ_REG(hw, IXGBE_STATUS) &
-                                IXGBE_STATUS_LAN_ID_1;
-               if (hw->phy.lan_id)
+               if (hw->bus.lan_id)
                        hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY1_SM;
                else
                        hw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY0_SM;
index 1c5a5b3bbc7764ab3c648e9a95ab66f72c22009a..a3eec19c9fdf8010ec76c36c6eb27a01c8db1af5 100644 (file)
@@ -3381,7 +3381,6 @@ struct ixgbe_phy_info {
        bool                            sfp_setup_needed;
        u32                             revision;
        enum ixgbe_media_type           media_type;
-       u8                              lan_id;
        u32                             phy_semaphore_mask;
        bool                            reset_disable;
        ixgbe_autoneg_advertised        autoneg_advertised;