<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firewire/core.h, branch v3.4-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/firewire/core.h?h=v3.4-rc2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/firewire/core.h?h=v3.4-rc2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-03-18T21:15:39Z</updated>
<entry>
<title>firewire: allow explicit flushing of iso packet completions</title>
<updated>2012-03-18T21:15:39Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2012-03-18T18:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d1bbd20972936b9b178fda3eb1ec417cb27fdc01'/>
<id>urn:sha1:d1bbd20972936b9b178fda3eb1ec417cb27fdc01</id>
<content type='text'>
Extend the kernel and userspace APIs to allow reporting all currently
completed isochronous packets, even if the next interrupt packet has not
yet been reached.  This is required to determine the status of the
packets at the end of a paused or stopped stream, and useful for more
precise synchronization of audio streams.

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: core: prefix log messages with card name</title>
<updated>2012-02-22T21:36:00Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2012-02-18T21:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=26b4950de174bc96c27b77546370dec84fb75ae7'/>
<id>urn:sha1:26b4950de174bc96c27b77546370dec84fb75ae7</id>
<content type='text'>
Associate all log messages from firewire-core with the respective card
because some people have more than one card.  E.g.
    firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
    firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0
    firewire_core: created device fw0: GUID 0814438400000389, S800
    firewire_core: phy config: new root=ffc1, gap_count=5
    firewire_core: created device fw1: GUID 0814438400000388, S800
    firewire_core: created device fw2: GUID 0001d202e06800d1, S800
turns into
    firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
    firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0
    firewire_core 0000:04:00.0: created device fw0: GUID 0814438400000389, S800
    firewire_core 0000:04:00.0: phy config: new root=ffc1, gap_count=5
    firewire_core 0000:05:00.0: created device fw1: GUID 0814438400000388, S800
    firewire_core 0000:04:00.0: created device fw2: GUID 0001d202e06800d1, S800

This increases the module size slightly; to keep this in check, turn the
former printk wrapper macros into functions.  Their implementation is
largely copied from driver core's dev_printk counterparts.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: move fw_device reference counting from drivers to core</title>
<updated>2012-01-15T17:37:20Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-08-27T16:53:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=210762268466634ddbfaddb48fdf5181ce4b5f2d'/>
<id>urn:sha1:210762268466634ddbfaddb48fdf5181ce4b5f2d</id>
<content type='text'>
fw_unit device drivers invariably need to talk to the fw_unit's parent
(an fw_device) and grandparent (an fw_card).  firewire-core already
maintains an fw_card reference for the entire lifetime of an fw_device.
Likewise, let firewire-core maintain an fw_device reference for the
entire lifetime of an fw_unit so that fw_unit drivers don't have to.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>urn:sha1:60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>firewire: sbp2: parallelize login, reconnect, logout</title>
<updated>2011-05-10T20:53:46Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-05-01T18:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=105e53f863c04e1d9e5bb34bf753c9fdbce6a60c'/>
<id>urn:sha1:105e53f863c04e1d9e5bb34bf753c9fdbce6a60c</id>
<content type='text'>
The struct sbp2_logical_unit.work items can all be executed in parallel
but are not reentrant.  Furthermore, reconnect or re-login work must be
executed in a WQ_MEM_RECLAIM workqueue.

Hence replace the old single-threaded firewire-sbp2 workqueue by a
concurrency-managed but non-reentrant workqueue with rescuer.
firewire-core already maintains one, hence use this one.

In earlier versions of this change, I observed occasional failures of
parallel INQUIRY to an Initio INIC-2430 FireWire 800 to dual IDE bridge.
More testing indicates that parallel INQUIRY is not actually a problem,
but too quick successions of logout and login + INQUIRY, e.g. a quick
sequence of cable plugout and plugin, can result in failed INQUIRY.
This does not seem to be something that should or could be addressed by
serialization.

Another dual-LU device to which I currently have access to, an
OXUF924DSB FireWire 800 to dual SATA bridge with firmware from MacPower,
has been successfully tested with this too.

This change is beneficial to environments with two or more FireWire
storage devices, especially if they are located on the same bus.
Management tasks that should be performed as soon and as quickly as
possible, especially reconnect, are no longer held up by tasks on other
devices that may take a long time, especially login with INQUIRY and sd
or sr driver probe.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: core: use non-reentrant workqueue with rescuer</title>
<updated>2011-05-10T20:53:45Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2010-10-13T11:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ea9e7bbfc389a12d52646449a201fe933ccd663'/>
<id>urn:sha1:6ea9e7bbfc389a12d52646449a201fe933ccd663</id>
<content type='text'>
firewire-core manages the following types of work items:

fw_card.br_work:
  - resets the bus on a card and possibly sends a PHY packet before that
  - does not sleep for long or not at all
  - is scheduled via fw_schedule_bus_reset() by
      - firewire-ohci's pci_probe method
      - firewire-ohci's set_config_rom method, called by kernelspace
        protocol drivers and userspace drivers which add/remove
	Configuration ROM descriptors
      - userspace drivers which use the bus reset ioctl
      - itself if the last reset happened less than 2 seconds ago

fw_card.bm_work:
  - performs bus management duties
  - usually does not (but may in corner cases) sleep for long
  - is scheduled via fw_schedule_bm_work() by
      - firewire-ohci's self-ID-complete IRQ handler tasklet
      - firewire-core's fw_device.work instances whenever the root node
        device was (successfully or unsuccessfully) discovered,
	refreshed, or rediscovered
      - itself in case of resource allocation failures or in order to
        obey the 125ms bus manager arbitration interval

fw_device.work:
  - performs node probe, update, shutdown, revival, removal; including
    kernel driver probe, update, shutdown and bus reset notification to
    userspace drivers
  - usually sleeps moderately long, in corner cases very long
  - is scheduled by
      - firewire-ohci's self-ID-complete IRQ handler tasklet via the
        core's fw_node_event
      - firewire-ohci's pci_remove method via core's fw_destroy_nodes/
        fw_node_event
      - itself during retries, e.g. while a node is powering up

iso_resource.work:
  - accesses registers at the Isochronous Resource Manager node
  - usually does not (but may in corner cases) sleep for long
  - is scheduled via schedule_iso_resource() by
      - the owning userspace driver at addition and removal of the
        resource
      - firewire-core's fw_device.work instances after bus reset
      - itself in case of resource allocation if necessary to obey the
        1000ms reallocation period after bus reset

fw_card.br_work instances should not, and instances of the others must
not, be executed in parallel by multiple CPUs -- but were not protected
against that.  Hence allocate a non-reentrant workqueue for them.

fw_device.work may be used in the memory reclaim path in case of SBP-2
device updates.  Hence we need a workqueue with rescuer and cannot use
system_nrt_wq.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>firewire: optimize iso queueing by setting wake only after the last packet</title>
<updated>2011-05-10T20:53:45Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-05-02T07:33:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13882a82ee1646336c3996c93b4a560a55d2a419'/>
<id>urn:sha1:13882a82ee1646336c3996c93b4a560a55d2a419</id>
<content type='text'>
When queueing iso packets, the run time is dominated by the two
MMIO accesses that set the DMA context's wake bit.  Because most
drivers submit packets in batches, we can save much time by
removing all but the last wakeup.

The internal kernel API is changed to require a call to
fw_iso_context_queue_flush() after a batch of queued packets.
The user space API does not change, so one call to
FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
advantage of this optimization.

In my measurements, this patch reduces the time needed to queue
fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
or to one third at 800 MHz.

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>ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver</title>
<updated>2011-03-15T07:42:22Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2011-03-15T06:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31ef9134eb52636d383a7d0626cbbd345cb94f2f'/>
<id>urn:sha1:31ef9134eb52636d383a7d0626cbbd345cb94f2f</id>
<content type='text'>
Add a driver for two playback-only FireWire devices based on the OXFW970
chip.

v2: better AMDTP API abstraction; fix fw_unit leak; small fixes
v3: cache the iPCR value
v4: FireWave constraints; fix fw_device reference counting;
    fix PCR caching; small changes and fixes
v5: volume/mute support; fix crashing due to pcm stop races
v6: fix build; one-channel volume for LaCie
v7: use signed values to make volume (range checks) work; fix function
    block IDs for volume/mute; always use channel 0 for LaCie volume

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Tested-by: Jay Fenlason &lt;fenlason@redhat.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.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.amat.us/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>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.amat.us/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>
</feed>
