firewire: core: add test to detect unstable-at-s400 quirk in config ROM parser

TASCAM FireWire series devices have a quirk where they fail to respond to
asynchronous transactions at S400 speed. This quirk was supported by
commit d52bb3daad ("firewire: core: handle device quirk of TASCAM
FW-1884/FW-1804/FW-1082").

Add a KUnit test to verify that the configuration ROM parser detects the
quirk correctly. The configuration ROM content is retrieved from the
author's collection.

Link: https://lore.kernel.org/r/20260901134534.2386577-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
Takashi Sakamoto 2026-09-01 22:45:26 +09:00
parent 502e6d9c49
commit 7b9011c209

View File

@ -100,6 +100,39 @@ static const u32 motu_audioexpress_config_rom[] = {
0x000a8a7b,
};
static const u32 tascam_fw1884_config_rom[] = {
0x040f23c0,
0x31333934,
0x20ff7002,
0x00022eff,
0xfe800000,
0x0004bccc,
0x0300022e,
0x0c0083c0,
0x8d000006,
0xd1000001,
0x000347f5,
0x1200022e,
0x13800000,
0xd4000004,
0x000289aa,
0x00022eff,
0xfe800000,
0x0002ae47,
0x81000002,
0x82000006,
0x0004a79e,
0x00000000,
0x00000000,
0x54415343,
0x414d0000,
0x00045443,
0x00000000,
0x00000000,
0x46572d31,
0x38383400,
};
static const struct parser_test_case {
const char *name;
const u32 *quadlets;
@ -144,6 +177,17 @@ static const struct parser_test_case {
.expected_cmc = false,
.expected_irmc = false,
},
{
.name = "detect_unstable_at_s400_quirk",
.quadlets = tascam_fw1884_config_rom,
.quadlet_length = ARRAY_SIZE(tascam_fw1884_config_rom),
.phy_speed_in_self_id = SCODE_400,
.expected_speed = SCODE_200,
.expected_quirk = FW_DEVICE_QUIRK_UNSTABLE_AT_S400,
.expected_max_rec = 7,
.expected_cmc = false,
.expected_irmc = false,
},
};
// Define parser_test_gen_params.