[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC

The SCSI Block Protocol uses this 16-bit CRC to verify the integrity
of each data sector.  crc_t10dif() is used by sd_dif.c when performing
I/O to or from disks formatted with protection information.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Martin K. Petersen 2008-06-25 11:22:42 -04:00 committed by James Bottomley
parent 5b635da11e
commit f11f594edb
4 changed files with 83 additions and 0 deletions

View file

@ -0,0 +1,8 @@
#ifndef _LINUX_CRC_T10DIF_H
#define _LINUX_CRC_T10DIF_H
#include <linux/types.h>
__u16 crc_t10dif(unsigned char const *, size_t);
#endif