提交 69b2e9b4 编写于 作者: K Kashyap, Desai 提交者: James Bottomley

[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: NKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 08f5c5c2
...@@ -1723,6 +1723,7 @@ mptscsih_get_tm_timeout(MPT_ADAPTER *ioc) ...@@ -1723,6 +1723,7 @@ mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
case FC: case FC:
return 40; return 40;
case SAS: case SAS:
return 30;
case SPI: case SPI:
default: default:
return 10; return 10;
...@@ -1772,7 +1773,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) ...@@ -1772,7 +1773,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
ioc->name, SCpnt)); ioc->name, SCpnt));
SCpnt->result = DID_NO_CONNECT << 16; SCpnt->result = DID_NO_CONNECT << 16;
SCpnt->scsi_done(SCpnt); SCpnt->scsi_done(SCpnt);
retval = 0; retval = SUCCESS;
goto out; goto out;
} }
...@@ -1787,6 +1788,17 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) ...@@ -1787,6 +1788,17 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
goto out; 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 /* Find this command
*/ */
if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) { if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册