forked from openbmc/entity-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FruDevice: improve warning messages in FRU parse logic
When got any warnings while formatFRU, is hard to understand which device cause it since formatFRU has no information about device address. This adds printing device address after parsing FRU data if error/warning occurs. Makes some check to be not critical (checksum error and non-zero bytes after EndOfFields) since we found invalid FRU in FLEXTRONICS S-1100ADU00-201 PSU where was wrong size in PRODUCT section header: 00000000 01 00 00 00 01 09 00 f5 01 09 19 cb 46 4c 45 58 |............FLEX| 00000010 54 52 4f 4e 49 43 53 cf 53 2d 31 31 30 30 41 44 |TRONICS.S-1100AD| 00000020 55 30 30 2d 32 30 31 ca 47 38 34 30 32 37 2d 30 |U00-201.G84027-0| 00000030 30 37 c2 30 31 cc 45 58 57 44 36 34 39 30 31 31 |07.01.EXWD649011| 00000040 32 31 c0 c0 c1 00 00 dc 00 02 18 3f a7 4c 04 28 |21.........?.L.(| 00000050 0a 37 05 28 23 b0 36 50 46 20 67 2f 3f 0a 1f f8 |.7.(#.6PF g/?...| 00000060 05 00 00 00 21 01 02 0d 6d 83 01 b0 04 74 04 ec |....!...m....t..| 00000070 04 78 00 00 00 ff ff 01 82 0d ae c2 82 b0 04 74 |.x.............t| 00000080 04 ec 04 78 00 00 00 34 08 |...x...4.| Also fixes some other messages. Tested: ensure there are expected messages in the log for FRU above: fru-device[355]: Checksum error in FRU area PRODUCT fru-device[355]: Computed checksum: 0xb0 fru-device[355]: The read checksum: 0x28 fru-device[355]: Non-zero byte after EndOfFields in FRU area PRODUCT fru-device[355]: there were warnings while parsing FRU for device at bus 7 address 82 Change-Id: I1e1d08ca0547ec4e6a8ce4e1f71a479622d5f243 Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
- Loading branch information
Andrei Kartashev
committed
Nov 25, 2020
1 parent
272bafd
commit b45324a
Showing
1 changed file
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters