<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/firewire, branch v3.12.15</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/firewire?h=v3.12.15</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/firewire?h=v3.12.15'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-22T21:01:56Z</updated>
<entry>
<title>firewire: don't use PREPARE_DELAYED_WORK</title>
<updated>2014-03-22T21:01:56Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2014-03-07T15:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0f72d5c490bc4e5b84829cce251266d485663cb6'/>
<id>urn:sha1:0f72d5c490bc4e5b84829cce251266d485663cb6</id>
<content type='text'>
commit 70044d71d31d6973665ced5be04ef39ac1c09a48 upstream.

PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
and a nasty surprise in terms of reentrancy guarantee as workqueue
considers work items to be different if they don't have the same work
function.

firewire core-device and sbp2 have been been multiplexing work items
with multiple work functions.  Introduce fw_device_workfn() and
sbp2_lu_workfn() which invoke fw_device-&gt;workfn and
sbp2_logical_unit-&gt;workfn respectively and always use the two
functions as the work functions and update the users to set the
-&gt;workfn fields instead of overriding work functions using
PREPARE_DELAYED_WORK().

This fixes a variety of possible regressions since a2c1c57be8d9
"workqueue: consider work function when searching for busy work items"
due to which fw_workqueue lost its required non-reentrancy property.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: linux1394-devel@lists.sourceforge.net
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: fix probe failure with Agere/LSI controllers</title>
<updated>2014-03-22T21:01:56Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2014-03-06T19:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b51610cdf9dc5b4e0cc09d7f239afc2d44ffd419'/>
<id>urn:sha1:b51610cdf9dc5b4e0cc09d7f239afc2d44ffd419</id>
<content type='text'>
commit 0ca49345b6f489e95f8d6edeb0b092e257475b2a upstream.

Since commit bd972688eb24
"firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8",
there is a high chance that firewire-ohci fails to initialize LSI née
Agere controllers.
https://bugzilla.kernel.org/show_bug.cgi?id=65151

Peter Hurley points out the reason:  IEEE 1394a:2000 clause 5A.1 (or
IEEE 1394:2008 clause 17.2.1) say:  "The PHY shall insure that no more
than 10 ms elapse from the reassertion of LPS until the interface is
reset.  The link shall not assert LReq until the reset is complete."
In other words, the link needs to give the PHY at least 10 ms to get
the interface operational.

With just the msleep(1) in bd972688eb24, the first read_phy_reg()
during ohci_enable() may happen before the phy-link interface reset was
finished, and fail.  Due to the high variability of msleep(n) with small
n, this failure was not fully reproducible, and not apparent at all with
low CONFIG_HZ setting.

On the other hand, Peter can no longer reproduce the issue with FW643
rev8.  The read phy reg failures that happened back then may have had an
unrelated cause.  So, just revert bd972688eb24, except for the valid
comment on TSB82AA2 cards.

Reported-by: Mikhail Gavrilov
Reported-by: Jay Fenlason &lt;fenlason@redhat.com&gt;
Reported-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Reported-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>firewire: net: fix use after free</title>
<updated>2014-03-22T21:01:56Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2014-02-18T21:25:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52fa2d887232da81aee604c560db9383a2d1369e'/>
<id>urn:sha1:52fa2d887232da81aee604c560db9383a2d1369e</id>
<content type='text'>
commit 8987583366ae9e03c306c2b7d73bdb952df1d08d upstream.

Commit 8408dc1c14c1 "firewire: net: use dev_printk API" introduced a
use-after-free in a failure path.  fwnet_transmit_packet_failed(ptask)
may free ptask, then the dev_err() call dereferenced it.  The fix is
straightforward; simply reorder the two calls.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>firewire: sbp2: bring back WRITE SAME support</title>
<updated>2014-01-09T20:25:10Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2013-12-15T15:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93c02d70331c10629595fc0d8c446f8058c2f074'/>
<id>urn:sha1:93c02d70331c10629595fc0d8c446f8058c2f074</id>
<content type='text'>
commit ce027ed98fd176710fb14be9d6015697b62436f0 upstream.

Commit 54b2b50c20a6 "[SCSI] Disable WRITE SAME for RAID and virtual
host adapter drivers" disabled WRITE SAME support for all SBP-2 attached
targets.  But as described in the changelog of commit b0ea5f19d3d8
"firewire: sbp2: allow WRITE SAME and REPORT SUPPORTED OPERATION CODES",
it is not required to blacklist WRITE SAME.

Bring the feature back by reverting the sbp2.c hunk of commit 54b2b50c20a6.

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>SCSI: Disable WRITE SAME for RAID and virtual host adapter drivers</title>
<updated>2013-12-12T06:37:55Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2013-10-23T10:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aaca4317a24698e7ab51f1f64f1ab099b7521202'/>
<id>urn:sha1:aaca4317a24698e7ab51f1f64f1ab099b7521202</id>
<content type='text'>
commit 54b2b50c20a61b51199bedb6e5d2f8ec2568fb43 upstream.

Some host adapters do not pass commands through to the target disk
directly. Instead they provide an emulated target which may or may not
accurately report its capabilities. In some cases the physical device
characteristics are reported even when the host adapter is processing
commands on the device's behalf. This can lead to adapter firmware hangs
or excessive I/O errors.

This patch disables WRITE SAME for devices connected to host adapters
that provide an emulated target. Driver writers can disable WRITE SAME
by setting the no_write_same flag in the host adapter template.

[jejb: fix up rejections due to eh_deadline patch]
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>firewire: ohci: Fix deadlock at bus reset</title>
<updated>2013-08-29T20:35:05Z</updated>
<author>
<name>Stephan Gatzka</name>
<email>stephan.gatzka@gmail.com</email>
</author>
<published>2013-08-26T18:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=db9ae8fec7b19f0ac6c60d998cac968d801a998d'/>
<id>urn:sha1:db9ae8fec7b19f0ac6c60d998cac968d801a998d</id>
<content type='text'>
Put bus_reset_work into its own workqueue.  By doing this, forward
progress of bus_reset_work() is guaranteed if the work is switched over
to a rescuer thread.

Switching work to a rescuer thread happens if a new worker thread could
not be allocated in certain time (MAYDAY_INITIAL_TIMEOUT, typically 10
ms).  This might not be possible under high memory pressure or even on a
heavily loaded embedded system running a slow serial console.

The former deadlock occured in the following situation:
The rescuer thread ran
fw_device_init-&gt;read_config_rom-&gt;read_rom-&gt;fw_run_transaction.
fw_run_transaction blocked waiting for the completion object.
This completion object would have been completed in bus_reset_work,
but this work was never executed in the rescuer thread due to its
strictly sequential behaviour.

[Stefan R.:  Removed WQ_NON_REENTRANT flag from allocation because
it is no longer needed in current kernels.  Add it back if you backport
to kernels older than 3.7, i.e. one which does not contain dbf2576e37da
"workqueue: make all workqueues non-reentrant".  Swapped order of
destroy_workqueue and pci_unregister_driver.]

Signed-off-by: Stephan Gatzka &lt;stephan.gatzka@gmail.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: Change module_pci_driver to module_init/module_exit</title>
<updated>2013-08-29T20:30:54Z</updated>
<author>
<name>Stephan Gatzka</name>
<email>stephan.gatzka@gmail.com</email>
</author>
<published>2013-08-26T18:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7a723c6ed9e92bf91db5c65542c78106030afdbe'/>
<id>urn:sha1:7a723c6ed9e92bf91db5c65542c78106030afdbe</id>
<content type='text'>
This is a prerequisite to allocate a per driver self_id workqueue.
This reverts the ohci.c part of patch
fe2af11c220c7bb3a67f7aec0594811e5c59e019.

Signed-off-by: Stephan Gatzka &lt;stephan.gatzka@gmail.com&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: beautify some macro definitions</title>
<updated>2013-08-19T07:02:05Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2013-08-05T13:14:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0dbe15f88be5b2cdf4ca4145797861dfb0d583a5'/>
<id>urn:sha1:0dbe15f88be5b2cdf4ca4145797861dfb0d583a5</id>
<content type='text'>
a) Sort device IDs by vendor -- device -- revision.

b) Write quirk flags in hexadecimal.  This affects the user-visible
output of "modinfo firewire-ohci".  Since more flags have been added
recently, it is now easier to cope with them in hexadecimal represen-
tation.  Besides, the device-specific combination of quirk flags is
shown in hexadecimal in the kernel log too.  (And firewire-sbp2
presents its own quirk flags in modinfo as hexadecimals as well.)

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: ohci: change confusing name of a struct member</title>
<updated>2013-08-19T07:02:05Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2013-08-05T13:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af53122a2a6239ef235e55cedc324499e31dad87'/>
<id>urn:sha1:af53122a2a6239ef235e55cedc324499e31dad87</id>
<content type='text'>
We have got

	struct descriptor *descriptors;
	dma_addr_t         descriptors_bus;

	dma_addr_t         buffer_bus;
	struct descriptor buffer[0];

	void      *misc_buffer;
	dma_addr_t misc_buffer_bus;

	__be32    *config_rom;
	dma_addr_t config_rom_bus;
	__be32    *next_config_rom;
	dma_addr_t next_config_rom_bus;

But then we have got

	__le32    *self_id_cpu;
	dma_addr_t self_id_bus;

Better apply the pattern of xyz vs. xyz_bus to self_id vs. self_id_bus
as well.  The _cpu suffix looks particularly weird in conversions from
little endian to CPU endian.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
</content>
</entry>
<entry>
<title>firewire: core: typecast from gfp_t to bool more safely</title>
<updated>2013-07-30T13:46:18Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2013-04-28T22:16:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a41981803fcd4107fff4e943afb72940ba653d2'/>
<id>urn:sha1:0a41981803fcd4107fff4e943afb72940ba653d2</id>
<content type='text'>
An idr related patch introduced the following sparse warning:
  drivers/firewire/core-cdev.c:488:33: warning: incorrect type in initializer (different base types)
  drivers/firewire/core-cdev.c:488:33:    expected bool [unsigned] [usertype] preload
  drivers/firewire/core-cdev.c:488:33:    got restricted gfp_t
So let's convert from gfp_t bitfield to Boolean explicitly and safely.

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