platform/chrome: cros_ec_ishtp: free ishtp buffer before sending event
authorJett Rink <jettrink@chromium.org>
Fri, 10 Apr 2020 16:23:05 +0000 (10:23 -0600)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Mon, 13 Apr 2020 14:38:39 +0000 (16:38 +0200)
commitfd167f7a4a6079c14a0c940e9103495b171279fb
tree3ef6473e76ec31155046a063e14774e552ca864d
parent0f706b4fac8b19fd0a4b4fef24dbadb23a3eb0c1
platform/chrome: cros_ec_ishtp: free ishtp buffer before sending event

Recycle the ISH buffer before notifying of a response or an event. Often
a new message is sent in response to an event and in high traffic
scenarios this can lead to exhausting all available buffers. We can
ensure we are using the fewest buffers possible by freeing buffers as
soon as they are used.

Signed-off-by: Jett Rink <jettrink@chromium.org>
Signed-off-by: Mathew King <mathewk@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_ec_ishtp.c