summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_mbox.c
diff options
context:
space:
mode:
authorJu, Seokmann2006-07-25 16:44:58 +0200
committerJames Bottomley2006-07-28 20:13:50 +0200
commitaa677bc7445147f663ebde69d248a30839bada76 (patch)
treeae8e932655e44c7b16cb1fb23ed929ce9d3bc138 /drivers/scsi/megaraid/megaraid_mbox.c
parent[SCSI] megaraid_{mm,mbox}: 64-bit DMA capability checker (diff)
downloadkernel-qcow2-linux-aa677bc7445147f663ebde69d248a30839bada76.tar.gz
kernel-qcow2-linux-aa677bc7445147f663ebde69d248a30839bada76.tar.xz
kernel-qcow2-linux-aa677bc7445147f663ebde69d248a30839bada76.zip
[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>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index e671af0b4f58..cd982c877da0 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: