<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/firewire/ohci.c, branch docs-6.8-2</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8-2</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.8-2'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2023-06-05T22:54:24+00:00</updated>
<entry>
<title>firewire: ohci: release buffer for AR req/resp contexts when managed resource is released</title>
<updated>2023-06-05T22:54:24+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5716e58aecdd4f7225c2e46ce903a839fc54f22f'/>
<id>urn:sha1:5716e58aecdd4f7225c2e46ce903a839fc54f22f</id>
<content type='text'>
The 1394 OHCI driver allocates several non-coherent DMA buffers for AR
request and response contexts. The buffers are mapped to kernel virtual
address (VMA) so that the first page locates after the last page. Even
when large payload of packet is handled crossing the boundary of buffers,
the driver operates continuously on VMA.

No kernel API is provided for this kind of mapping, while it is possible
to release the buffer when PCI device is going to be released.

This commit moves the call of release helper function to the callback
function of release resources.

Link: https://lore.kernel.org/r/20230604054451.161076-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for content of configuration ROM</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=aeaf6aa8647182892f6bd63c5ae9faf4e73cbad0'/>
<id>urn:sha1:aeaf6aa8647182892f6bd63c5ae9faf4e73cbad0</id>
<content type='text'>
The 1394 OHCI driver allocates DMA coherent buffer to transfer content
of configuration ROM.

This commit utilizes managed device resource to maintain the lifetime of
buffer.

Link: https://lore.kernel.org/r/20230604054451.161076-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for IT, IR, AT/receive, and AT/request contexts</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=aa71e28d757244166c9ff50e4bc85cd83f2956fe'/>
<id>urn:sha1:aa71e28d757244166c9ff50e4bc85cd83f2956fe</id>
<content type='text'>
The 1394 OHCI driver allocates DMA coherent buffer for descriptors of IT,
IR, AT receive, and AT request contexts by the same way.

This commit utilizes managed device resource to maintain the lifetime of
buffers.

Link: https://lore.kernel.org/r/20230604054451.161076-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for list of isochronous contexts</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=30d97fd7e30b6ba8ecef15c43797f90dad56ddab'/>
<id>urn:sha1:30d97fd7e30b6ba8ecef15c43797f90dad56ddab</id>
<content type='text'>
The 1394 OHCI driver allocates the list of isochronous contexts as much
as the hardware supports.

This commit utilizes managed device resource to maintain the lifetime of
list.

Link: https://lore.kernel.org/r/20230604054451.161076-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for requested IRQ</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5a95f1ded28691e69f7d6718c5dcbc149613d431'/>
<id>urn:sha1:5a95f1ded28691e69f7d6718c5dcbc149613d431</id>
<content type='text'>
The 1394 OHCI controller register handler to single interrupt number.

This commit uses managed device resource to maintain the lifetime of
requested IRQ.

Link: https://lore.kernel.org/r/20230604054451.161076-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for misc DMA buffer</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8320442b264a8d49b08f2730d63a39b2e0c146f8'/>
<id>urn:sha1:8320442b264a8d49b08f2730d63a39b2e0c146f8</id>
<content type='text'>
The 1394 OHCI driver allocates a DMA coherent buffer for multi-purposes.
The buffer is split into three region for specific purposes; i.e. 1/4 for
context descriptors of AR request and response as well as 1/2 for self
ID handling.

This commit uses managed device resource to maintain the lifetime of
buffer.

Link: https://lore.kernel.org/r/20230604054451.161076-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for MMIO region mapping</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=086a0afbe9bbcdf7e12cdc7e317a57f49fa35207'/>
<id>urn:sha1:086a0afbe9bbcdf7e12cdc7e317a57f49fa35207</id>
<content type='text'>
The PCI framework has the convenient helper function to check and map MMIO
region with managed device resource.

This commit elaborates 1394 OHCI driver to use the function.

Link: https://lore.kernel.org/r/20230604054451.161076-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for PCI-related resources</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=14f6ca5b6ae759046fdc461633043bb05ff6de58'/>
<id>urn:sha1:14f6ca5b6ae759046fdc461633043bb05ff6de58</id>
<content type='text'>
The PCI framework supports managed device resource to maintain the
lifetime of PCI specific resources.

This commit allows 1394 OHCI driver to utilize it.

Link: https://lore.kernel.org/r/20230604054451.161076-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: use devres for memory object of ohci structure</title>
<updated>2023-06-05T22:54:23+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T05:44:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f86319c02c3c5253ddebc21e81271c83421aaeb9'/>
<id>urn:sha1:f86319c02c3c5253ddebc21e81271c83421aaeb9</id>
<content type='text'>
The managed device resource (devres) framework is convenient to maintain
lifetime of allocated memory object for device.

This commit utilizes the framework for the object of ohci structure. The
extra operation for power management is required in Apple PowerMac based
machines, thus release callback is assigned to the object to call the
operation.

Link: https://lore.kernel.org/r/20230604054451.161076-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
</entry>
<entry>
<title>firewire: core: use union for callback of transaction completion</title>
<updated>2023-05-29T23:12:40+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-05-29T23:12:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dcadfd7f7c74ef9ee415e072a19bdf6c085159eb'/>
<id>urn:sha1:dcadfd7f7c74ef9ee415e072a19bdf6c085159eb</id>
<content type='text'>
In 1394 OHCI, the OUTPUT_LAST descriptor of Asynchronous Transmit (AT)
request context has timeStamp field, in which 1394 OHCI controller
record the isochronous cycle when the packet was sent for the request
subaction. Additionally, for the case of split transaction in IEEE 1394,
Asynchronous Receive (AT) request context is used for response subaction
to finish the transaction. The trailer quadlet of descriptor in the
context has timeStamp field, in which 1394 OHCI controller records the
isochronous cycle when the packet arrived.

Current implementation of 1394 OHCI controller driver stores values of
both fields to internal structure as time stamp, while Linux FireWire
subsystem provides no way to access to it. When using asynchronous
transaction service provided by the subsystem, callback function is passed
to kernel API. The prototype of callback function has the lack of argument
for the values.

This commit adds a new callback function for the purpose. It has an
additional argument to point to the constant array with two elements. For
backward compatibility to kernel space, a new union is also adds to wrap
two different prototype of callback function. The fw_transaction structure
has the union as a member and a boolean flag to express which function
callback is available.

The core function is changed to handle the two cases; with or without
time stamp. For the error path to process transaction, the isochronous
cycle is computed by current value of CYCLE_TIMER register in 1394 OHCI
controller. Especially for the case of timeout of split transaction, the
expected isochronous cycle is computed.

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