| 1 |
|
| 2 | #ifndef _LINUX_CRC64_H
|
| 3 | #define _LINUX_CRC64_H
|
| 4 |
|
| 5 | #include <linux/types.h>
|
| 6 |
|
| 7 | |
| 8 | * crc64_be - Calculate bitwise big-endian ECMA-182 CRC64
|
| 9 | * @crc: seed value for computation. 0 or (u64)~0 for a new CRC calculation,
|
| 10 | * or the previous crc64 value if computing incrementally.
|
| 11 | * @p: pointer to buffer over which CRC64 is run
|
| 12 | * @len: length of buffer @p
|
| 13 |
|
| 14 | u64 crc64_be(u64 crc, const void *p, size_t len);
|
| 15 |
|
| 16 | |
| 17 | * crc64_nvme - Calculate CRC64-NVME
|
| 18 | * @crc: seed value for computation. 0 for a new CRC calculation, or the
|
| 19 | * previous crc64 value if computing incrementally.
|
| 20 | * @p: pointer to buffer over which CRC64 is run
|
| 21 | * @len: length of buffer @p
|
| 22 | *
|
| 23 | * This computes the CRC64 defined in the NVME NVM Command Set Specification,
|
| 24 | * *including the bitwise inversion at the beginning and end*.
|
| 25 |
|
| 26 | u64 crc64_nvme(u64 crc, const void *p, size_t len);
|
| 27 |
|
| 28 | #endif
|