Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firewire: core: handle device quirk of TASCAM FW-1884/FW-1804/FW-1082

TASCAM FW-1884/FW-1804/FW-1082 is too lazy to repspond to asynchronous
request at S400. The asynchronous transaction often results in timeout.
This is a problematic quirk.

This commit adds support for the quirk. When identifying the new quirk
flag, then the transaction speed is configured at S200.

Link: https://lore.kernel.org/r/20251018035532.287124-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+20 -1
+17 -1
drivers/firewire/core-device.c
··· 571 571 { 8, 0x17104800 }, 572 572 }; 573 573 574 + static const struct entry_match tascam_fw_series_matches[] = { 575 + { 1, 0x0300022e }, 576 + { 3, 0x8d000006 }, 577 + { 4, 0xd1000001 }, 578 + { 6, 0x1200022e }, 579 + { 8, 0xd4000004 }, 580 + }; 581 + 574 582 static int detect_quirks_by_root_directory(const u32 *root_directory, unsigned int length) 575 583 { 576 584 static const struct { ··· 590 582 .quirk = FW_DEVICE_QUIRK_ACK_PACKET_WITH_INVALID_PENDING_CODE, 591 583 .matches = motu_audio_express_matches, 592 584 .match_count = ARRAY_SIZE(motu_audio_express_matches), 585 + }, 586 + { 587 + .quirk = FW_DEVICE_QUIRK_UNSTABLE_AT_S400, 588 + .matches = tascam_fw_series_matches, 589 + .match_count = ARRAY_SIZE(tascam_fw_series_matches), 593 590 }, 594 591 }; 595 592 int quirks = 0; ··· 774 761 // Just prevent from torn writing/reading. 775 762 WRITE_ONCE(device->quirks, quirks); 776 763 777 - speed = device->node->max_speed; 764 + if (unlikely(quirks & FW_DEVICE_QUIRK_UNSTABLE_AT_S400)) 765 + speed = SCODE_200; 766 + else 767 + speed = device->node->max_speed; 778 768 779 769 // Determine the speed of 780 770 // - devices with link speed less than PHY speed,
+3
include/linux/firewire.h
··· 179 179 180 180 // MOTU Audio Express transfers acknowledge packet with 0x10 for pending state. 181 181 FW_DEVICE_QUIRK_ACK_PACKET_WITH_INVALID_PENDING_CODE = BIT(2), 182 + 183 + // TASCAM FW-1082/FW-1804/FW-1884 often freezes when receiving S400 packets. 184 + FW_DEVICE_QUIRK_UNSTABLE_AT_S400 = BIT(3), 182 185 }; 183 186 184 187 enum fw_device_state {