From: Jan Vesely <jvesely@redhat.com>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: James Bottomley <JBottomley@Parallels.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: [PATCH] [SCSI] scsilun_to_int should ignore the highest 2 bits
Date: Thu, 6 Jun 2013 10:18:11 +0200 [thread overview]
Message-ID: <1370506691-22933-1-git-send-email-jvesely@redhat.com> (raw)
From: Jan Vesely <jvesely@redhat.com>
The comment says the function does this but it does not.
Reported luns change from weirdly high numbers (like 16640)
to something saner (256), when using flat space addressing.
CC: James Bottomley <JBottomley@Parallels.com>
CC: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jan Vesely <jvesely@redhat.com>
---
drivers/scsi/scsi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 3e58b22..38dc093 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1244,7 +1244,7 @@ int scsilun_to_int(struct scsi_lun *scsilun)
lun = 0;
for (i = 0; i < sizeof(lun); i += 2)
- lun = lun | (((scsilun->scsi_lun[i] << 8) |
+ lun = lun | ((((scsilun->scsi_lun[i] & 0x3f) << 8) |
scsilun->scsi_lun[i + 1]) << (i * 8));
return lun;
}
--
1.8.1.4
next reply other threads:[~2013-06-06 8:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 8:18 Jan Vesely [this message]
2013-06-06 8:42 ` Hannes Reinecke
2013-06-06 9:46 ` Jan Vesely
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=1370506691-22933-1-git-send-email-jvesely@redhat.com \
--to=jvesely@redhat.com \
--cc=JBottomley@Parallels.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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®