diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-12-25 01:23:01 +0300 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-01-08 03:36:56 +0300 |
commit | b6a38057d06e282c1a4630db1d7b74548664a1d7 (patch) | |
tree | 4af58b89ff88985e7db1c02512c74e9630f40562 /drivers/firewire/device-attribute-test.c | |
parent | 58aae0a00e0d1d677d064280c69aa10038af97ea (diff) | |
download | linux-b6a38057d06e282c1a4630db1d7b74548664a1d7.tar.xz |
firewire: core: detect numeric model identifier for legacy layout of configuration ROM
As the part of support for legacy layout of configuration ROM, this
commit traverses vendor directory as well as root directory when showing
device attribute for node device. This change expects 'model' attribute
appears in node device, however it is probable to see the other types of
immediate values if the vendor directory includes.
Suggested-by: Adam Goldman <adamg@pobox.com>
Link: https://lore.kernel.org/r/20231221134849.603857-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/device-attribute-test.c')
-rw-r--r-- | drivers/firewire/device-attribute-test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firewire/device-attribute-test.c b/drivers/firewire/device-attribute-test.c index 495af65c33b5..689115433425 100644 --- a/drivers/firewire/device-attribute-test.c +++ b/drivers/firewire/device-attribute-test.c @@ -199,8 +199,9 @@ static void device_attr_legacy_avc(struct kunit *test) KUNIT_EXPECT_GT(test, show_immediate(node_dev, &config_rom_attributes[0].attr, buf), 0); KUNIT_EXPECT_STREQ(test, buf, "0x012345\n"); - // Model immediate entry is not found. - KUNIT_EXPECT_LT(test, show_immediate(node_dev, &config_rom_attributes[4].attr, buf), 0); + // Model immediate entry is found. + KUNIT_EXPECT_GT(test, show_immediate(node_dev, &config_rom_attributes[4].attr, buf), 0); + KUNIT_EXPECT_STREQ(test, buf, "0xfedcba\n"); // Descriptor leaf entry for vendor is not found. KUNIT_EXPECT_LT(test, show_text_leaf(node_dev, &config_rom_attributes[5].attr, buf), 0); |