]> 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)
commit5880174b42f17606c48809e68861867151a5607e
treed6ac271fc336cd37862077d1e45a09c6627e69ed
parent54decd9316e7b0aaf5d703b54144abda2f0f45cb
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