mei: hbm: add new error code MEI_CL_CONN_NOT_ALLOWED
authorAlexander Usyskin <alexander.usyskin@intel.com>
Wed, 29 Jul 2015 11:59:33 +0000 (14:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Aug 2015 00:31:53 +0000 (17:31 -0700)
commit71e117f28a6782fa2d31cce63340a9f18417afa4
tree69c9176e9c42efbc8037f39ce13edae12bd935ac
parentbb2ef9c39db2e3c2562b4e439b2b00dc42e2c026
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: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/hbm.c
drivers/misc/mei/hw.h