From: Martin K. Petersen Date: Fri, 19 May 2017 16:39:36 +0000 (-0400) Subject: scsi: scsi_debug: Avoid PI being disabled when TPGS is enabled X-Git-Tag: v4.1.12-108.0.20170806_1300^0 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=faafb6374ac379e314111b7ba86c10e2332bdb7e;p=users%2Fjedix%2Flinux-maple.git scsi: scsi_debug: Avoid PI being disabled when TPGS is enabled It was not possible to enable both T10 PI and TPGS because they share the same byte in the INQUIRY response. Logically OR the TPGS value instead of using assignment. Orabug: 25704090 Reported-by: Ritika Srivastava Reviewed-by: Bart Van Assche Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen (cherry picked from commit 70bdf2026d905b8bfa0a455d35018df3e9777a6c) Signed-off-by: Ritika Srivastava Reviewed-by: John Sobecki Conflicts: drivers/scsi/scsi_debug.c --- diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 1f8e2dc9c616a..1e27127c2c586 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -1398,7 +1398,7 @@ static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) arr[4] = SDEBUG_LONG_INQ_SZ - 5; arr[5] = scsi_debug_dif ? 1 : 0; /* PROTECT bit */ if (0 == scsi_debug_vpd_use_hostno) - arr[5] = 0x10; /* claim: implicit TGPS */ + arr[5] |= 0x10; /* claim: implicit TPGS */ arr[6] = 0x10; /* claim: MultiP */ /* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */ arr[7] = 0xa; /* claim: LINKED + CMDQUE */