firewire: test: add test of device attributes for legacy AV/C device
Some legacy devices have configuration ROM against standard AV/C device.
They have vendor directory to store model identifier. It is described in
annex of the following document.
- Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading
Association)
In the case, current implementation of core function does not detect the
model identifier, thus device attributes and modalias of unit have lack of
it. Another KUnit test is required for the case, and this commit is for
the purpose.
The following output is the parse result for the hard-coded data, by
config-rom-pretty-printer in linux-firewire-utils
(https://git.kernel.org/pub/scm/utils/ieee1394/linux-firewire-utils.git/).
The data is written by my hand.
$ config-rom-pretty-printer < /tmp/rom.img
ROM header and bus information block
-----------------------------------------------------------------
1024
04199fe7 bus_info_length 4, crc_length 25, crc 40935
1028
31333934 bus_name "1394"
1032
e0644000 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 4 (32)
1036
00112233 company_id 001122 |
1040
44556677 device_id
220189779575 | EUI-64
4822678189205111
root directory
-----------------------------------------------------------------
1044
0005dace directory_length 5, crc 56014
1048
03012345 vendor
1052
0c0083c0 node capabilities: per IEEE 1394
1056
8d000009 --> eui-64 leaf at 1092
1060
d1000002 --> unit directory at 1068
1064
c3000004 --> vendor directory at 1080
unit directory at 1068
-----------------------------------------------------------------
1068
0002e107 directory_length 2, crc 57607
1072
12abcdef specifier id
1076
13543210 version
vendor directory at 1080
-----------------------------------------------------------------
1080
0002cb73 directory_length 2, crc 52083
1084
17fedcba model
1088
81000004 --> descriptor leaf at 1104
eui-64 leaf at 1092
-----------------------------------------------------------------
1092
00026dc1 leaf_length 2, crc 28097
1096
00112233 company_id 001122 |
1100
44556677 device_id
220189779575 | EUI-64
4822678189205111
descriptor leaf at 1104
-----------------------------------------------------------------
1104
00050e84 leaf_length 5, crc 3716
1108
00000000 textual descriptor
1112
00000000 minimal ASCII
1116
41424344 "ABCD"
1120
45464748 "EFGH"
1124
494a0000 "IJ"
Link: https://lore.kernel.org/r/20231221134849.603857-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>