Commit 7bafa74
crypto: sahara - fix processing hash requests with req->nbytes < sg->length
It's not always the case that the entire sg entry needs to be processed.
Currently, when nbytes is less than sg->length, "Descriptor length" errors
are encountered.
To fix this, take the actual request size into account when populating the
hw links.
Fixes: 5a2bb93 ("crypto: sahara - add support for SHA1/256")
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>1 parent 5deff02 commit 7bafa74
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
| 777 | + | |
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
| |||
795 | 796 | | |
796 | 797 | | |
797 | 798 | | |
| 799 | + | |
798 | 800 | | |
799 | | - | |
| 801 | + | |
800 | 802 | | |
801 | 803 | | |
802 | 804 | | |
803 | 805 | | |
| 806 | + | |
804 | 807 | | |
805 | 808 | | |
806 | 809 | | |
| |||
0 commit comments