diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2008-07-17 04:28:30 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 15:14:54 -0400 |
commit | 4469f9878059f1707f021512e6b34252c4096ee7 (patch) | |
tree | 3bc8ea358bea85235a8d9691c8b999626e685e0d /drivers/scsi/scsi_sysfs.c | |
parent | 7c32c7a2d36c52d2b9ed040a9171364020ecc6a2 (diff) |
[SCSI] Host protection capabilities
Controllers that support protection information must indicate this to
the SCSI midlayer so that the ULD can prepare scsi_cmnds accordingly.
This patch implements a host mask and various types of protection:
- DIF Type 1-3 (between HBA and disk)
- DIX Type 0-3 (between OS and HBA)
The patch also allows the HBA to set the guard type to something
different than the T10-mandated CRC.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index b6e561059779..ab3c71869be5 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -249,6 +249,8 @@ shost_rd_attr(cmd_per_lun, "%hd\n"); | |||
249 | shost_rd_attr(can_queue, "%hd\n"); | 249 | shost_rd_attr(can_queue, "%hd\n"); |
250 | shost_rd_attr(sg_tablesize, "%hu\n"); | 250 | shost_rd_attr(sg_tablesize, "%hu\n"); |
251 | shost_rd_attr(unchecked_isa_dma, "%d\n"); | 251 | shost_rd_attr(unchecked_isa_dma, "%d\n"); |
252 | shost_rd_attr(prot_capabilities, "%u\n"); | ||
253 | shost_rd_attr(prot_guard_type, "%hd\n"); | ||
252 | shost_rd_attr2(proc_name, hostt->proc_name, "%s\n"); | 254 | shost_rd_attr2(proc_name, hostt->proc_name, "%s\n"); |
253 | 255 | ||
254 | static struct attribute *scsi_sysfs_shost_attrs[] = { | 256 | static struct attribute *scsi_sysfs_shost_attrs[] = { |
@@ -263,6 +265,8 @@ static struct attribute *scsi_sysfs_shost_attrs[] = { | |||
263 | &dev_attr_hstate.attr, | 265 | &dev_attr_hstate.attr, |
264 | &dev_attr_supported_mode.attr, | 266 | &dev_attr_supported_mode.attr, |
265 | &dev_attr_active_mode.attr, | 267 | &dev_attr_active_mode.attr, |
268 | &dev_attr_prot_capabilities.attr, | ||
269 | &dev_attr_prot_guard_type.attr, | ||
266 | NULL | 270 | NULL |
267 | }; | 271 | }; |
268 | 272 | ||