summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_nx.c
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2010-07-30 12:57:45 +0400
committerJames Bottomley <James.Bottomley@suse.de>2010-08-06 20:59:28 +0400
commit2ccdf0dce41a39db3721fe801dac5c5effa8e4be (patch)
tree47d765c0d9a207f13548a1ae6fc86cff6fec0a4e /drivers/scsi/qla4xxx/ql4_nx.c
parent0753b4871d5b09687cee652b380a6ca15aee330e (diff)
downloadlinux-2ccdf0dce41a39db3721fe801dac5c5effa8e4be.tar.xz
[SCSI] qla4xxx: updated mbx_sys_info struct to sync with FW 4.6.x
Also, changed boundary checking from size of total structure to verification that we received the amount of data needed to cache inernally. This change will provide compatibility with mbx_sys_info structure sizes in both older and newer firmware versions. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_nx.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 3e119ae78397..ec46651100cb 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2145,7 +2145,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
goto exit_validate_mac82;
}
- if (mbox_sts[4] < sizeof(*sys_info)) {
+ /* Make sure we receive the minimum required data to cache internally */
+ if (mbox_sts[4] < offsetof(struct mbx_sys_info, reserved)) {
DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive"
" error (%x)\n", ha->host_no, __func__, mbox_sts[4]));
goto exit_validate_mac82;