Skip to content

Commit

Permalink
firewire: fw-sbp2: fix parsing of logical unit directories
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Richard Sharpe authored and Stefan Richter committed Jun 27, 2008
1 parent 543cf4c commit 0e3e2ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/firewire/fw-sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,8 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory,
break;

case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
if (sbp2_scan_logical_unit_dir(tgt, ci.p + value) < 0)
/* Adjust for the increment in the iterator */
if (sbp2_scan_logical_unit_dir(tgt, ci.p - 1 + value) < 0)
return -ENOMEM;
break;
}
Expand Down

0 comments on commit 0e3e2ea

Please sign in to comment.