t10-pi.c (22164fbe274c2dd96d2887fe121896d321000a61) | t10-pi.c (a754bd5f1874978f55814b4498f66e4a0fd5b256) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * t10_pi.c - Functions for generating and verifying T10 Protection 4 * Information. 5 */ 6 7#include <linux/t10-pi.h> 8#include <linux/blkdev.h> 9#include <linux/crc-t10dif.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * t10_pi.c - Functions for generating and verifying T10 Protection 4 * Information. 5 */ 6 7#include <linux/t10-pi.h> 8#include <linux/blkdev.h> 9#include <linux/crc-t10dif.h> |
10#include <linux/module.h> |
|
10#include <net/checksum.h> 11 12typedef __be16 (csum_fn) (void *, unsigned int); 13 14static __be16 t10_pi_crc_fn(void *data, unsigned int len) 15{ 16 return cpu_to_be16(crc_t10dif(data, len)); 17} --- 257 unchanged lines hidden (view full) --- 275const struct blk_integrity_profile t10_pi_type3_ip = { 276 .name = "T10-DIF-TYPE3-IP", 277 .generate_fn = t10_pi_type3_generate_ip, 278 .verify_fn = t10_pi_type3_verify_ip, 279 .prepare_fn = t10_pi_type3_prepare, 280 .complete_fn = t10_pi_type3_complete, 281}; 282EXPORT_SYMBOL(t10_pi_type3_ip); | 11#include <net/checksum.h> 12 13typedef __be16 (csum_fn) (void *, unsigned int); 14 15static __be16 t10_pi_crc_fn(void *data, unsigned int len) 16{ 17 return cpu_to_be16(crc_t10dif(data, len)); 18} --- 257 unchanged lines hidden (view full) --- 276const struct blk_integrity_profile t10_pi_type3_ip = { 277 .name = "T10-DIF-TYPE3-IP", 278 .generate_fn = t10_pi_type3_generate_ip, 279 .verify_fn = t10_pi_type3_verify_ip, 280 .prepare_fn = t10_pi_type3_prepare, 281 .complete_fn = t10_pi_type3_complete, 282}; 283EXPORT_SYMBOL(t10_pi_type3_ip); |
284 285MODULE_LICENSE("GPL"); |
|