diff options
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/mv_cesa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 8891e2e703e3..4262932d4a27 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -42,7 +42,7 @@ enum engine_status { | |||
42 | * @hw_nbytes: total bytes to process in hw for this request | 42 | * @hw_nbytes: total bytes to process in hw for this request |
43 | * @sg_dst_left: bytes left dst to process in this scatter list | 43 | * @sg_dst_left: bytes left dst to process in this scatter list |
44 | * @dst_start: offset to add to dst start position (scatter list) | 44 | * @dst_start: offset to add to dst start position (scatter list) |
45 | * @total_req_bytes: total number of bytes processed (request). | 45 | * @hw_processed_bytes: number of bytes processed by hw (request). |
46 | * | 46 | * |
47 | * sg helper are used to iterate over the scatterlist. Since the size of the | 47 | * sg helper are used to iterate over the scatterlist. Since the size of the |
48 | * SRAM may be less than the scatter size, this struct struct is used to keep | 48 | * SRAM may be less than the scatter size, this struct struct is used to keep |
@@ -60,7 +60,7 @@ struct req_progress { | |||
60 | /* dst mostly */ | 60 | /* dst mostly */ |
61 | int sg_dst_left; | 61 | int sg_dst_left; |
62 | int dst_start; | 62 | int dst_start; |
63 | int total_req_bytes; | 63 | int hw_processed_bytes; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | struct crypto_priv { | 66 | struct crypto_priv { |
@@ -181,7 +181,7 @@ static void setup_data_in(void) | |||
181 | { | 181 | { |
182 | struct req_progress *p = &cpg->p; | 182 | struct req_progress *p = &cpg->p; |
183 | p->crypt_len = | 183 | p->crypt_len = |
184 | min(p->hw_nbytes - p->total_req_bytes, cpg->max_req_size); | 184 | min(p->hw_nbytes - p->hw_processed_bytes, cpg->max_req_size); |
185 | copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START, | 185 | copy_src_to_buf(p, cpg->sram + SRAM_DATA_IN_START, |
186 | p->crypt_len); | 186 | p->crypt_len); |
187 | } | 187 | } |
@@ -265,7 +265,7 @@ static void dequeue_complete_req(void) | |||
265 | int need_copy_len = cpg->p.crypt_len; | 265 | int need_copy_len = cpg->p.crypt_len; |
266 | int sram_offset = 0; | 266 | int sram_offset = 0; |
267 | 267 | ||
268 | cpg->p.total_req_bytes += cpg->p.crypt_len; | 268 | cpg->p.hw_processed_bytes += cpg->p.crypt_len; |
269 | do { | 269 | do { |
270 | int dst_copy; | 270 | int dst_copy; |
271 | 271 | ||
@@ -291,7 +291,7 @@ static void dequeue_complete_req(void) | |||
291 | } while (need_copy_len > 0); | 291 | } while (need_copy_len > 0); |
292 | 292 | ||
293 | BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE); | 293 | BUG_ON(cpg->eng_st != ENGINE_W_DEQUEUE); |
294 | if (cpg->p.total_req_bytes < cpg->p.hw_nbytes) { | 294 | if (cpg->p.hw_processed_bytes < cpg->p.hw_nbytes) { |
295 | /* process next scatter list entry */ | 295 | /* process next scatter list entry */ |
296 | cpg->eng_st = ENGINE_BUSY; | 296 | cpg->eng_st = ENGINE_BUSY; |
297 | mv_process_current_q(0); | 297 | mv_process_current_q(0); |