[Accton]Disable IR3507a by "i2cset -y -a" cmd #10385
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jostar Yang jostar_yang@accton.com.tw
Why I did it
IR chip will cause i2c block access fail for system eeprom or port eeprom. Old code use below cmd,
"i2cset -y 0 0x4 0xE5 0x01"
"i2cset -y 0 0x4 0x12 0x02"
But in current master code, i2c tools will limit i2c addr range.
Otherwise, it will show below fail.
Error: Chip address out of range (0x08-0x77)!
So add "-a", like "i2cset -y -a 0 0x4 0xE5 0x01" and "i2cset -y -a 0x4 0x12 0x02" to disable IR chip.
How I did it
Add '-a' to below cmd to disable IR chip,
"i2cset -y 0 0x4 0xE5 0x01"
"i2cset -y 0 0x4 0x12 0x02"
How to verify it
Test system eeprom,
In fail case(IR chip cause i2c block access fail),
root@as7326-56x:/home/admin# i2cdump -y -f 0 0x56 i
Error: Block read failed, return code -6
Set cmd to disable IR chip,
"i2cset -y 0 0x4 0xE5 0x01"
"i2cset -y 0 0x4 0x12 0x02"
root@as7326-56x:/home/admin# i2cdump -y -f 0 0x56
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 54 6c 76 49 6e 66 6f 00 01 00 a6 25 13 30 36 2f TlvInfo.?.?%?06/
10: 32 32 2f 32 30 31 38 20 31 37 3a 32 33 3a 31 38 22/2018 17:23:18
20: 27 04 52 30 43 42 28 1b 78 38 36 5f 36 34 2d 61 '?R0CB(?x86_64-a
30: 63 63 74 6f 6e 5f 61 73 37 33 32 36 5f 35 36 78 ccton_as7326_56x
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)