提交 32e8ae36 编写于 作者: J James Bottomley

[SCSI] libsas: don't use made up error codes

This is bad for two reasons:

     1. If they're returned to outside applications, no-one knows what
        they mean.
     2. Eventually they'll clash with the ever expanding standard error
        codes.

The problem error code in question is ETASK.  I've replaced this by
ECOMM (communications error on send) a network error code that seems to
most closely relay what ETASK meant.
Acked-by: NDarrick J. Wong <djwong@us.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 2d507a01
...@@ -500,7 +500,7 @@ static int sas_execute_task(struct sas_task *task, void *buffer, int size, ...@@ -500,7 +500,7 @@ static int sas_execute_task(struct sas_task *task, void *buffer, int size,
goto ex_err; goto ex_err;
} }
wait_for_completion(&task->completion); wait_for_completion(&task->completion);
res = -ETASK; res = -ECOMM;
if (task->task_state_flags & SAS_TASK_STATE_ABORTED) { if (task->task_state_flags & SAS_TASK_STATE_ABORTED) {
int res2; int res2;
SAS_DPRINTK("task aborted, flags:0x%x\n", SAS_DPRINTK("task aborted, flags:0x%x\n",
......
...@@ -96,7 +96,7 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size, ...@@ -96,7 +96,7 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
} }
wait_for_completion(&task->completion); wait_for_completion(&task->completion);
res = -ETASK; res = -ECOMM;
if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
SAS_DPRINTK("smp task timed out or aborted\n"); SAS_DPRINTK("smp task timed out or aborted\n");
i->dft->lldd_abort_task(task); i->dft->lldd_abort_task(task);
......
...@@ -91,8 +91,6 @@ enum discover_event { ...@@ -91,8 +91,6 @@ enum discover_event {
/* ---------- Expander Devices ---------- */ /* ---------- Expander Devices ---------- */
#define ETASK 0xFA
#define to_dom_device(_obj) container_of(_obj, struct domain_device, dev_obj) #define to_dom_device(_obj) container_of(_obj, struct domain_device, dev_obj)
#define to_dev_attr(_attr) container_of(_attr, struct domain_dev_attribute,\ #define to_dev_attr(_attr) container_of(_attr, struct domain_dev_attribute,\
attr) attr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册