summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2015-01-26 13:52:24 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-28 11:14:02 +0000
commitdb3f86ed0b2de3adf9d4f9b797164e5b35c84715 (patch)
tree93ebbe07e09c9d41e539403d53c4e0ecfae19068
parent17f68998fbac95976c271e7403ffffc6f9f1aeaf (diff)
downloadchrome-ec-db3f86ed0b2de3adf9d4f9b797164e5b35c84715.tar.gz
pd: Fix reverse of log size & port params
BRANCH=samus BUG=chrome-os-partner:35935 TEST=manual, port & size params are no longer reversed when running ectool --name cros_pd pdlog Change-Id: I83e5ad92c260ff71330b7b5c69b30cf3b7e81a98 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243373 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/pd_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/pd_log.c b/common/pd_log.c
index ca66313b9d..fa9b8c3bf5 100644
--- a/common/pd_log.c
+++ b/common/pd_log.c
@@ -146,7 +146,7 @@ void pd_log_recv_vdm(int port, int cnt, uint32_t *payload)
struct ec_response_pd_log *r = (void *)&payload[1];
/* update port number from MCU point of view */
size_t size = PD_LOG_SIZE(r->size_port);
- uint8_t size_port = PD_LOG_PORT_SIZE(size, port);
+ uint8_t size_port = PD_LOG_PORT_SIZE(port, size);
uint32_t timestamp;
if ((cnt < 2 + DIV_ROUND_UP(size, sizeof(uint32_t))) ||