提交 71e117f2 编写于 作者: A Alexander Usyskin 提交者: Greg Kroah-Hartman

mei: hbm: add new error code MEI_CL_CONN_NOT_ALLOWED

The device can return error 5 (NOT_ALLOWED) on connection attempt.
This error can happen if:
1. An another connection attempt is in progress
2. There is an attempt to connect a fixed (connectionless) client
3. The number of available connections is exceeded (new in HBM 2.0)

We should not hit that error unless there is an internal book keeping
hiccup except option (3), therefore we translate the error code
to errno EBUSY;
Signed-off-by: NAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bb2ef9c3
...@@ -52,6 +52,7 @@ static const char *mei_cl_conn_status_str(enum mei_cl_connect_status status) ...@@ -52,6 +52,7 @@ static const char *mei_cl_conn_status_str(enum mei_cl_connect_status status)
MEI_CL_CS(ALREADY_STARTED); MEI_CL_CS(ALREADY_STARTED);
MEI_CL_CS(OUT_OF_RESOURCES); MEI_CL_CS(OUT_OF_RESOURCES);
MEI_CL_CS(MESSAGE_SMALL); MEI_CL_CS(MESSAGE_SMALL);
MEI_CL_CS(NOT_ALLOWED);
default: return "unknown"; default: return "unknown";
} }
#undef MEI_CL_CCS #undef MEI_CL_CCS
...@@ -89,6 +90,7 @@ static int mei_cl_conn_status_to_errno(enum mei_cl_connect_status status) ...@@ -89,6 +90,7 @@ static int mei_cl_conn_status_to_errno(enum mei_cl_connect_status status)
case MEI_CL_CONN_ALREADY_STARTED: return -EBUSY; case MEI_CL_CONN_ALREADY_STARTED: return -EBUSY;
case MEI_CL_CONN_OUT_OF_RESOURCES: return -EBUSY; case MEI_CL_CONN_OUT_OF_RESOURCES: return -EBUSY;
case MEI_CL_CONN_MESSAGE_SMALL: return -EINVAL; case MEI_CL_CONN_MESSAGE_SMALL: return -EINVAL;
case MEI_CL_CONN_NOT_ALLOWED: return -EBUSY;
default: return -EINVAL; default: return -EINVAL;
} }
} }
......
...@@ -161,6 +161,7 @@ enum mei_cl_connect_status { ...@@ -161,6 +161,7 @@ enum mei_cl_connect_status {
MEI_CL_CONN_ALREADY_STARTED = MEI_HBMS_ALREADY_EXISTS, MEI_CL_CONN_ALREADY_STARTED = MEI_HBMS_ALREADY_EXISTS,
MEI_CL_CONN_OUT_OF_RESOURCES = MEI_HBMS_REJECTED, MEI_CL_CONN_OUT_OF_RESOURCES = MEI_HBMS_REJECTED,
MEI_CL_CONN_MESSAGE_SMALL = MEI_HBMS_INVALID_PARAMETER, MEI_CL_CONN_MESSAGE_SMALL = MEI_HBMS_INVALID_PARAMETER,
MEI_CL_CONN_NOT_ALLOWED = MEI_HBMS_NOT_ALLOWED,
}; };
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册