]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: scsi_debug: Improve RDPROTECT/WRPROTECT handling
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Jun 2021 03:39:23 +0000 (23:39 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 21 Jul 2021 02:10:42 +0000 (22:10 -0400)
commit54d4dc381a39df2a6762ba4187f9d6876b28fd23
treed6ac271fc336cd37862077d1e45a09c6627e69ed
parent52eb6d13b64fb57174715db90e9c772831a4a934
scsi: scsi_debug: Improve RDPROTECT/WRPROTECT handling

It is useful for testing purposes to be able to inject errors by writing
bad protection information to media with checking disabled and then
attempting to read it back. Extend scsi_debug's PI verification logic to
give the driver feature parity with commercially available drives. Almost
all devices with PI capability support RDPROTECT and WRPROTECT values of 0,
1, and 3.

Link: https://lore.kernel.org/r/20210609033929.3815-10-martin.petersen@oracle.com
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Message-Id: <20210609033929.3815-10-martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c