<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firewire, branch v3.0.44</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/firewire?h=v3.0.44</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/firewire?h=v3.0.44'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-04-02T16:27:13Z</updated>
<entry>
<title>firewire: ohci: fix too-early completion of IR multichannel buffers</title>
<updated>2012-04-02T16:27:13Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2012-03-12T20:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=07ef0938d89b3c5af9d3ff23e482b26202bd012c'/>
<id>urn:sha1:07ef0938d89b3c5af9d3ff23e482b26202bd012c</id>
<content type='text'>
commit 0c0efbacab8d70700d13301e0ae7975783c0cb0a upstream.

handle_ir_buffer_fill() assumed that a completed descriptor would be
indicated by a non-zero transfer_status (as in most other descriptors).
However, this field is written by the controller as soon as (the end of)
the first packet has been written into the buffer.  As a consequence, if
we happen to run into such a descriptor when the interrupt handler is
executed after such a packet has completed, the descriptor would be
taken out of the list of active descriptors as soon as the buffer had
been partially filled, so the event for the buffer being completely
filled would never be sent.

To fix this, handle descriptors only when they have been completely
filled, i.e., when res_count == 0.  (This also matches the condition
that is reported by the controller with an interrupt.)

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: core: handle ack_busy when fetching the Config ROM</title>
<updated>2012-03-19T15:57:43Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-08-07T13:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9bfaf9d147e8df52e3e9499b87ae007afda64c25'/>
<id>urn:sha1:9bfaf9d147e8df52e3e9499b87ae007afda64c25</id>
<content type='text'>
commit aaff12039ffd812d0c8bbff50b87b6f1f09bec3e upstream.

Some older Panasonic made camcorders (Panasonic AG-EZ30 and NV-DX110,
Grundig Scenos DLC 2000) reject requests with ack_busy_X if a request is
sent immediately after they sent a response to a prior transaction.
This causes firewire-core to fail probing of the camcorder with "giving
up on config rom for node id ...".  Consequently, programs like kino or
dvgrab are unaware of the presence of a camcorder.

Such transaction failures happen also with the ieee1394 driver stack
(of the 2.4...2.6 kernel series until 2.6.36 inclusive) but with a lower
likelihood, such that kino or dvgrab are generally able to use these
camcorders via the older driver stack.  The cause for firewire-ohci's or
firewire-core's worse behavior is not yet known.  Gap count optimization
in firewire-core is not the cause.  Perhaps the slightly higher latency
of transaction completion in the older stack plays a role.  (ieee1394:
AR-resp DMA context tasklet -&gt; packet completion ktread -&gt; user process;
firewire-core: tasklet -&gt; user process.)

This change introduces retries and delays after ack_busy_X into
firewire-core's Config ROM reader, such that at least firewire-core's
probing and /dev/fw* creation are successful.  This still leaves the
problem that userland processes are facing transaction failures.
gscanbus's built-in retry routines deal with them successfully, but
neither kino's nor dvgrab's do ever succeed.

But at least DV capture with "dvgrab -noavc -card 0" works now.  Live
video preview in kino works too, but not actual capture.

One way to prevent Configuration ROM reading failures in application
programs is to modify libraw1394 to synthesize read responses by means
of firewire-core's Configuration ROM cache.  This would only leave
CMP and FCP transaction failures as a potential problem source for
applications.

Reported-and-tested-by: Thomas Seilund &lt;tps@netmaster.dk&gt;
Reported-and-tested-by: René Fritz &lt;rene@colorcube.de&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: cdev: fix 32 bit userland on 64 bit kernel compat corner cases</title>
<updated>2012-03-19T15:57:43Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-08-10T22:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4995a6913d6ada9672179736affd5606f2281edb'/>
<id>urn:sha1:4995a6913d6ada9672179736affd5606f2281edb</id>
<content type='text'>
commit 9c1176b6a28850703ea6e3a0f0c703f6d6c61cd3 upstream.

Clemens points out that we need to use compat_ptr() in order to safely
cast from u64 to addresses of a 32-bit usermode client.

Before, our conversion went wrong
  - in practice if the client cast from pointer to integer such that
    sign-extension happened, (libraw1394 and libdc1394 at least were not
    doing that, IOW were not affected)
or
  - in theory on s390 (which doesn't have FireWire though) and on the
    tile architecture, regardless of what the client does.
The bug would usually be observed as the initial get_info ioctl failing
with "Bad address" (EFAULT).

Reported-by: Carl Karsten &lt;carl@personnelware.com&gt;
Reported-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: disable MSI on Ricoh controllers</title>
<updated>2012-02-13T19:06:06Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2012-01-29T11:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2f8080ae4ebf8d860addf050536b1ec71c53e19'/>
<id>urn:sha1:c2f8080ae4ebf8d860addf050536b1ec71c53e19</id>
<content type='text'>
commit 320cfa6ce0b3dc794fedfa4bae54c0f65077234d upstream.

The PCIe device

    FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd FireWire Host Controller
    [1180:e832] (prog-if 10 [OHCI])

is unable to access attached FireWire devices when MSI is enabled but
works if MSI is disabled.
http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg28251.html

Hence add the "disable MSI" quirks flag for this device, or in fact for
safety and simplicity for all current (R5U230, R5U231, R5U240) and
future Ricoh PCIe 1394 controllers.

Reported-by: Stefan Thomas &lt;kontrapunktstefan@googlemail.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: add reset packet quirk for SB Audigy</title>
<updated>2012-02-13T19:06:06Z</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2012-01-26T21:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=914dcd6a7120a034c515605ca509cb7e6767f52c'/>
<id>urn:sha1:914dcd6a7120a034c515605ca509cb7e6767f52c</id>
<content type='text'>
commit d1bb399ad03c11e792f6dea198d3b1e23061f094 upstream.

The Audigy's SB1394 controller is actually from Texas Instruments
and has the same bus reset packet generation bug, so it needs the
same quirk entry.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: sbp2: fix panic after rmmod with slow targets</title>
<updated>2011-10-25T05:10:16Z</updated>
<author>
<name>Chris Boot</name>
<email>bootc@bootc.net</email>
</author>
<published>2011-08-22T20:38:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f92a292abeee48559493433e4e947d0f49fcdd8d'/>
<id>urn:sha1:f92a292abeee48559493433e4e947d0f49fcdd8d</id>
<content type='text'>
commit 0278ccd9d53e07c4e699432b2fed9de6c56f506c upstream.

If firewire-sbp2 starts a login to a target that doesn't complete ORBs
in a timely manner (and has to retry the login), and the module is
removed before the operation times out, you end up with a null-pointer
dereference and a kernel panic.

[SR:  This happens because sbp2_target_get/put() do not maintain
module references.  scsi_device_get/put() do, but at occasions like
Chris describes one, nobody holds a reference to an SBP-2 sdev.]

This patch cancels pending work for each unit in sbp2_remove(), which
hopefully means there are no extra references around that prevent us
from unloading. This fixes my crash.

Signed-off-by: Chris Boot &lt;bootc@bootc.net&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: add no MSI quirk for O2Micro controller</title>
<updated>2011-10-03T18:40:33Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@canonical.com</email>
</author>
<published>2011-08-31T02:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3917a8efa50bc38ef2f2194a5e35c2062640feed'/>
<id>urn:sha1:3917a8efa50bc38ef2f2194a5e35c2062640feed</id>
<content type='text'>
commit f39aa30d7741f40ad964341e9243dbbd7f8ff057 upstream.

This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/801719 .

An O2Micro PCI Express FireWire controller,
"FireWire (IEEE 1394) [0c00]: O2 Micro, Inc. Device [1217:11f7] (rev 05)"
which is a combination device together with an SDHCI controller and some
sort of storage controller, misses SBP-2 status writes from an attached
FireWire HDD.  This problem goes away if MSI is disabled for this
FireWire controller.

The device reportedly does not require QUIRK_CYCLE_TIMER.

Signed-off-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firewire: cdev: prevent race between first get_info ioctl and bus reset event queuing</title>
<updated>2011-08-05T04:58:34Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-07-09T14:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f437783919467437f19ec534a0317aef2fd2584'/>
<id>urn:sha1:6f437783919467437f19ec534a0317aef2fd2584</id>
<content type='text'>
commit 93b37905f70083d6143f5f4dba0a45cc64379a62 upstream.

Between open(2) of a /dev/fw* and the first FW_CDEV_IOC_GET_INFO
ioctl(2) on it, the kernel already queues FW_CDEV_EVENT_BUS_RESET events
to be read(2) by the client.  The get_info ioctl is practically always
issued right away after open, hence this condition only occurs if the
client opens during a bus reset, especially during a rapid series of bus
resets.

The problem with this condition is twofold:

  - These bus reset events carry the (as yet undocumented) @closure
    value of 0.  But it is not the kernel's place to choose closures;
    they are privat to the client.  E.g., this 0 value forced from the
    kernel makes it unsafe for clients to dereference it as a pointer to
    a closure object without NULL pointer check.

  - It is impossible for clients to determine the relative order of bus
    reset events from get_info ioctl(2) versus those from read(2),
    except in one way:  By comparison of closure values.  Again, such a
    procedure imposes complexity on clients and reduces freedom in use
    of the bus reset closure.

So, change the ABI to suppress queuing of bus reset events before the
first FW_CDEV_IOC_GET_INFO ioctl was issued by the client.

Note, this ABI change cannot be version-controlled.  The kernel cannot
distinguish old from new clients before the first FW_CDEV_IOC_GET_INFO
ioctl.

We will try to back-merge this change into currently maintained stable/
longterm series, and we only document the new behaviour.  The old
behavior is now considered a kernel bug, which it basically is.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: &lt;stable@kernel.org&gt;

</content>
</entry>
<entry>
<title>firewire: cdev: return -ENOTTY for unimplemented ioctls, not -EINVAL</title>
<updated>2011-08-05T04:58:34Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-07-09T14:42:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=63ab4325d0df2ccefaeb932210d4046f2223e338'/>
<id>urn:sha1:63ab4325d0df2ccefaeb932210d4046f2223e338</id>
<content type='text'>
commit d873d794235efa590ab3c94d5ee22bb1fab19ac4 upstream.

On Jun 27 Linus Torvalds wrote:
&gt; The correct error code for "I don't understand this ioctl" is ENOTTY.
&gt; The naming may be odd, but you should think of that error value as a
&gt; "unrecognized ioctl number, you're feeding me random numbers that I
&gt; don't understand and I assume for historical reasons that you tried to
&gt; do some tty operation on me".
[...]
&gt; The EINVAL thing goes way back, and is a disaster. It predates Linux
&gt; itself, as far as I can tell. You'll find lots of man-pages that have
&gt; this line in it:
&gt;
&gt;   EINVAL Request or argp is not valid.
&gt;
&gt; and it shows up in POSIX etc. And sadly, it generally shows up
&gt; _before_ the line that says
&gt;
&gt;   ENOTTY The specified request does not apply to the kind of object
&gt; that the descriptor d references.
&gt;
&gt; so a lot of people get to the EINVAL, and never even notice the ENOTTY.
[...]
&gt; At least glibc (and hopefully other C libraries) use a _string_ that
&gt; makes much more sense: strerror(ENOTTY) is "Inappropriate ioctl for
&gt; device"

So let's correct this in the &lt;linux/firewire-cdev.h&gt; ABI while it is
still young, relative to distributor adoption.

Side note:  We return -ENOTTY not only on _IOC_TYPE or _IOC_NR mismatch,
but also on _IOC_SIZE mismatch.  An ioctl with an unsupported size of
argument structure can be seen as an unsupported version of that ioctl.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: do not bind to Pinnacle cards, avert panic</title>
<updated>2011-07-10T10:53:27Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2011-07-09T22:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f7e37115a8b6724f26d0637a04e1d35e3c59717'/>
<id>urn:sha1:7f7e37115a8b6724f26d0637a04e1d35e3c59717</id>
<content type='text'>
When firewire-ohci is bound to a Pinnacle MovieBoard, eventually a
"Register access failure" is logged and an interrupt storm or a kernel
panic happens.  https://bugzilla.kernel.org/show_bug.cgi?id=36622

Until this is sorted out (if that is going to succeed at all), let's
just prevent firewire-ohci from touching these devices.

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