]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
igc: Remove unused phy_type enum
authorSasha Neftin <sasha.neftin@intel.com>
Sat, 23 Apr 2022 16:53:21 +0000 (19:53 +0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 10 May 2022 21:02:40 +0000 (14:02 -0700)
Complete to commit 8e153faf5827 ("igc: Remove unused phy type")
i225 parts have only one PHY. There is no point to use phy_type enum.
Clean up the code accordingly, and get rid of the unused enum lines.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_base.c
drivers/net/ethernet/intel/igc/igc_hw.h
drivers/net/ethernet/intel/igc/igc_phy.c

index f068b66b8025105bcb44e5ecc71c5ca43a6e0db4..a15927e77272036f65ad6ed67e3d642c2abf2f97 100644 (file)
@@ -182,8 +182,6 @@ static s32 igc_init_phy_params_base(struct igc_hw *hw)
 
        igc_check_for_copper_link(hw);
 
-       phy->type = igc_phy_i225;
-
 out:
        return ret_val;
 }
index b1e72ec5f1319dd59f48932fe79d663a55f41d24..360644f33d5f0151422d2efa5cf2213ef5e344af 100644 (file)
@@ -53,11 +53,6 @@ enum igc_mac_type {
        igc_num_macs  /* List is 1-based, so subtract 1 for true count. */
 };
 
-enum igc_phy_type {
-       igc_phy_unknown = 0,
-       igc_phy_i225,
-};
-
 enum igc_media_type {
        igc_media_type_unknown = 0,
        igc_media_type_copper = 1,
@@ -138,8 +133,6 @@ struct igc_nvm_info {
 struct igc_phy_info {
        struct igc_phy_operations ops;
 
-       enum igc_phy_type type;
-
        u32 addr;
        u32 id;
        u32 reset_delay_us; /* in usec */
index 6961f65d36b9a41793b028b8e580507f31818cf2..2140ad1e8443844450c3fbb21bd1eab6e265d75a 100644 (file)
@@ -148,17 +148,11 @@ void igc_power_down_phy_copper(struct igc_hw *hw)
 s32 igc_check_downshift(struct igc_hw *hw)
 {
        struct igc_phy_info *phy = &hw->phy;
-       s32 ret_val;
 
-       switch (phy->type) {
-       case igc_phy_i225:
-       default:
-               /* speed downshift not supported */
-               phy->speed_downgraded = false;
-               ret_val = 0;
-       }
+       /* speed downshift not supported */
+       phy->speed_downgraded = false;
 
-       return ret_val;
+       return 0;
 }
 
 /**