<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firewire, branch v6.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-09-20T03:17:50Z</updated>
<entry>
<title>firewire: core: fix overlooked update of subsystem ABI version</title>
<updated>2025-09-20T03:17:50Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-09-20T02:51:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=853a57ba263adfecf4430b936d6862bc475b4bb5'/>
<id>urn:sha1:853a57ba263adfecf4430b936d6862bc475b4bb5</id>
<content type='text'>
In kernel v6.5, several functions were added to the cdev layer. This
required updating the default version of subsystem ABI up to 6, but
this requirement was overlooked.

This commit updates the version accordingly.

Fixes: 6add87e9764d ("firewire: cdev: add new version of ABI to notify time stamp at request/response subaction of transaction#")
Link: https://lore.kernel.org/r/20250920025148.163402-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: reallocate buffer for FCP address handlers when more than 4 are registered</title>
<updated>2025-08-03T12:20:15Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-08-03T12:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0342273e14c25971f2916de2b598db2e9cfeec15'/>
<id>urn:sha1:0342273e14c25971f2916de2b598db2e9cfeec15</id>
<content type='text'>
The former commit has a limitation that only up to 4 FCP address
handlers could be processed per request. Although it suffices for most
use cases, it is technically a regression.

This commit lifts the restriction by reallocating the buffer from kernel
heap when more than 4 handlers are registered. The allocation is performed
within RCU read-side critical section, thus it uses GCP_ATOMIC flag. The
buffer size is rounded up to the next power of two to align with kmalloc
allocation units.

Link: https://lore.kernel.org/r/20250803122015.236493-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: call FCP address handlers outside RCU read-side critical section</title>
<updated>2025-08-03T12:20:14Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-08-03T12:20:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e884a8a0c573ca5c191b269f31993733ecb6250e'/>
<id>urn:sha1:e884a8a0c573ca5c191b269f31993733ecb6250e</id>
<content type='text'>
The former commit added reference counting to ensure safe invocations of
address handlers. Unlike the exclusive-region address handlers, all FCP
address handlers should be called on receiving an FCP request.

This commit uses the part of kernel stack to collect address handlers up
to 4 within the section, then invoke them outside of the section.
Reference counting ensures that each handler remains valid and safe to
call.

Lifting the limitation of supporting only 4 handlers is left for next
work.

Link: https://lore.kernel.org/r/20250803122015.236493-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: call handler for exclusive regions outside RCU read-side critical section</title>
<updated>2025-08-03T12:20:13Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-08-03T12:20:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8cf6875005b017c293bf1b9be707c43f3eff9f4'/>
<id>urn:sha1:e8cf6875005b017c293bf1b9be707c43f3eff9f4</id>
<content type='text'>
The previous commit added reference counting to ensure safe invocations of
address handlers.

This commit moves the invocation of handlers for exclusive regions outside
of the RCU read-side critical section. The address handler for the
requested region is selected within the critical section, then invoked
outside of it.

Link: https://lore.kernel.org/r/20250803122015.236493-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: use reference counting to invoke address handlers safely</title>
<updated>2025-08-11T13:22:33Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-08-03T12:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c527c15cdda2e0a26a05ac15a44d3e14738fc55'/>
<id>urn:sha1:7c527c15cdda2e0a26a05ac15a44d3e14738fc55</id>
<content type='text'>
The lifetime of address handler has been managed by linked list and RCU.
This approach was introduced in commit 35202f7d8420 ("firewire: remove
global lock around address handlers, convert to RCU"). The invocations of
address handler are performed within RCU read-side critical sections.

In commit 57e6d9f85fff ("firewire: ohci: use workqueue to handle events
of AR request/response contexts"), the invocations are in a workqueue
context. The approach still imposes limitation that sleeping is not
allowed within RCU read-side critical sections. However, since sleeping
is not permitted within RCU read-side critical sections, this approach
still has a limitation.

This commit adds reference counting to decouple handler invocation from
handler discovery. The linked list and RCU is used to discover the
handlers, while the reference counting is used to invoke them safely.

Link: https://lore.kernel.org/r/20250803122015.236493-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: reduce the size of common context structure by extracting members into AT structure</title>
<updated>2025-07-12T12:52:16Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-07-10T13:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95a042a0c8ecd3c1e886648f6f6ab9c7e4403db9'/>
<id>urn:sha1:95a042a0c8ecd3c1e886648f6f6ab9c7e4403db9</id>
<content type='text'>
In commit 386a4153a2c1 ("firewire: ohci: cache the context run bit"), a
running member was added to the context structure to cache the running
state of a given DMA context. Although this member is accessible from IR,
IT, and AT contexts, it is currently used only by the AT context.

Additionally, the context structure includes a work item, which is also
used by the AT context. Both members are unnecessary for IR and IT
contexts.

This commit refactors the code by moving these two members into a new
structure specific to AT context.

Link: https://lore.kernel.org/r/20250710131916.31289-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: minor code refactoring to localize table of gap count</title>
<updated>2025-06-17T00:56:42Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-06-17T00:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81456710391d3e55e623b387f01830a50747fd75'/>
<id>urn:sha1:81456710391d3e55e623b387f01830a50747fd75</id>
<content type='text'>
The table for gap count is accessed by a single function. In this case,
it can be localized to the function.

Link: https://lore.kernel.org/r/20250617004320.477421-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use workqueue to handle events of AT request/response contexts</title>
<updated>2025-06-15T13:40:29Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-06-15T13:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aef6bcc0f278eba408751f8b3e0beae992e9faec'/>
<id>urn:sha1:aef6bcc0f278eba408751f8b3e0beae992e9faec</id>
<content type='text'>
This commit adds a work item to handle events of 1394 OHCI AT
request/response contexts, and queues the item to the specific
workqueue. The call of struct fw_packet.callbaqck() is done in the
workqueue when receiving acknowledgement to the asynchronous packet
transferred to remote node.

Link: https://lore.kernel.org/r/20250615133253.433057-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use workqueue to handle events of AR request/response contexts</title>
<updated>2025-06-15T13:40:29Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-06-15T13:32:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57e6d9f85fff3a71e667628474063c1bbb2fad20'/>
<id>urn:sha1:57e6d9f85fff3a71e667628474063c1bbb2fad20</id>
<content type='text'>
This commit adds a work item to handle events of 1394 OHCI AR
request/response contexts, and queues the item to the specific workqueue.
The call of struct fw_address_handler.address_callback() is done in the
workqueue when receiving any requests from the remove nodes. Additionally,
the call of struct fw_packet.callback() is done in the workqueue too when
receiving acknowledge to the asynchronous packet for the response
subaction of split transaction to the remote nodes.

Link: https://lore.kernel.org/r/20250615133253.433057-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: allocate workqueue for AR/AT request/response contexts</title>
<updated>2025-06-15T13:40:29Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2025-06-15T13:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72bf1441231ab421a380771e37a5c595493db178'/>
<id>urn:sha1:72bf1441231ab421a380771e37a5c595493db178</id>
<content type='text'>
Some tasklets (softIRQs) are still used as bottom-halves to handle
events for 1394 OHCI AR/AT contexts. However, using softIRQs for IRQ
bottom halves is generally discouraged today.

This commit adds a per-fw_card workqueue to accommodate the behaviour
specified by the 1394 OHCI specification.

According to the 1394 OHCI specification, system memory pages are
reserved for each asynchronous DMA context. This allows concurrent
operation across contexts. In the 1394 OHCI PCI driver implementation,
the hardware generates IRQs either upon receiving asynchronous packets
from other nodes (incoming) or after completing transmission to them
(outgoing). These independent events can occur in the same transmission
cycle, therefore the max_active parameter for the workqueue is set to the
total number of AR/AT contexts (=4). The WQ_UNBOUND flag is used to
allow the work to be scheduled on any available core, since there is
little CPU cache affinity benefit for the data.

Each DMA context uses a circular descriptor list in system memory,
allowing deferred data processing in software as long as buffer overrun
are avoided. Since the overall operation is sleepable except for small
atomic regions, WQ_BH is not used. As the descriptors contain
timestamps, WQ_HIGHPRI is specified to support semi-real-time
processing.

The asynchronous context is also used by the SCSI over IEEE 1394
protocol implementation (sbp2), which can be part of memory reclaim paths.
Therefore, WQ_MEM_RECLAIM is required.

To allow uses to adjust CPU affinity according to workload, WQ_SYSFS is
specified so that workqueue attributes are exposed to user space.

Link: https://lore.kernel.org/r/20250615133253.433057-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
</feed>
