diff options
author | Nilesh Javali <nilesh.javali@qlogic.com> | 2012-12-29 02:24:53 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-29 19:48:55 -0500 |
commit | e19dd66f105c54868e722f6b0a4f2edfc83f1ef9 (patch) | |
tree | a1eaa0610e8ad54e7afe71152a10dc49b9bee835 /drivers/scsi/qla4xxx | |
parent | e951aca1beaf8493536cedfce4152531f7c4b59b (diff) |
[SCSI] qla4xxx: Correct the validation to check in get_sys_info mailbox
Check mbox_sts[3] instead of mbox_sts[4] for ISP83xx to validate size
of data returned
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_nx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 491668d439a2..b3d6dabdc6f4 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -3427,11 +3427,11 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha) | |||
3427 | } | 3427 | } |
3428 | 3428 | ||
3429 | /* Make sure we receive the minimum required data to cache internally */ | 3429 | /* Make sure we receive the minimum required data to cache internally */ |
3430 | if (mbox_sts[4] < offsetof(struct mbx_sys_info, reserved)) { | 3430 | if ((is_qla8032(ha) ? mbox_sts[3] : mbox_sts[4]) < |
3431 | offsetof(struct mbx_sys_info, reserved)) { | ||
3431 | DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive" | 3432 | DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive" |
3432 | " error (%x)\n", ha->host_no, __func__, mbox_sts[4])); | 3433 | " error (%x)\n", ha->host_no, __func__, mbox_sts[4])); |
3433 | goto exit_validate_mac82; | 3434 | goto exit_validate_mac82; |
3434 | |||
3435 | } | 3435 | } |
3436 | 3436 | ||
3437 | /* Save M.A.C. address & serial_number */ | 3437 | /* Save M.A.C. address & serial_number */ |