diff options
author | Ju, Seokmann <Seokmann.Ju@lsil.com> | 2006-07-25 10:44:58 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-07-28 14:13:50 -0400 |
commit | aa677bc7445147f663ebde69d248a30839bada76 (patch) | |
tree | ae8e932655e44c7b16cb1fb23ed929ce9d3bc138 /drivers/scsi/megaraid | |
parent | fbf6080225a03aa2b3671acacebdf615f1d3f6ba (diff) |
[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')
-rw-r--r-- | drivers/scsi/megaraid/mega_common.h | 3 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h index 12e38125b123..8cd0bd1d0f7c 100644 --- a/drivers/scsi/megaraid/mega_common.h +++ b/drivers/scsi/megaraid/mega_common.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #define HBA_SIGNATURE_64_BIT 0x299 | 40 | #define HBA_SIGNATURE_64_BIT 0x299 |
41 | #define PCI_CONF_AMISIG64 0xa4 | 41 | #define PCI_CONF_AMISIG64 0xa4 |
42 | 42 | ||
43 | #define MEGA_SCSI_INQ_EVPD 1 | ||
44 | #define MEGA_INVALID_FIELD_IN_CDB 0x24 | ||
45 | |||
43 | 46 | ||
44 | /** | 47 | /** |
45 | * scb_t - scsi command control block | 48 | * scb_t - scsi command control block |
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) | |||
1644 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); | 1644 | rdev->last_disp |= (1L << SCP2CHANNEL(scp)); |
1645 | } | 1645 | } |
1646 | 1646 | ||
1647 | if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) { | ||
1648 | scp->sense_buffer[0] = 0x70; | ||
1649 | scp->sense_buffer[2] = ILLEGAL_REQUEST; | ||
1650 | scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB; | ||
1651 | scp->result = CHECK_CONDITION << 1; | ||
1652 | return NULL; | ||
1653 | } | ||
1654 | |||
1647 | /* Fall through */ | 1655 | /* Fall through */ |
1648 | 1656 | ||
1649 | case READ_CAPACITY: | 1657 | case READ_CAPACITY: |