aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJu, Seokmann <Seokmann.Ju@lsil.com>2006-07-25 08:44:58 -0600
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-28 13:13:50 -0500
commitaa677bc7445147f663ebde69d248a30839bada76 (patch)
treeae8e932655e44c7b16cb1fb23ed929ce9d3bc138
parentfbf6080225a03aa2b3671acacebdf615f1d3f6ba (diff)
downloadkernel_samsung_crespo-aa677bc7445147f663ebde69d248a30839bada76.zip
kernel_samsung_crespo-aa677bc7445147f663ebde69d248a30839bada76.tar.gz
kernel_samsung_crespo-aa677bc7445147f663ebde69d248a30839bada76.tar.bz2
[SCSI] megaraid_{mm,mbox}: a fix on INQUIRY with EVPD
With this patch, driver will protect data corruption created by INQUIRY with EVPD request to megaraid controllers. As specified in the changelog, megaraid F/W already has fixed the issue and being under process of release. Meanwhile, driver will protect the system with this patch. Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--Documentation/scsi/ChangeLog.megaraid7
-rw-r--r--drivers/scsi/megaraid/mega_common.h3
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c8
3 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid
index fd8939e..0edb048 100644
--- a/Documentation/scsi/ChangeLog.megaraid
+++ b/Documentation/scsi/ChangeLog.megaraid
@@ -59,6 +59,13 @@ Older Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
> Buffer I/O error on device sda6, logical block 522067228
> attempt to access beyond end of device
+2. When INQUIRY with EVPD bit set issued to the MegaRAID controller,
+ system memory gets corrupted.
+ Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set
+ incorrectly.
+ Fix: MegaRAID F/W has fixed the problem and being process of release,
+ soon. Meanwhile, driver will filter out the request.
+
Release Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com>
Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
Older Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h
index 12e3812..8cd0bd1 100644
--- a/drivers/scsi/megaraid/mega_common.h
+++ b/drivers/scsi/megaraid/mega_common.h
@@ -40,6 +40,9 @@
#define HBA_SIGNATURE_64_BIT 0x299
#define PCI_CONF_AMISIG64 0xa4
+#define MEGA_SCSI_INQ_EVPD 1
+#define MEGA_INVALID_FIELD_IN_CDB 0x24
+
/**
* scb_t - scsi command control block
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index e671af0..cd982c8 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -1644,6 +1644,14 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
rdev->last_disp |= (1L << SCP2CHANNEL(scp));
}
+ if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) {
+ scp->sense_buffer[0] = 0x70;
+ scp->sense_buffer[2] = ILLEGAL_REQUEST;
+ scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB;
+ scp->result = CHECK_CONDITION << 1;
+ return NULL;
+ }
+
/* Fall through */
case READ_CAPACITY: