crypto: caam - Set last bit on src SG list
[firefly-linux-kernel-4.4.55.git] / drivers / crypto / img-hash.c
index 601ab357f661f22a33511ce43d5bd5a4798fdee3..ad47d0d6109845c810055fdb2ddaba8fa9d62039 100644 (file)
@@ -464,7 +464,7 @@ static int img_hash_hw_init(struct img_hash_dev *hdev)
        img_hash_write(hdev, CR_RESET, CR_RESET_UNSET);
        img_hash_write(hdev, CR_INTENAB, CR_INT_NEW_RESULTS_SET);
 
-       nbits = (hdev->req->nbytes << 3);
+       nbits = (u64)hdev->req->nbytes << 3;
        u = nbits >> 32;
        l = nbits;
        img_hash_write(hdev, CR_MESSAGE_LENGTH_H, u);