Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Martin K. Petersen | f11f594 | 2008-06-25 11:22:42 -0400 | [diff] [blame] | 2 | #ifndef _LINUX_CRC_T10DIF_H |
| 3 | #define _LINUX_CRC_T10DIF_H |
| 4 | |
| 5 | #include <linux/types.h> |
| 6 | |
Herbert Xu | 68411521 | 2013-09-07 12:56:26 +1000 | [diff] [blame] | 7 | #define CRC_T10DIF_DIGEST_SIZE 2 |
| 8 | #define CRC_T10DIF_BLOCK_SIZE 1 |
Martin K. Petersen | b763775 | 2018-08-30 11:00:15 -0400 | [diff] [blame^] | 9 | #define CRC_T10DIF_STRING "crct10dif" |
Herbert Xu | 68411521 | 2013-09-07 12:56:26 +1000 | [diff] [blame] | 10 | |
Martin K. Petersen | 2341c2f8 | 2014-09-26 19:20:07 -0400 | [diff] [blame] | 11 | extern __u16 crc_t10dif_generic(__u16 crc, const unsigned char *buffer, |
| 12 | size_t len); |
| 13 | extern __u16 crc_t10dif(unsigned char const *, size_t); |
Akinobu Mita | 10081fb | 2015-05-01 15:23:50 +0900 | [diff] [blame] | 14 | extern __u16 crc_t10dif_update(__u16 crc, unsigned char const *, size_t); |
Martin K. Petersen | f11f594 | 2008-06-25 11:22:42 -0400 | [diff] [blame] | 15 | |
| 16 | #endif |