aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index d7b5bd047604..060d2ad2ac96 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -852,11 +852,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
852 852
853 status = hw->phy.ops.read_i2c_eeprom(hw, 853 status = hw->phy.ops.read_i2c_eeprom(hw,
854 IXGBE_SFF_IDENTIFIER, 854 IXGBE_SFF_IDENTIFIER,
855 &identifier); 855 &identifier);
856 856
857 if (status == IXGBE_ERR_SWFW_SYNC || 857 if (status != 0)
858 status == IXGBE_ERR_I2C ||
859 status == IXGBE_ERR_SFP_NOT_PRESENT)
860 goto err_read_i2c_eeprom; 858 goto err_read_i2c_eeprom;
861 859
862 /* LAN ID is needed for sfp_type determination */ 860 /* LAN ID is needed for sfp_type determination */
@@ -870,26 +868,20 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
870 IXGBE_SFF_1GBE_COMP_CODES, 868 IXGBE_SFF_1GBE_COMP_CODES,
871 &comp_codes_1g); 869 &comp_codes_1g);
872 870
873 if (status == IXGBE_ERR_SWFW_SYNC || 871 if (status != 0)
874 status == IXGBE_ERR_I2C ||
875 status == IXGBE_ERR_SFP_NOT_PRESENT)
876 goto err_read_i2c_eeprom; 872 goto err_read_i2c_eeprom;
877 873
878 status = hw->phy.ops.read_i2c_eeprom(hw, 874 status = hw->phy.ops.read_i2c_eeprom(hw,
879 IXGBE_SFF_10GBE_COMP_CODES, 875 IXGBE_SFF_10GBE_COMP_CODES,
880 &comp_codes_10g); 876 &comp_codes_10g);
881 877
882 if (status == IXGBE_ERR_SWFW_SYNC || 878 if (status != 0)
883 status == IXGBE_ERR_I2C ||
884 status == IXGBE_ERR_SFP_NOT_PRESENT)
885 goto err_read_i2c_eeprom; 879 goto err_read_i2c_eeprom;
886 status = hw->phy.ops.read_i2c_eeprom(hw, 880 status = hw->phy.ops.read_i2c_eeprom(hw,
887 IXGBE_SFF_CABLE_TECHNOLOGY, 881 IXGBE_SFF_CABLE_TECHNOLOGY,
888 &cable_tech); 882 &cable_tech);
889 883
890 if (status == IXGBE_ERR_SWFW_SYNC || 884 if (status != 0)
891 status == IXGBE_ERR_I2C ||
892 status == IXGBE_ERR_SFP_NOT_PRESENT)
893 goto err_read_i2c_eeprom; 885 goto err_read_i2c_eeprom;
894 886
895 /* ID Module 887 /* ID Module
@@ -984,30 +976,24 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
984 if (hw->phy.type != ixgbe_phy_nl) { 976 if (hw->phy.type != ixgbe_phy_nl) {
985 hw->phy.id = identifier; 977 hw->phy.id = identifier;
986 status = hw->phy.ops.read_i2c_eeprom(hw, 978 status = hw->phy.ops.read_i2c_eeprom(hw,
987 IXGBE_SFF_VENDOR_OUI_BYTE0, 979 IXGBE_SFF_VENDOR_OUI_BYTE0,
988 &oui_bytes[0]); 980 &oui_bytes[0]);
989 981
990 if (status == IXGBE_ERR_SWFW_SYNC || 982 if (status != 0)
991 status == IXGBE_ERR_I2C ||
992 status == IXGBE_ERR_SFP_NOT_PRESENT)
993 goto err_read_i2c_eeprom; 983 goto err_read_i2c_eeprom;
994 984
995 status = hw->phy.ops.read_i2c_eeprom(hw, 985 status = hw->phy.ops.read_i2c_eeprom(hw,
996 IXGBE_SFF_VENDOR_OUI_BYTE1, 986 IXGBE_SFF_VENDOR_OUI_BYTE1,
997 &oui_bytes[1]); 987 &oui_bytes[1]);
998 988
999 if (status == IXGBE_ERR_SWFW_SYNC || 989 if (status != 0)
1000 status == IXGBE_ERR_I2C ||
1001 status == IXGBE_ERR_SFP_NOT_PRESENT)
1002 goto err_read_i2c_eeprom; 990 goto err_read_i2c_eeprom;
1003 991
1004 status = hw->phy.ops.read_i2c_eeprom(hw, 992 status = hw->phy.ops.read_i2c_eeprom(hw,
1005 IXGBE_SFF_VENDOR_OUI_BYTE2, 993 IXGBE_SFF_VENDOR_OUI_BYTE2,
1006 &oui_bytes[2]); 994 &oui_bytes[2]);
1007 995
1008 if (status == IXGBE_ERR_SWFW_SYNC || 996 if (status != 0)
1009 status == IXGBE_ERR_I2C ||
1010 status == IXGBE_ERR_SFP_NOT_PRESENT)
1011 goto err_read_i2c_eeprom; 997 goto err_read_i2c_eeprom;
1012 998
1013 vendor_oui = 999 vendor_oui =