Lines Matching defs:eeprom
479 return adapter->hw.eeprom.word_size * 2;
484 struct ethtool_eeprom *eeprom, uint8_t *bytes)
493 if (eeprom->len == 0)
496 eeprom->magic = hw->vendor_id | (hw->device_id << 16);
498 first_word = eeprom->offset >> 1;
499 last_word = (eeprom->offset + eeprom->len - 1) >> 1;
506 if (hw->eeprom.type == e1000_eeprom_spi)
517 /* Device's eeprom is always little-endian, word addressable */
521 memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1),
522 eeprom->len);
530 struct ethtool_eeprom *eeprom, uint8_t *bytes)
539 if (eeprom->len == 0)
542 if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16)))
545 max_len = hw->eeprom.word_size * 2;
547 first_word = eeprom->offset >> 1;
548 last_word = (eeprom->offset + eeprom->len - 1) >> 1;
555 if (eeprom->offset & 1) {
562 if (((eeprom->offset + eeprom->len) & 1) && (ret_val == 0)) {
569 /* Device's eeprom is always little-endian, word addressable */
573 memcpy(ptr, bytes, eeprom->len);
1738 * unless it was enabled in the eeprom for port B