|
@@ -1730,6 +1730,21 @@ s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
|
|
|
eeprom_data);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * ixgbe_is_sfp_probe - Returns true if SFP is being detected
|
|
|
+ * @hw: pointer to hardware structure
|
|
|
+ * @offset: eeprom offset to be read
|
|
|
+ * @addr: I2C address to be read
|
|
|
+ */
|
|
|
+static bool ixgbe_is_sfp_probe(struct ixgbe_hw *hw, u8 offset, u8 addr)
|
|
|
+{
|
|
|
+ if (addr == IXGBE_I2C_EEPROM_DEV_ADDR &&
|
|
|
+ offset == IXGBE_SFF_IDENTIFIER &&
|
|
|
+ hw->phy.sfp_type == ixgbe_sfp_type_not_present)
|
|
|
+ return true;
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* ixgbe_read_i2c_byte_generic_int - Reads 8 bit word over I2C
|
|
|
* @hw: pointer to hardware structure
|
|
@@ -1749,6 +1764,9 @@ static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
|
|
|
u32 swfw_mask = hw->phy.phy_semaphore_mask;
|
|
|
bool nack = true;
|
|
|
|
|
|
+ if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
|
|
|
+ max_retry = IXGBE_SFP_DETECT_RETRIES;
|
|
|
+
|
|
|
*data = 0;
|
|
|
|
|
|
do {
|