]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: es1-ap-usb: adjust SVC buffer size to handle worst case
authorMatt Porter <mporter@linaro.org>
Tue, 30 Sep 2014 20:01:40 +0000 (16:01 -0400)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 30 Sep 2014 22:39:00 +0000 (15:39 -0700)
The worst case message from the SVC->AP is a hotplug "plugged"
event. It includes the module manifest which may be up to 64KB
in size. Adjust our buffer allocation to allow for this.

Signed-off-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/es1-ap-usb.c

index 291da4018cc0c455392bd1c83af602ecf3eaf069..8df16437cc8b7d35f52135881c9759052d5cff32 100644 (file)
@@ -9,12 +9,13 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
+#include <linux/sizes.h>
 #include <linux/usb.h>
 #include "greybus.h"
 #include "svc_msg.h"
 
 /* Memory sizes for the buffers sent to/from the ES1 controller */
-#define ES1_SVC_MSG_SIZE       2048
+#define ES1_SVC_MSG_SIZE       (sizeof(struct svc_msg) + SZ_64K)
 #define ES1_GBUF_MSG_SIZE      PAGE_SIZE