From: Kashyap, Desai Date: Thu, 18 Mar 2010 13:53:19 +0000 (+0530) Subject: [SCSI] mptfusion: Task abort is not supported for Volumes X-Git-Tag: firefly_0821_release~9833^2~2084^2^2~125 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=69b2e9b4431798645e3d8fb51413db97c9845db1;p=firefly-linux-kernel-4.4.55.git [SCSI] mptfusion: Task abort is not supported for Volumes 1) corrected return value as SUCCESS instead of 0. 2) Added check in mptscsih_abort. mptfusion do not support task abort for Volumes. Signed-off-by: Kashyap Desai Signed-off-by: James Bottomley --- diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 90a1dff7eb84..7bd4c0fc23cc 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -1723,6 +1723,7 @@ mptscsih_get_tm_timeout(MPT_ADAPTER *ioc) case FC: return 40; case SAS: + return 30; case SPI: default: return 10; @@ -1772,7 +1773,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) ioc->name, SCpnt)); SCpnt->result = DID_NO_CONNECT << 16; SCpnt->scsi_done(SCpnt); - retval = 0; + retval = SUCCESS; goto out; } @@ -1787,6 +1788,17 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) goto out; } + /* Task aborts are not supported for volumes. + */ + if (vdevice->vtarget->raidVolume) { + dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT + "task abort: raid volume (sc=%p)\n", + ioc->name, SCpnt)); + SCpnt->result = DID_RESET << 16; + retval = FAILED; + goto out; + } + /* Find this command */ if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) {