OSDN Git Service

greybus: es?: decrease buffer size to 2k
authorGreg Kroah-Hartman <gregkh@google.com>
Tue, 9 Jun 2015 20:47:48 +0000 (13:47 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 10 Jun 2015 17:35:03 +0000 (10:35 -0700)
The firmware is having a hard time with 4k buffers and memory
allocation, so decrease the size on the host side to 2k.  Also move away
from using PAGE_SIZE to denote 4k as that's not the case on all
architectures, and someone, someday, might get a rude surprise.

Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/es1.c
drivers/staging/greybus/es2.c

index 2acfe74..45241c3 100644 (file)
@@ -24,7 +24,7 @@
 
 /* Memory sizes for the buffers sent to/from the ES1 controller */
 #define ES1_SVC_MSG_SIZE       (sizeof(struct svc_msg) + SZ_64K)
-#define ES1_GBUF_MSG_SIZE_MAX  PAGE_SIZE
+#define ES1_GBUF_MSG_SIZE_MAX  2048
 
 static const struct usb_device_id id_table[] = {
        /* Made up numbers for the SVC USB Bridge in ES1 */
index 4f676cf..b5b395f 100644 (file)
@@ -24,7 +24,7 @@
 
 /* Memory sizes for the buffers sent to/from the ES1 controller */
 #define ES1_SVC_MSG_SIZE       (sizeof(struct svc_msg) + SZ_64K)
-#define ES1_GBUF_MSG_SIZE_MAX  PAGE_SIZE
+#define ES1_GBUF_MSG_SIZE_MAX  2048
 
 static const struct usb_device_id id_table[] = {
        /* Made up numbers for the SVC USB Bridge in ES2 */