+ /* Need to check this a couple of times for a sane value.
+ *
+ * SFPs that have a uC slaved to the I2C bus (vs. a dumb EEPROM) can be
+ * poorly designed such that they will ACK I2C reads and return
+ * whatever bogus data is in the SRAM (or whatever is backing the target
+ * device) before things are truly initialized.
+ *
+ * In a perfect world devices would NAK I2C requests until they were
+ * sane, but here we are.
+ *
+ * Give such devices a couple tries to get their act together before
+ * marking the device as unsupported.
+ */
+ for (retries = 0; retries < 5; retries++) {
+ status = hw->phy.ops.read_i2c_eeprom(hw,
+ IXGBE_SFF_IDENTIFIER,
+ &identifier);
+
+ DEBUGOUT("status %d, SFF identifier 0x%x\n", status, identifier);
+ if (status == IXGBE_SUCCESS &&
+ identifier == IXGBE_SFF_IDENTIFIER_SFP)
+ break;
+ }