]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: fw-sbp2: fix logout before login retry
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 26 Jan 2008 16:43:23 +0000 (17:43 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 16 Feb 2008 14:40:32 +0000 (15:40 +0100)
commit98d5d4cb51918fef02c1a0c635a3abce56bffdf6
treef581394b4d7b297619f4f0a62c490e57480fd3ec
parente5e9aa2e06e82b121beb6b7526d52631115cf632
firewire: fw-sbp2: fix logout before login retry

This fixes a "can't recognize device" kind of bug.

If the SCSI INQUIRY failed and hence __scsi_add_device failed due to a
bus reset, we tried a logout and then waited for the already scheduled
login work to happen.  So far so good, but the generation used for the
logout was outdated, hence the logout never reached the target.  The
target might therefore deny the subsequent relogin attempt, which would
also leave the target inaccessible.

Therefore fetch a fresh device->generation for the logout.  Use memory
barriers to prevent our plan being foiled by compiler or hardware
optimizations.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-sbp2.c