diff options
author | Julian Andres Klode <jak@jak-linux.org> | 2011-09-27 19:01:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-29 17:41:38 -0700 |
commit | d6bdcf2e1019351cbc176e963b7756766bdd8721 (patch) | |
tree | 6c9c8aec43ea2d9d30d0ccb782f29de0a32269dd | |
parent | 1e46e6273bc62d87c1eb984d2a2b16efa6b19641 (diff) |
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: Julian Andres Klode <jak@jak-linux.org>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/nvec/nvec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 8c01723d681a..a80f9935a3e1 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -446,6 +446,11 @@ static void nvec_rx_completed(struct nvec_chip *nvec) nvec_msg_free(nvec, nvec->rx); nvec->state = 0; + + /* Battery quirk - Often incomplete, and likes to crash */ + if (nvec->rx->data[0] == NVEC_BAT) + complete(&nvec->ec_transfer); + return; } |