igb: Enable media autosense for the i350.
authorManfred Rudigier <manfred.rudigier@omicronenergy.com>
Thu, 15 Aug 2019 20:55:19 +0000 (13:55 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 31 Oct 2019 21:03:16 +0000 (14:03 -0700)
This patch enables the hardware feature "Media Auto Sense" also on the
i350. It works in the same way as on the 82850 devices. Hardware designs
using dual PHYs (fiber/copper) can enable this feature by setting the MAS
enable bits in the NVM_COMPAT register (0x03) in the EEPROM.

Signed-off-by: Manfred Rudigier <manfred.rudigier@omicronenergy.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_82575.c
drivers/net/ethernet/intel/igb/igb_main.c

index 3ec2ce0725d536f2a2110f551e7f80371aaaf798..8a6ef351412921c729db50e686201b51ff4795ec 100644 (file)
@@ -466,7 +466,7 @@ static s32 igb_init_mac_params_82575(struct e1000_hw *hw)
                        ? igb_setup_copper_link_82575
                        : igb_setup_serdes_link_82575;
 
-       if (mac->type == e1000_82580) {
+       if (mac->type == e1000_82580 || mac->type == e1000_i350) {
                switch (hw->device_id) {
                /* feature not supported on these id's */
                case E1000_DEV_ID_DH89XXCC_SGMII:
index 31b9e02875cc2b3c5a3c7cd7c5d0c7ae7d48a557..17a961c3d6e476e2a7177865a9e893577c692f88 100644 (file)
@@ -2371,7 +2371,7 @@ void igb_reset(struct igb_adapter *adapter)
                adapter->ei.get_invariants(hw);
                adapter->flags &= ~IGB_FLAG_MEDIA_RESET;
        }
-       if ((mac->type == e1000_82575) &&
+       if ((mac->type == e1000_82575 || mac->type == e1000_i350) &&
            (adapter->flags & IGB_FLAG_MAS_ENABLE)) {
                igb_enable_mas(adapter);
        }