[SCSI] sd: Support disks formatted with DIF Type 2

Disks formatted with DIF Type 2 reject READ/WRITE 6/10/12/16 commands
when protection is enabled.  Only the 32-byte variants are supported.

Implement support for issusing 32-byte READ/WRITE and enable Type 2
drives in the protection type detection logic.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
Martin K. Petersen
2009-09-20 16:49:38 -04:00
committed by James Bottomley
parent b4c2554d40
commit 4e7392ec58
3 changed files with 78 additions and 11 deletions

View File

@@ -37,6 +37,11 @@
*/
#define SD_LAST_BUGGY_SECTORS 8
enum {
SD_EXT_CDB_SIZE = 32, /* Extended CDB size */
SD_MEMPOOL_SIZE = 2, /* CDB pool size */
};
struct scsi_disk {
struct scsi_driver *driver; /* always &sd_template */
struct scsi_device *device;