summaryrefslogtreecommitdiff
path: root/include/host_command.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-08-01 09:55:58 -0700
committerChromeBot <chrome-bot@google.com>2013-08-02 13:05:56 -0700
commitc6dfa7e03b4c672e1031b4af9230b9da77e50f1a (patch)
tree63c6a1472c0d7884bb6952d828198cc86d56a035 /include/host_command.h
parent0d3bdc690e7ab3ed0ab190b0529e95c2bbba4e7e (diff)
downloadchrome-ec-c6dfa7e03b4c672e1031b4af9230b9da77e50f1a.tar.gz
Host commands don't set the response pointer
Remove support for allowing host command handlers to set the response pointer. This is just one more thing that can break (and did, on SPI protocol V2). No commands other than the trivial read-memory-map command in host_command.c and flash read made use of this capability, and the savings in performance was negligible. BUG=chrome-os-partner:21576 BRANCH=none TEST=boot pit; still boots Change-Id: I0a9bcf57dbea7155318fc389d7b47d3742a1a00a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/64236
Diffstat (limited to 'include/host_command.h')
-rw-r--r--include/host_command.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/host_command.h b/include/host_command.h
index 53e088e2e0..96096bc699 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -27,18 +27,18 @@ struct host_cmd_handler_args {
/*
* Pointer to output response data buffer. On input to the handler,
- * points to a buffer of size response_max. Command handler can change
- * this to point to a different location instead of memcpy()'ing data
- * into the provided buffer.
+ * points to a buffer of size response_max.
*/
void *response;
+
+ /* Maximum size of response buffer provided to command handler */
+ uint16_t response_max;
+
/*
- * Maximum size of response buffer provided to command handler. If the
- * handler changes response to point to its own larger buffer, it may
- * return a response_size greater than response_max.
+ * Size of data pointed to by response. Defaults to 0, so commands
+ * which do not produce response data do not need to set this.
*/
- uint16_t response_max;
- uint16_t response_size; /* Size of data pointed to by response */
+ uint16_t response_size;
/*
* This is the result returned by command and therefore the status to