]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: sbp2: provide fallback if mgt_ORB_timeout is missing
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 7 Oct 2009 22:39:31 +0000 (00:39 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 14 Oct 2009 19:55:19 +0000 (21:55 +0200)
commit5bd257ebcfcf62461a6c02075e6bb5219587e7d1
tree3a6a97af6160688b94a673e08ad77e3e3d032c77
parent8f5c0529fbe035221708f42cf463d755fc0c655a
firewire: sbp2: provide fallback if mgt_ORB_timeout is missing

The Unit_Characteristics entry of an SBP-2 unit directory is not
mandatory as far as I can tell.  If it is missing, we would probably
fail to log in into the target because firewire-sbp2 would not wait for
status after it sent the login request.

The fix moves the cleanup of tgt->mgt_orb_timeout into a place where it
is executed exactly once before login, rather than 0..n times depending
on the target's config ROM.  With targets with one or more
Unit_Characteristics entries, the result is the same as before.

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