From 2730daa5679bc0d2a048a60055a7dc89d060076e Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 27 Jun 2013 14:42:39 -0700 Subject: Comm interface now provides max I/O sizes and preallocated buffers The maximum packet / param size differs depending on interface and protocol version. Commands can now ask the comm interface what the limits are, and can use preallocated buffers to avoid needless malloc/free. BUG=chrome-os-partner:20571 BRANCH=none TEST=the following all work on link burn_my_ec ectool version ectool chargedump ectool console ectool i2cxfer 5 0x41 2 Change-Id: Ib847994da3f79721e7fb4e347231b9147a3f485f Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/60275 --- util/comm-i2c.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/comm-i2c.c') diff --git a/util/comm-i2c.c b/util/comm-i2c.c index 8f75320b48..eab48d2a99 100644 --- a/util/comm-i2c.c +++ b/util/comm-i2c.c @@ -213,5 +213,7 @@ int comm_init_i2c(void) free(file_path); ec_command = ec_command_i2c; + ec_max_outsize = ec_max_insize = EC_HOST_PARAM_SIZE; + return 0; } -- cgit v1.2.1