리눅스 ethtool 명령으로 ethernet 칩 레지스터의 값을 읽거나 쓸 수 있나요?

리눅스 ethtool 명령의 -d 옵션을 주면 이더넷 칩의 레지스터 값을 dump 할 수 있습니다.

그러면 ethtool 명령으로 이더넷칩 레지스터의 특정번지 값을 읽거나 쓸 수 있는지 궁금합니다.

    1개의 답변이 있어요!

    • ethtool 이 레지스터 값을 덤프하는 기능은 있지만, 특정번지 값을 변경할 수 있는 옵션은 없는것 같습니다

      하지만 레지스터 말고 eeprom ( 재프로그래밍 가능) 의 내용은 변경이 가능하네요

      그 이유는 rom 이 아닌 재프로그래밍 가능한 칩 eeprom 이기 때문입니다

      근데 특정번지의 레지스터값을 왜 바꾸시려고 하시는지???

      네트웍카드의 속도제어하는건 가능은 합니다

      -d --register-dump

      Retrieves and prints a register dump for the specified network device. The register format for some devices is known and decoded others are printed in hex. When raw is enabled, then ethtool dumps the raw register data to stdout. If file is specified, then use contents of previous raw register dump, rather than reading from the device.

      -e --eeprom-dump

      Retrieves and prints an EEPROM dump for the specified network device. When raw is enabled, then it dumps the raw EEPROM data to stdout. The length and offset parameters allow dumping certain portions of the EEPROM. Default is to dump the entire EEPROM.

      -E --change-eeprom

      If value is specified, changes EEPROM byte for the specified network device. offset and value specify which byte and it's new value. If value is not specified, stdin is read and written to the EEPROM. The length and offset parameters allow writing to certain portions of the EEPROM. Because of the persistent nature of writing to the EEPROM, a device-specific magic key must be specified to prevent the accidental writing to the EEPROM.