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:
parent
2052514dc9
commit
70df7678f8
|
@ -294,13 +294,13 @@ int at93c46_op_write(struct pci_dev *d, uint8_t addr, uint16_t data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* endable write access */
|
/* enable write access */
|
||||||
int at93c46_op_ewen(struct pci_dev *d)
|
int at93c46_op_ewen(struct pci_dev *d)
|
||||||
{
|
{
|
||||||
return at93c46_op(d, AT93_OP_MISC, 0x30, 0);
|
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 at93c46_op_erase(struct pci_dev *d, uint8_t addr)
|
||||||
{
|
{
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
@ -317,6 +317,7 @@ int at93c46_op_erase(struct pci_dev *d, uint8_t addr)
|
||||||
//rc = rtlspi_xceive_bit(d, 0);
|
//rc = rtlspi_xceive_bit(d, 0);
|
||||||
if (rc == 1)
|
if (rc == 1)
|
||||||
break;
|
break;
|
||||||
|
rtlspi_delay();
|
||||||
}
|
}
|
||||||
rtlspi_pin_set(d, RTLSPI_CS, 0);
|
rtlspi_pin_set(d, RTLSPI_CS, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue