summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-08-09 17:17:59 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-12-23 00:07:19 +0100
commitf1b215364763e37243af70e1c4da254a0d2c7ed3 (patch)
tree87a319663a6f48bfee1ca9b8b56468260da45685 /usr
parent413541dd66d51f791a0b169d9b9014e4f56be13c (diff)
downloadlinux-rtl-eeprom-3.13.tar.gz
r8169: add ethtool eeprom change/dump featurertl-eeprom-3.13
This adds the ability to read and change EEPROM for 93C46/93C56 serial EEPROM. Two-Wire serial interface and SPI are not supported. (Do not even try this for SPI or other chips, it may break your hardware.) Works with RTL8169SCL (driver detects RTL8169sb), with some quirks. Not sure if it is a hardware bug, but to be able to read EEPROM, one has to write something, e.g.: printf '\0\0' | ethtool -E eth0 magic 0x8169 offset 0x40 length 2 Otherwise, only zeroes are read. Another note for this NIC, one has to "enable" the eeprom by writing to it (as shown above) and then make the NIC to reload the contents from firmware such that the PCI ID gets detected correctly (10ec:8169 instead of 10ec:8129). Reload by writing 0x40 (Auto-load) to register 0x50 (9346CR): printf '\x40' | dd seek=80 bs=1 \ of=/sys/bus/pci/devices/0000:03:00.0/resource0 Then detach and rescan the PCI device (use `lspci -tv` to find parent): echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove echo 1 > /sys/bus/pci/devices/0000\:02\:00.0/rescan After this, this RTL8169sb PCI GbE NIC appears to work. On a second RTL8188E onboard GbE chip, EEPROM cannot be dumped, writing also does nothing. Here, reads all return FFs. Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions