aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorRichard Sharpe <realrichardsharpe@gmail.com>2008-06-24 22:11:13 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-06-27 14:55:00 -0400
commit0e3e2eabf4fbc0162e1f1eb4fd90cb3e9513a554 (patch)
tree89691ff7227cc09dcb32c72cd7295c16665aaa34 /drivers/firewire
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
firewire: fw-sbp2: fix parsing of logical unit directories
There is a small off-by-one bug in firewire-sbp2. This causes problems when a device exports multiple LUN Directories. I found it when trying to talk to a SONY DVD Jukebox. Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Acked-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (op. order, changelog)
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-sbp2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index b2458bb8e9ca..227d2e036cd8 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1051,7 +1051,8 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory,
1051 break; 1051 break;
1052 1052
1053 case SBP2_CSR_LOGICAL_UNIT_DIRECTORY: 1053 case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
1054 if (sbp2_scan_logical_unit_dir(tgt, ci.p + value) < 0) 1054 /* Adjust for the increment in the iterator */
1055 if (sbp2_scan_logical_unit_dir(tgt, ci.p - 1 + value) < 0)
1055 return -ENOMEM; 1056 return -ENOMEM;
1056 break; 1057 break;
1057 } 1058 }