summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian King2014-05-23 17:52:10 +0200
committerChristoph Hellwig2014-06-25 13:29:32 +0200
commit9ee755974bea2f9880e517ec985dc9dede1b3a36 (patch)
tree6c4fa81739927a22a6b8230422ca8e4cdb8c0faa
parentqla2xxx: Fix sparse warning in qla_target.c. (diff)
downloadkernel-qcow2-linux-9ee755974bea2f9880e517ec985dc9dede1b3a36.tar.gz
kernel-qcow2-linux-9ee755974bea2f9880e517ec985dc9dede1b3a36.tar.xz
kernel-qcow2-linux-9ee755974bea2f9880e517ec985dc9dede1b3a36.zip
ibmvscsi: Abort init sequence during error recovery
If a CRQ reset is triggered for some reason while in the middle of performing VSCSI adapter initialization, we don't want to call the done function for the initialization MAD commands as this will only result in two threads attempting initialization at the same time, resulting in failures. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 2ebfb2bb0f42..9caf9a979659 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -797,7 +797,8 @@ static void purge_requests(struct ibmvscsi_host_data *hostdata, int error_code)
evt->hostdata->dev);
if (evt->cmnd_done)
evt->cmnd_done(evt->cmnd);
- } else if (evt->done)
+ } else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
+ evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
evt->done(evt);
free_event_struct(&evt->hostdata->pool, evt);
spin_lock_irqsave(hostdata->host->host_lock, flags);