From: Andrew Vasquez Date: Wed, 21 Nov 2012 07:40:26 +0000 (-0500) Subject: [SCSI] qla2xxx: Clear unsupported 'states' during Get-FW-State queries. X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~13476^2~23 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5b939038443fdb3db3591b8e92469641f49d12c4;p=mirror_ubuntu-artful-kernel.git [SCSI] qla2xxx: Clear unsupported 'states' during Get-FW-State queries. Rather than returning stale mailbox values. Signed-off-by: Andrew Vasquez Signed-off-by: Saurav Kashyap Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 48fca47384b7..214c0e9bdcdf 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1971,6 +1971,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) "Waiting for LIP to complete.\n"); do { + memset(state, -1, sizeof(state)); rval = qla2x00_get_firmware_state(vha, state); if (rval == QLA_SUCCESS) { if (state[0] < FSTATE_LOSS_OF_SYNC) {