Commit d6bdcf2e authored by Julian Andres Klode's avatar Julian Andres Klode Committed by Greg Kroah-Hartman

staging: nvec: Add battery quirk to ignore incomplete responses

The nvec_power system polls nvec for battery information. In some
cases, that part seems to be overloaded and unable to respond
fast in which case it sends an incomplete response. We need to
mark the transfer as completed, though, in order to prevent
endless retries which can kill nvec.
Signed-off-by: default avatarJulian Andres Klode <jak@jak-linux.org>
Acked-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1e46e627
...@@ -446,6 +446,11 @@ static void nvec_rx_completed(struct nvec_chip *nvec) ...@@ -446,6 +446,11 @@ static void nvec_rx_completed(struct nvec_chip *nvec)
nvec_msg_free(nvec, nvec->rx); nvec_msg_free(nvec, nvec->rx);
nvec->state = 0; nvec->state = 0;
/* Battery quirk - Often incomplete, and likes to crash */
if (nvec->rx->data[0] == NVEC_BAT)
complete(&nvec->ec_transfer);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment