linux-kernel-test/drivers/firewire
B.J. Buchalter 2e053a27d9 firewire: Fix for broken configrom updates in quick succession
Current implementation of ohci_set_config_rom() uses a deferred
bus reset via fw_schedule_bus_reset(). If clients add multiple
unit descriptors to the config_rom in quick succession, the
deferred bus reset may not have fired before succeeding update
requests have come in. This can lead to an incorrect partial
update of the config_rom for both addition and removal of
config_rom descriptors, as the ohci_set_config_rom() routine
will return -EBUSY if a previous pending update has not been
completed yet; the requested update just gets dropped on the floor.

This patch recognizes that the "in-flight" update can be modified
until it has been processed by the bus-reset, and the locking
in the bus_reset_tasklet ensures that the update is done atomically
with respect to modifications made by ohci_set_config_rom(). The
-EBUSY error case is simply removed.

[Stefan R:  The bug always existed at least theoretically.  But it
became easy to trigger since 2.6.36 commit 02d37bed18 "firewire: core:
integrate software-forced bus resets with bus management" which
introduced long mandatory delays between janitorial bus resets.]

Signed-off-by: Benjamin Buchalter <bj@mhlabs.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (trivial style changes)
Cc: <stable@kernel.org> # 2.6.36.y and newer
2011-05-02 22:55:22 +02:00
..
core-card.c firewire: core: increase default SPLIT_TIMEOUT value 2011-03-20 16:45:24 +01:00
core-cdev.c firewire: core: fix card->reset_jiffies overflow 2011-01-23 12:31:01 +01:00
core-device.c firewire: core: ignore link-active bit of new nodes, fix device recognition 2011-03-20 16:45:25 +01:00
core-iso.c firewire: core: rename some variables 2011-02-26 15:11:03 +01:00
core-topology.c firewire: core: fix card->reset_jiffies overflow 2011-01-23 12:31:01 +01:00
core-transaction.c firewire: use split transaction timeout only for split transactions 2011-01-04 08:48:34 +01:00
core.h firewire: make PHY packet header format consistent 2010-12-13 20:39:14 +01:00
init_ohci1394_dma.c ieee1394: move init_ohci1394_dma to drivers/firewire/ 2010-10-11 14:48:03 +02:00
Kconfig firewire: nosy: should work on Power Mac G4 PCI too 2011-02-26 15:11:03 +01:00
Makefile ieee1394: move init_ohci1394_dma to drivers/firewire/ 2010-10-11 14:48:03 +02:00
net.c firewire: net: set carrier state at ifup 2010-12-19 15:27:02 +01:00
nosy-user.h firewire: nosy: endianess fixes and annotations 2010-07-27 11:04:11 +02:00
nosy.c firewire: nosy: char device is not seekable 2010-12-12 15:47:02 +01:00
nosy.h firewire: nosy: misc cleanups 2010-07-27 11:04:10 +02:00
ohci.c firewire: Fix for broken configrom updates in quick succession 2011-05-02 22:55:22 +02:00
ohci.h firewire: ohci: fix TI TSB82AA2 regression since 2.6.35 2010-10-17 14:09:12 +02:00
sbp2.c firewire: sbp2: revert obsolete 'fix stall with "Unsolicited response"' 2011-03-20 16:45:24 +01:00