Commit 16b8c7e
crypto: talitos - use dma_sync_single_for_cpu() before reading descriptor header
commit e17ff3d upstream.
In order to know if a descriptor has been processed by the device,
the driver polls the FIFO to see if DESC_HDR_DONE is set on a descriptor
header to confirm completion.
The current code does not make sure that the CPU gets up to date data
before reading the descriptor.
Fix this by calling dma_sync_single_for_cpu() before reading memory
written by the device.
Cc: stable@vger.kernel.org
Fixes: 58cdbc6 ("crypto: talitos - fix hash on SEC1.")
Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent ad382c5 commit 16b8c7e
1 file changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
329 | 333 | | |
| 334 | + | |
330 | 335 | | |
331 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
332 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
333 | 345 | | |
334 | | - | |
335 | | - | |
336 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
337 | 349 | | |
338 | 350 | | |
339 | 351 | | |
| |||
357 | 369 | | |
358 | 370 | | |
359 | 371 | | |
360 | | - | |
| 372 | + | |
361 | 373 | | |
362 | 374 | | |
363 | 375 | | |
| |||
0 commit comments