From: bo yang <bo.yang@lsi.com>
To: linux-scsi@vger.kernel.org
Cc: James.Bottomley@SteelEye.com, akpm@osdl.org,
linux-kernel@vger.kernel.org, Bo.yang@lsi.com,
Sumant.patro@lsi.com, neela.kolli@lsi.com
Subject: [PATCH 1/1] scsi: megaraid_sas - Fix random failure of DCDB cmds with sense info
Date: Wed, 21 Nov 2007 08:40:56 +0000 [thread overview]
Message-ID: <1195634456.5855.9.camel@dhcp-75-884.se.lsil.com> (raw)
Sense buffer ptr data type in the ioctl path is reverted back to u32 *
for x86 and x86_64 as in previous versions of driver. For IA64 it will
be unsigned long *. Compile time flag added for ia64 for this.
Signed-off-by: Bo Yang <bo.yang@lsi.com>
---
Documentation/scsi/ChangeLog.megaraid_sas | 15 +++++++++++++++
drivers/scsi/megaraid/megaraid_sas.c | 14 ++++++++++----
drivers/scsi/megaraid/megaraid_sas.h | 6 +++---
3 files changed, 28 insertions(+), 7 deletions(-)
diff -rupN linux-2.6.22_orig/Documentation/scsi/ChangeLog.megaraid_sas linux-2.6.22_new/Documentation/scsi/ChangeLog.megaraid_sas
--- linux-2.6.22_orig/Documentation/scsi/ChangeLog.megaraid_sas 2007-11-20 17:50:13.000000000 -0500
+++ linux-2.6.22_new/Documentation/scsi/ChangeLog.megaraid_sas 2007-11-20 21:37:16.000000000 -0500
@@ -1,3 +1,18 @@
+1 Release Date : Thur. Nov. 19 16:30:43 PST 2007 -
+ (emaild-id:megaraidlinux@lsi.com)
+ Sumant Patro
+ Bo Yang
+
+2 Current Version : 00.00.03.17-RC1
+3 Older Version : 00.00.03.16
+
+1. Fix random failure of DCDB cmds with sense info.
+
+Fix: sense buffer ptr data type in the ioctl path is reverted back
+ to u32 * for x86, x86_64 as in previous versions of driver.
+ For IA64 it will be unsigned long *. Compile time flag added
+ for ia64 for this.
+
1 Release Date : Thur. Nov. 07 16:30:43 PST 2007 -
(emaild-id:megaraidlinux@lsi.com)
Sumant Patro
diff -rupN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c
--- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c 2007-11-20 17:50:13.000000000 -0500
+++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c 2007-11-20 17:50:13.000000000 -0500
@@ -10,7 +10,7 @@
* 2 of the License, or (at your option) any later version.
*
* FILE : megaraid_sas.c
- * Version : v00.00.03.16-rc1
+ * Version : v00.00.03.17-rc1
*
* Authors:
* (email-id : megaraidlinux@lsi.com)
@@ -3020,10 +3020,16 @@ megasas_mgmt_fw_ioctl(struct megasas_ins
* sense buffer address
*/
sense_buff = (unsigned long *) ((unsigned long)ioc->frame.raw +
- ioc->sense_off);
-
- if (copy_to_user((void __user *)(unsigned long)(*sense_buff),
+ ioc->sense_off);
+ sense_ptr = (u32 *) ((unsigned long)ioc->frame.raw +
+ ioc->sense_off);
+#if defined(__ia64__)
+ if (copy_to_user((void __user *)((unsigned long)(*sense_buff)),
+ sense, ioc->sense_len)) {
+#else
+ if (copy_to_user((void __user *)((unsigned long)(*sense_ptr)),
sense, ioc->sense_len)) {
+#endif
printk(KERN_ERR "megasas: Failed to copy out to user "
"sense data\n");
error = -EFAULT;
diff -rupN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.h linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.h
--- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.h 2007-11-20 17:50:13.000000000 -0500
+++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.h 2007-11-20 17:50:13.000000000 -0500
@@ -18,9 +18,9 @@
/*
* MegaRAID SAS Driver meta data
*/
-#define MEGASAS_VERSION "00.00.03.16-rc1"
-#define MEGASAS_RELDATE "Nov. 07, 2007"
-#define MEGASAS_EXT_VERSION "Thu. Nov. 07 10:09:32 PDT 2007"
+#define MEGASAS_VERSION "00.00.03.17-rc1"
+#define MEGASAS_RELDATE "Nov. 19, 2007"
+#define MEGASAS_EXT_VERSION "Mon. Nov. 19 10:09:32 PDT 2007"
/*
* Device IDs
next reply other threads:[~2007-11-20 20:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 8:40 bo yang [this message]
2007-11-20 20:42 ` Matthew Wilcox
2007-11-27 15:19 ` Yang, Bo
2007-11-27 15:32 ` Matthew Wilcox
2007-11-28 19:08 ` Yang, Bo
2007-11-28 19:27 ` Matthew Wilcox
2007-11-29 18:24 ` Yang, Bo
2008-02-22 16:17 Yang, Bo
2008-02-22 16:24 ` Matthew Wilcox
2008-02-22 16:27 ` James Bottomley
2008-02-22 16:35 ` James Bottomley
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=1195634456.5855.9.camel@dhcp-75-884.se.lsil.com \
--to=bo.yang@lsi.com \
--cc=James.Bottomley@SteelEye.com \
--cc=Sumant.patro@lsi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=neela.kolli@lsi.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®