aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd_dif.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-09-11 13:35:41 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-09-15 09:51:14 -0400
commit8475c8118551f806176b5af4d0e8657a5f015b95 (patch)
tree64d1f724585a7baef043f6163764d021f2e2f01c /drivers/scsi/sd_dif.c
parent27c0e83b273a637d5cb56f02550c31d803bafc10 (diff)
scsi: sd: Move DIF protection types to t10-pi.h
These should go together with the rest of the T10 protection information defintions. [mkp: s/T10_DIF/T10_PI/] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd_dif.c')
-rw-r--r--drivers/scsi/sd_dif.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
index 987bf392c336..9035380c0dda 100644
--- a/drivers/scsi/sd_dif.c
+++ b/drivers/scsi/sd_dif.c
@@ -60,14 +60,14 @@ void sd_dif_config_host(struct scsi_disk *sdkp)
60 60
61 /* Enable DMA of protection information */ 61 /* Enable DMA of protection information */
62 if (scsi_host_get_guard(sdkp->device->host) & SHOST_DIX_GUARD_IP) { 62 if (scsi_host_get_guard(sdkp->device->host) & SHOST_DIX_GUARD_IP) {
63 if (type == SD_DIF_TYPE3_PROTECTION) 63 if (type == T10_PI_TYPE3_PROTECTION)
64 bi.profile = &t10_pi_type3_ip; 64 bi.profile = &t10_pi_type3_ip;
65 else 65 else
66 bi.profile = &t10_pi_type1_ip; 66 bi.profile = &t10_pi_type1_ip;
67 67
68 bi.flags |= BLK_INTEGRITY_IP_CHECKSUM; 68 bi.flags |= BLK_INTEGRITY_IP_CHECKSUM;
69 } else 69 } else
70 if (type == SD_DIF_TYPE3_PROTECTION) 70 if (type == T10_PI_TYPE3_PROTECTION)
71 bi.profile = &t10_pi_type3_crc; 71 bi.profile = &t10_pi_type3_crc;
72 else 72 else
73 bi.profile = &t10_pi_type1_crc; 73 bi.profile = &t10_pi_type1_crc;
@@ -82,7 +82,7 @@ void sd_dif_config_host(struct scsi_disk *sdkp)
82 if (!sdkp->ATO) 82 if (!sdkp->ATO)
83 goto out; 83 goto out;
84 84
85 if (type == SD_DIF_TYPE3_PROTECTION) 85 if (type == T10_PI_TYPE3_PROTECTION)
86 bi.tag_size = sizeof(u16) + sizeof(u32); 86 bi.tag_size = sizeof(u16) + sizeof(u32);
87 else 87 else
88 bi.tag_size = sizeof(u16); 88 bi.tag_size = sizeof(u16);
@@ -121,7 +121,7 @@ void sd_dif_prepare(struct scsi_cmnd *scmd)
121 121
122 sdkp = scsi_disk(scmd->request->rq_disk); 122 sdkp = scsi_disk(scmd->request->rq_disk);
123 123
124 if (sdkp->protection_type == SD_DIF_TYPE3_PROTECTION) 124 if (sdkp->protection_type == T10_PI_TYPE3_PROTECTION)
125 return; 125 return;
126 126
127 phys = scsi_prot_ref_tag(scmd); 127 phys = scsi_prot_ref_tag(scmd);
@@ -172,7 +172,7 @@ void sd_dif_complete(struct scsi_cmnd *scmd, unsigned int good_bytes)
172 172
173 sdkp = scsi_disk(scmd->request->rq_disk); 173 sdkp = scsi_disk(scmd->request->rq_disk);
174 174
175 if (sdkp->protection_type == SD_DIF_TYPE3_PROTECTION || good_bytes == 0) 175 if (sdkp->protection_type == T10_PI_TYPE3_PROTECTION || good_bytes == 0)
176 return; 176 return;
177 177
178 intervals = good_bytes / scsi_prot_interval(scmd); 178 intervals = good_bytes / scsi_prot_interval(scmd);