Skip to contentSkip to conversation

firewire updates for v6.17 kernel

GIT PULL Merged Takashi Sakamoto 3 participants 4 messages Aug 2, 2025 – Aug 11, 2025

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please apply the changes from FireWire subsystem to your tree.

This update completes the removal of tasklet usage from the subsystem. The bottom halves for all 1394 OHCI DMA contexts are now handled by standard workqueues.

Based on observations from tracepoints events added between v6.10 and v6.11, the replacement appears to function as intended. However, an issue remains where 'schedule()' may be invoked within an RCU read-side critical section. A proposed fix for this issue has been submitted and is currently under review and testing. As the fix is still recent, it has been excluded from this PR, and will be sent after the release of v6.17-rc1.

The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:

Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git tags/firewire-updates-6.17

for you to fetch changes up to 95a042a0c8ecd3c1e886648f6f6ab9c7e4403db9:

firewire: ohci: reduce the size of common context structure by extracting members into AT structure (2025-07-12 21:52:16 +0900)

----------------------------------------------------------------
firewire updates for v6.17

This update replaces the remaining tasklet usage in the FireWire subsystem with workqueue for asynchronous packet transmission. With this change, tasklets are now fully eliminated from the subsystem.

Asynchronous packet transmission is used for serial bus topology management as well as for the operation of the SBP-2 protocol driver (firewire-sbp2). To ensure reliability during low-memory conditions, the associated workqueue is created with the WQ_MEM_RECLAIM flag, allowing it to participate in memory reclaim paths. Other attributes are aligned with those used for isochronous packet handling, which was migrated to workqueues in v6.12.

The workqueues are sleepable and support preemptible work items, making them more suitable for real-time workloads that benefit from timely task preemption at the system level.

There remains an issue where 'schedule()' may be called within an RCU read-side critical section, due to a direct replacement of 'tasklet_disable_in_atomic()' with 'disable_work_sync()'. A proposed fix for this has been posted[1], and is currently under review and testing. It is expected to be sent upstream later.

[1] https://lore.kernel.org/lkml/[email protected]/

----------------------------------------------------------------
Takashi Sakamoto (8):
firewire: ohci: correct code comments about bus_reset tasklet
firewire: ohci: use from_work() macro to expand parent structure of work_struct
firewire: core: use from_work() macro to expand parent structure of work_struct
firewire: core: allocate workqueue for AR/AT request/response contexts
firewire: ohci: use workqueue to handle events of AR request/response contexts
firewire: ohci: use workqueue to handle events of AT request/response contexts
firewire: core: minor code refactoring to localize table of gap count
firewire: ohci: reduce the size of common context structure by extracting members into AT structure

 drivers/firewire/core-card.c        |  59 +++++++++++++++++++++++++++++++++++++++--------------------
 drivers/firewire/core-cdev.c        |   3 +--
 drivers/firewire/core-device.c      |  15 +++++----------
 drivers/firewire/core-transaction.c |   7 ++++---
 drivers/firewire/net.c              |   4 ++--
 drivers/firewire/ohci.c             | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------
 include/linux/firewire.h            |  12 ++++++++++--
 7 files changed, 146 insertions(+), 116 deletions(-)

Regards

Takashi Sakamoto

merge bot Merged
#1 lore raw
The pull request you sent on Sat, 2 Aug 2025 14:49:17 +0900:

The pull request you sent on Sat, 2 Aug 2025 14:49:17 +0900:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git tags/firewire-updates-6.17

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7061835997daba9e73c723c85bd70bc4c44aef77

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
Tested-by
#2 lore raw
In reply to Takashi Sakamoto

Dear Mr. Sakamoto,
thank you for including me in the pull request, I am honored!

I tested the combination of this pull request and your fix patches [1] on arch 6.16.0-1-mainline (based on "Linux 6.16" 038d61fd6422) with TI XIO2213B and RME FireFace 800.

[1] https://lore.kernel.org/lkml/[email protected]/

So far audio playback seems perfectly stable:
days with varying CPU load, compiles, even mprime.
Suspend also seems fine, even without first powering down / disconnecting the FireFace.
Direct ALSA streaming or pipewire, no issues so far.

Thank you for keeping FireWire alive and even developing it!

Kind regards,
Edmund Raile

#3 lore raw

Hi Edmund,

Quoted 15 lines · edmund.raile

Dear Mr. Sakamoto,
thank you for including me in the pull request, I am honored!

I tested the combination of this pull request and your fix patches [1] on arch 6.16.0-1-mainline (based on "Linux 6.16" 038d61fd6422) with TI XIO2213B and RME FireFace 800.

[1] https://lore.kernel.org/lkml/[email protected]/

So far audio playback seems perfectly stable:
days with varying CPU load, compiles, even mprime.
Suspend also seems fine, even without first powering down / disconnecting the FireFace.
Direct ALSA streaming or pipewire, no issues so far.

Quoted 3 lines

Thank you for keeping FireWire alive and even developing it!

Thanks for your test, however it is my previous proposal. The latest one is "[PATCH v2 0/4] firewire: core: call address handlers outside RCU read-side critical section"[1]. The difference between two proposals is just to use kalloc helpers instead of XArray for FCP handlers allocation, thus not effects to your device.

Anyway, thanks.

[1] https://lore.kernel.org/lkml/[email protected]/

Regards

Takashi Sakamoto