@@ -836,8 +836,9 @@ static int ahash_update_ctx(struct ahash_request *req)
836
836
edesc -> sec4_sg + sec4_sg_src_index ,
837
837
chained );
838
838
if (* next_buflen ) {
839
- sg_copy_part (next_buf , req -> src , to_hash -
840
- * buflen , req -> nbytes );
839
+ scatterwalk_map_and_copy (next_buf , req -> src ,
840
+ to_hash - * buflen ,
841
+ * next_buflen , 0 );
841
842
state -> current_buf = !state -> current_buf ;
842
843
}
843
844
} else {
@@ -878,7 +879,8 @@ static int ahash_update_ctx(struct ahash_request *req)
878
879
kfree (edesc );
879
880
}
880
881
} else if (* next_buflen ) {
881
- sg_copy (buf + * buflen , req -> src , req -> nbytes );
882
+ scatterwalk_map_and_copy (buf + * buflen , req -> src , 0 ,
883
+ req -> nbytes , 0 );
882
884
* buflen = * next_buflen ;
883
885
* next_buflen = last_buflen ;
884
886
}
@@ -1262,8 +1264,9 @@ static int ahash_update_no_ctx(struct ahash_request *req)
1262
1264
src_map_to_sec4_sg (jrdev , req -> src , src_nents ,
1263
1265
edesc -> sec4_sg + 1 , chained );
1264
1266
if (* next_buflen ) {
1265
- sg_copy_part (next_buf , req -> src , to_hash - * buflen ,
1266
- req -> nbytes );
1267
+ scatterwalk_map_and_copy (next_buf , req -> src ,
1268
+ to_hash - * buflen ,
1269
+ * next_buflen , 0 );
1267
1270
state -> current_buf = !state -> current_buf ;
1268
1271
}
1269
1272
@@ -1304,7 +1307,8 @@ static int ahash_update_no_ctx(struct ahash_request *req)
1304
1307
kfree (edesc );
1305
1308
}
1306
1309
} else if (* next_buflen ) {
1307
- sg_copy (buf + * buflen , req -> src , req -> nbytes );
1310
+ scatterwalk_map_and_copy (buf + * buflen , req -> src , 0 ,
1311
+ req -> nbytes , 0 );
1308
1312
* buflen = * next_buflen ;
1309
1313
* next_buflen = 0 ;
1310
1314
}
@@ -1476,7 +1480,8 @@ static int ahash_update_first(struct ahash_request *req)
1476
1480
}
1477
1481
1478
1482
if (* next_buflen )
1479
- sg_copy_part (next_buf , req -> src , to_hash , req -> nbytes );
1483
+ scatterwalk_map_and_copy (next_buf , req -> src , to_hash ,
1484
+ * next_buflen , 0 );
1480
1485
1481
1486
sh_len = desc_len (sh_desc );
1482
1487
desc = edesc -> hw_desc ;
@@ -1511,7 +1516,8 @@ static int ahash_update_first(struct ahash_request *req)
1511
1516
state -> update = ahash_update_no_ctx ;
1512
1517
state -> finup = ahash_finup_no_ctx ;
1513
1518
state -> final = ahash_final_no_ctx ;
1514
- sg_copy (next_buf , req -> src , req -> nbytes );
1519
+ scatterwalk_map_and_copy (next_buf , req -> src , 0 ,
1520
+ req -> nbytes , 0 );
1515
1521
}
1516
1522
#ifdef DEBUG
1517
1523
print_hex_dump (KERN_ERR , "next buf@" __stringify (__LINE__ )": " ,
0 commit comments