From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 62811] New: Don't Modify the scsi subcmd as LUN value when using VENDOR cmd
Date: Thu, 10 Oct 2013 17:22:11 +0000 [thread overview]
Message-ID: <bug-62811-11613@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=62811
Bug ID: 62811
Summary: Don't Modify the scsi subcmd as LUN value when using
VENDOR cmd
Product: SCSI Drivers
Version: 2.5
Kernel Version: 3.12rc4
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
Assignee: scsi_drivers-other@kernel-bugs.osdl.org
Reporter: yilikernel@gmail.com
Regression: No
Using the VENDOR scsi cmd, We should not to modify the cmd->cmnd [1] as lun
value. it is useful as a subcmd for USB device, such as STEC usb device.
Signed-off-by: Yi Li <yilikernel@gmail.com>
--- linux/drivers/scsi/scsi.c_orig 2013-09-12 01:51:45.000000000 -0400
+++ linux/drivers/scsi/scsi.c 2013-09-12 01:59:24.000000000 -0400
@@ -83,6 +83,9 @@ static void scsi_done(struct scsi_cmnd *
/* Do not call reset on error if we just did a reset within 15 sec. */
#define MIN_RESET_PERIOD (15*HZ)
+/* Define a SCSI command VENDOR to get device info For STEC USB devcie */
+#define STECUSB_VENDOR_CMD_CODE 0xD8
+
/*
* Note - the initial logging level can be set here to log events at boot time.
* After the system is up, you may enable logging via the /proc interface.
@@ -700,8 +703,13 @@ int scsi_dispatch_cmd(struct scsi_cmnd *
*/
if (cmd->device->scsi_level <= SCSI_2 &&
cmd->device->scsi_level != SCSI_UNKNOWN) {
- cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
- (cmd->device->lun << 5 & 0xe0);
+ /*
+ * Don't Modify the cmnd[1] as LUN value when it is a VENDOR CMD
+ * for STEC disk.
+ */
+ if (STECUSB_VENDOR_CMD_CODE != cmd->cmnd[0])
+ cmd->cmnd[1] = (cmd->cmnd[1] & 0x1f) |
+ (cmd->device->lun << 5 & 0xe0);
}
/*
--
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2013-10-10 17:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 17:22 bugzilla-daemon [this message]
2013-10-10 17:38 ` [Bug 62811] New: Don't Modify the scsi subcmd as LUN value when using VENDOR cmd James Bottomley
2013-10-11 5:16 ` yili
2013-11-13 13:39 ` [Bug 62811] " bugzilla-daemon
2013-11-13 13:39 ` [Bug 62811] [PATCH]Don't " bugzilla-daemon
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=bug-62811-11613@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.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;
as well as URLs for NNTP newsgroup(s).