mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[HIFN]: Have HW invalidate src and dest descriptors after processing
The descriptors need to be invalidated after processing for ring cleanup to work properly and to avoid using an old destination descriptor when the src and cmd descriptors are already set up and the dst descriptor isn't. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
85e7e60b85
commit
692af5da77
1 changed files with 4 additions and 4 deletions
|
@ -1297,7 +1297,7 @@ static int hifn_setup_src_desc(struct hifn_device *dev, struct page *page,
|
||||||
|
|
||||||
dma->srcr[idx].p = __cpu_to_le32(addr);
|
dma->srcr[idx].p = __cpu_to_le32(addr);
|
||||||
dma->srcr[idx].l = __cpu_to_le32(size | HIFN_D_VALID |
|
dma->srcr[idx].l = __cpu_to_le32(size | HIFN_D_VALID |
|
||||||
HIFN_D_MASKDONEIRQ | HIFN_D_NOINVALID | HIFN_D_LAST);
|
HIFN_D_MASKDONEIRQ | HIFN_D_LAST);
|
||||||
|
|
||||||
if (++idx == HIFN_D_SRC_RSIZE) {
|
if (++idx == HIFN_D_SRC_RSIZE) {
|
||||||
dma->srcr[idx].l = __cpu_to_le32(HIFN_D_VALID |
|
dma->srcr[idx].l = __cpu_to_le32(HIFN_D_VALID |
|
||||||
|
@ -1325,7 +1325,7 @@ static void hifn_setup_res_desc(struct hifn_device *dev)
|
||||||
HIFN_D_VALID | HIFN_D_LAST);
|
HIFN_D_VALID | HIFN_D_LAST);
|
||||||
/*
|
/*
|
||||||
* dma->resr[dma->resi].l = __cpu_to_le32(HIFN_MAX_RESULT | HIFN_D_VALID |
|
* dma->resr[dma->resi].l = __cpu_to_le32(HIFN_MAX_RESULT | HIFN_D_VALID |
|
||||||
* HIFN_D_LAST | HIFN_D_NOINVALID);
|
* HIFN_D_LAST);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (++dma->resi == HIFN_D_RES_RSIZE) {
|
if (++dma->resi == HIFN_D_RES_RSIZE) {
|
||||||
|
@ -1354,12 +1354,12 @@ static void hifn_setup_dst_desc(struct hifn_device *dev, struct page *page,
|
||||||
idx = dma->dsti;
|
idx = dma->dsti;
|
||||||
dma->dstr[idx].p = __cpu_to_le32(addr);
|
dma->dstr[idx].p = __cpu_to_le32(addr);
|
||||||
dma->dstr[idx].l = __cpu_to_le32(size | HIFN_D_VALID |
|
dma->dstr[idx].l = __cpu_to_le32(size | HIFN_D_VALID |
|
||||||
HIFN_D_MASKDONEIRQ | HIFN_D_NOINVALID | HIFN_D_LAST);
|
HIFN_D_MASKDONEIRQ | HIFN_D_LAST);
|
||||||
|
|
||||||
if (++idx == HIFN_D_DST_RSIZE) {
|
if (++idx == HIFN_D_DST_RSIZE) {
|
||||||
dma->dstr[idx].l = __cpu_to_le32(HIFN_D_VALID |
|
dma->dstr[idx].l = __cpu_to_le32(HIFN_D_VALID |
|
||||||
HIFN_D_JUMP | HIFN_D_MASKDONEIRQ |
|
HIFN_D_JUMP | HIFN_D_MASKDONEIRQ |
|
||||||
HIFN_D_LAST | HIFN_D_NOINVALID);
|
HIFN_D_LAST);
|
||||||
idx = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
dma->dsti = idx;
|
dma->dsti = idx;
|
||||||
|
|
Loading…
Reference in a new issue