mei: fix max number of open handles
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 23 Aug 2012 21:35:58 +0000 (00:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2012 20:45:56 +0000 (13:45 -0700)
There was internal confusion in wether bus message
clinet (0) is counted in or not

The bitmap me_clients_map that accomodate
was initialized w/o it (255) but later on it
the clinet 0 was reserved

Thus were able to open only 252 instead of 253 clients

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/mei_dev.h

index ad6c9d5af1e915b604d4c1975c0827f10442a366..96d3e7950932641159fe644ec944357010d45bff 100644 (file)
@@ -55,20 +55,22 @@ extern const uuid_le mei_wd_guid;
  */
 extern const u8 mei_wd_state_independence_msg[3][4];
 
+/*
+ * Number of Maximum MEI Clients
+ */
+#define MEI_CLIENTS_MAX 256
+
 /*
  * Number of File descriptors/handles
  * that can be opened to the driver.
  *
- * Limit to 253: 255 Total Clients
+ * Limit to 253: 256 Total Clients
+ * minus internal client for MEI Bus Messags
  * minus internal client for AMTHI
  * minus internal client for Watchdog
  */
-#define  MEI_MAX_OPEN_HANDLE_COUNT     253
+#define  MEI_MAX_OPEN_HANDLE_COUNT (MEI_CLIENTS_MAX - 3)
 
-/*
- * Number of Maximum MEI Clients
- */
-#define MEI_CLIENTS_MAX 255
 
 /* File state */
 enum file_state {
This page took 0.025265 seconds and 5 git commands to generate.