<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firewire/core-cdev.c, branch v2.6.39</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=v2.6.39</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.39'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-01-23T11:31:01Z</updated>
<entry>
<title>firewire: core: fix card-&gt;reset_jiffies overflow</title>
<updated>2011-01-23T11:31:01Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-01-22T14:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e71084af58cf15e6043338500eeaf6281d0a62af'/>
<id>urn:sha1:e71084af58cf15e6043338500eeaf6281d0a62af</id>
<content type='text'>
On a 32-bit machine with, e.g., HZ=1000, jiffies will overflow after
about 50 days, so if there are between 25 and 50 days between bus
resets, the card-&gt;reset_jiffies comparisons can get wrong results.

To fix this, ensure that this timestamp always uses 64 bits.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: "Stefan Richter" &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: cdev: remove unneeded reference</title>
<updated>2011-01-23T11:31:01Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-01-10T16:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbc9880fa731fe2482a706bbabb4165269233063'/>
<id>urn:sha1:dbc9880fa731fe2482a706bbabb4165269233063</id>
<content type='text'>
For outbound transactions, the IDR's and the callback's references now
have exactly the same lifetime, so we do not need both of them.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: "Stefan Richter" &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: cdev: always wait for outbound transactions to complete</title>
<updated>2011-01-23T11:31:00Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-01-10T16:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a5e62da9be255439e8ce59f96828775b7b33374'/>
<id>urn:sha1:5a5e62da9be255439e8ce59f96828775b7b33374</id>
<content type='text'>
We must not use fw_cancel_transaction() because it cannot correctly
abort still-active transactions.  The only place in core-cdev where this
matters is when the file is released.  Instead of trying to abort the
transactions, we wait for them to complete normally, i.e., until all
outbound transaction resources have been removed from the IDR tree.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: "Stefan Richter" &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: cdev: remove unneeded idr_find() from complete_transaction()</title>
<updated>2011-01-23T11:31:00Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-01-10T16:28:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e204dfcaff0e7f6c4d9873fb8c9d948ec5ab2da'/>
<id>urn:sha1:3e204dfcaff0e7f6c4d9873fb8c9d948ec5ab2da</id>
<content type='text'>
Outbound transactions are never aborted with release_client_resource(),
so it is not necessary for complete_transaction() to check whether the
resource is still registered.  Only shutdown_resource() can abort such
an transaction, and this is already handled with the in_shutdown check.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: "Stefan Richter" &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: make PHY packet header format consistent</title>
<updated>2010-12-13T19:39:14Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2010-11-30T07:24:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b06db166c4d38638980283505259fa165d4f369'/>
<id>urn:sha1:5b06db166c4d38638980283505259fa165d4f369</id>
<content type='text'>
Change the header of PHY packets to be sent to include a pseudo
transaction code.  This makes the header consistent with that of
received PHY packets, and allows at_context_queue_packet() and
log_ar_at_event() to see the packet type directly instead of having
to deduce it from the header length or even from the header contents.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>Merge firewire branches to be released post v2.6.35</title>
<updated>2010-08-02T08:09:04Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-08-02T07:33:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e78483c5aeb0d7fbb0e365802145f1045e62957e'/>
<id>urn:sha1:e78483c5aeb0d7fbb0e365802145f1045e62957e</id>
<content type='text'>
Conflicts:
	drivers/firewire/core-card.c
	drivers/firewire/core-cdev.c

and forgotten #include &lt;linux/time.h&gt; in drivers/firewire/ohci.c

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: add isochronous multichannel reception</title>
<updated>2010-07-29T21:09:18Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-07-29T16:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=872e330e38806d835bd6c311c93ab998e2fb9058'/>
<id>urn:sha1:872e330e38806d835bd6c311c93ab998e2fb9058</id>
<content type='text'>
This adds the DMA context programming and userspace ABI for multichannel
reception, i.e. for listening on multiple channel numbers by means of a
single DMA context.

The use case is reception of more streams than there are IR DMA units
offered by the link layer.  This is already implemented by the older
ohci1394 + ieee1394 + raw1394 stack.  And as discussed recently on
linux1394-devel, this feature is occasionally used in practice.

The big drawbacks of this mode are that buffer layout and interrupt
generation necessarily differ from single-channel reception:  Headers
and trailers are not stripped from packets, packets are not aligned with
buffer chunks, interrupts are per buffer chunk, not per packet.

These drawbacks also cause a rather hefty code footprint to support this
rarely used OHCI-1394 feature.  (367 lines added, among them 94 lines of
added userspace ABI documentation.)

This implementation enforces that a multichannel reception context may
only listen to channels to which no single-channel context on the same
link layer is presently listening to.  OHCI-1394 would allow to overlay
single-channel contexts by the multi-channel context, but this would be
a departure from the present first-come-first-served policy of IR
context creation.

The implementation is heavily based on an earlier one by Jay Fenlason.
Thanks Jay.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: core: small clarifications in core-cdev</title>
<updated>2010-07-29T21:09:18Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-07-29T07:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae2a97661482c1d0f1aa41b837da95054d0e9a1b'/>
<id>urn:sha1:ae2a97661482c1d0f1aa41b837da95054d0e9a1b</id>
<content type='text'>
Make a note on the seemingly unused linux/sched.h.
Rename an irritatingly named variable.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: core: remove unused code</title>
<updated>2010-07-29T21:06:25Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-07-28T21:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69e61d0c07fa28a05f699723a88d49e0014019b6'/>
<id>urn:sha1:69e61d0c07fa28a05f699723a88d49e0014019b6</id>
<content type='text'>
ioctl_create_iso_context enforces ctx-&gt;header_size &gt;= 4.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: cdev: improve FW_CDEV_IOC_ALLOCATE</title>
<updated>2010-07-23T11:36:28Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-07-23T11:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e2b2b46ea4ca5ef790dddf78b360ed736a62d7c'/>
<id>urn:sha1:8e2b2b46ea4ca5ef790dddf78b360ed736a62d7c</id>
<content type='text'>
In both the ieee1394 stack and the firewire stack, the core treats
kernelspace drivers better than userspace drivers when it comes to
CSR address range allocation:  The former may request a register to be
placed automatically at a free spot anywhere inside a specified address
range.  The latter may only request a register at a fixed offset.

Hence, userspace drivers which do not require a fixed offset potentially
need to implement a retry loop with incremented offset in each retry
until the kernel does not fail allocation with EBUSY.  This awkward
procedure is not fundamentally necessary as the core already provides a
superior allocation API to kernelspace drivers.

Therefore change the ioctl() ABI by addition of a region_end member in
the existing struct fw_cdev_allocate.  Userspace and kernelspace APIs
work the same way now.

There is a small cost to pay by clients though:  If client source code
is required to compile with older kernel headers too, then any use of
the new member fw_cdev_allocate.region_end needs to be enclosed by
#ifdef/#endif directives.  However, any client program that seriously
wants to use address range allocations will require a kernel of cdev ABI
version &gt;= 4 at runtime and a linux/firewire-cdev.h header of &gt;= 4
anyway.  This is because v4 brings FW_CDEV_EVENT_REQUEST2.  The only
client program in which build-time compatibility with struct
fw_cdev_allocate as found in older kernel headers makes sense is
libraw1394.

(libraw1394 uses the older broken FW_CDEV_EVENT_REQUEST to implement a
makeshift, incorrect transaction responder that does at least work
somewhat in many simple scenarios, relying on guesswork by libraw1394
and by libraw1394 based applications.  Plus, address range allocation
and transaction responder is only one of many features that libraw1394
needs to provide, and these other features need to work with kernel and
kernel-headers as old as possible.  Any new linux/firewire-cdev.h based
client that implements a transaction responder should never attempt to
do it like libraw1394;  instead it should make a header and kernel of v4
or later a hard requirement.)

While we are at it, update the struct fw_cdev_allocate documentation to
better reflect the recent fw_cdev_event_request2 ABI addition.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
</feed>
