mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net,
	Kevin Valentine <kevin.valentine@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Richard Sharpe <realrichardsharpe@gmail.com>
Subject: [PATCH] firewire: fw-sbp2: fix parsing of logical unit directories
Date: Wed, 25 Jun 2008 18:37:43 +0200 (CEST)	[thread overview]
Message-ID: <tkrat.24168af4c57c3bde@s5r6.in-berlin.de> (raw)
In-Reply-To: <486272D0.7090506@s5r6.in-berlin.de>

Date: Tue, 24 Jun 2008 19:11:13 -0700
From: Richard Sharpe <realrichardsharpe@gmail.com>

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)
---

Kevin, this bug probably prevented the detection of the second drive in
the PowerFile C200 when you tested the new drivers.

 drivers/firewire/fw-sbp2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
--- linux.orig/drivers/firewire/fw-sbp2.c
+++ linux/drivers/firewire/fw-sbp2.c
@@ -1066,7 +1066,8 @@ static int sbp2_scan_unit_dir(struct sbp
 			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;
 		}

-- 
Stefan Richter
-=====-==--- -==- ==--=
http://arcgraph.de/sr/


           reply	other threads:[~2008-06-25 16:38 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <486272D0.7090506@s5r6.in-berlin.de>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.24168af4c57c3bde@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=kevin.valentine@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=realrichardsharpe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®