diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2021-09-27 15:21:23 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2021-10-07 08:41:33 +1000 |
commit | b7af62ae2ca4a5f36a36d98e37d59e96fb3f8ef5 (patch) | |
tree | 047c1e4cf7ff7c4942f13d758a32902f0ef380f8 /contrib/plugins/howvec.c | |
parent | 31ca70b5ff7c6ac600211f60e3ab024642fe5abb (diff) |
hw/dma: sifive_pdma: Fix Control.claim bit detection
At present the codes detect whether the DMA channel is claimed by:
claimed = !!s->chan[ch].control & CONTROL_CLAIM;
As ! has higher precedence over & (bitwise and), this is essentially
claimed = (!!s->chan[ch].control) & CONTROL_CLAIM;
which is wrong, as any non-zero bit set in the control register will
produce a result of a claimed channel.
Fixes: de7c7988d25d ("hw/dma: sifive_pdma: reset Next* registers when Control.claim is set")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210927072124.1564129-1-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'contrib/plugins/howvec.c')
0 files changed, 0 insertions, 0 deletions