diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 1525b3254..56a2e71ab 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -1877,13 +1877,21 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res, } spin_lock_irqsave(qp->qp_lock_ptr, *flags); + switch (sp->type) { + case SRB_SCSI_CMD: #if HAVE_SCSI_MQ - if (ret_cmd && blk_mq_request_started(scsi_cmd_to_rq(cmd))) - sp->done(sp, res); + if (ret_cmd && blk_mq_request_started(scsi_cmd_to_rq(cmd))) + sp->done(sp, res); #else - if (ret_cmd && list_empty(&cmd->request->queuelist)) - sp->done(sp, res); + if (ret_cmd && list_empty(&cmd->request->queuelist)) + sp->done(sp, res); #endif + break; + default: + if (ret_cmd) + sp->done(sp, res); + break; + } } else { sp->done(sp, res); }