]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: fw-sbp2: use device generation, not card generation
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 24 Jan 2008 00:53:19 +0000 (01:53 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 30 Jan 2008 21:22:26 +0000 (22:22 +0100)
commit06a838d4698c8a0dcca13f50ce7d4cfa4c09856e
treef74aad717dc774991e866400179c90064e6eaa0d
parent254b2bc4f6f1ec7bf84defcfd3da88578887a3ba
firewire: fw-sbp2: use device generation, not card generation

There was a small window where a login or reconnect job could use an
already updated card generation with an outdated node ID.  We have to
use the fw_device.generation here, not the fw_card.generation, because
the generation must never be newer than the node ID when we emit a
transaction.  This cannot be guaranteed with fw_card.generation.

Furthermore, the target's and initiator's node IDs can be obtained from
fw_device and fw_card.  Dereferencing their underlying topology objects
is not necessary.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Verified in concert with subsequent memory barriers patch to fix 'giving
up on config rom' issues on multiple system and drive combinations that
were previously affected.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>
drivers/firewire/fw-sbp2.c