Wait a little longer for the erase to complete

Sometimes the erase operation would timeout, but the new MAC address was
still written:

$ /usr/sbin/rtl8168-eeprom -s 2:0 -m 00:0d:b9:4f:0f:7d
failed: 1

initializing pci access
building filter
starting bus iteration
found matching device (02:00.0), base_addr=0xf7c00000 (len=0)
Existing/Old MAC address: 00:0d:b9:4f:0f:7d
Saving EEPROM backup to 000DB94F0F7D.backup
Writing new MAC address 00:0d:b9:4f:0f:7d...
timeout during ERASE
Error during EEPROM WRITE, MAC address is corrupt!
This commit is contained in:
Daniel Willmann 2019-09-24 09:42:27 +02:00
parent 2052514dc9
commit 70df7678f8
1 changed files with 3 additions and 2 deletions

View File

@ -294,13 +294,13 @@ int at93c46_op_write(struct pci_dev *d, uint8_t addr, uint16_t data)
return 0;
}
/* endable write access */
/* enable write access */
int at93c46_op_ewen(struct pci_dev *d)
{
return at93c46_op(d, AT93_OP_MISC, 0x30, 0);
}
/* endable write access */
/* erase a word */
int at93c46_op_erase(struct pci_dev *d, uint8_t addr)
{
int i, rc;
@ -317,6 +317,7 @@ int at93c46_op_erase(struct pci_dev *d, uint8_t addr)
//rc = rtlspi_xceive_bit(d, 0);
if (rc == 1)
break;
rtlspi_delay();
}
rtlspi_pin_set(d, RTLSPI_CS, 0);