* [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled
@ 2017-05-26 16:59 Martin K. Petersen
2017-05-31 15:05 ` Bart Van Assche
2017-05-31 15:21 ` Ewan D. Milne
0 siblings, 2 replies; 4+ messages in thread
From: Martin K. Petersen @ 2017-05-26 16:59 UTC (permalink / raw)
To: linux-scsi; +Cc: Martin K. Petersen
It was not possible to enable both T10 PI and TGPS because they share
the same byte in the INQUIRY response. Logically OR the TPGS value
instead of using assignment.
Reported-by: Ritika Srivastava <ritika.srivastava@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 17249c3650fe..b945d187873f 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1404,7 +1404,7 @@ static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
arr[4] = SDEBUG_LONG_INQ_SZ - 5;
arr[5] = (int)have_dif_prot; /* PROTECT bit */
if (sdebug_vpd_use_hostno == 0)
- arr[5] = 0x10; /* claim: implicit TGPS */
+ arr[5] |= 0x10; /* claim: implicit TGPS */
arr[6] = 0x10; /* claim: MultiP */
/* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */
arr[7] = 0xa; /* claim: LINKED + CMDQUE */
--
2.13.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled
2017-05-26 16:59 [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled Martin K. Petersen
@ 2017-05-31 15:05 ` Bart Van Assche
2017-05-31 15:21 ` Ewan D. Milne
1 sibling, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2017-05-31 15:05 UTC (permalink / raw)
To: linux-scsi, martin.petersen
On Fri, 2017-05-26 at 12:59 -0400, Martin K. Petersen wrote:
> It was not possible to enable both T10 PI and TGPS because they share
> the same byte in the INQUIRY response. Logically OR the TPGS value
> instead of using assignment.
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled
2017-05-26 16:59 [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled Martin K. Petersen
2017-05-31 15:05 ` Bart Van Assche
@ 2017-05-31 15:21 ` Ewan D. Milne
2017-06-01 2:59 ` Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Ewan D. Milne @ 2017-05-31 15:21 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: linux-scsi
On Fri, 2017-05-26 at 12:59 -0400, Martin K. Petersen wrote:
> It was not possible to enable both T10 PI and TGPS because they share
> the same byte in the INQUIRY response. Logically OR the TPGS value
> instead of using assignment.
>
> Reported-by: Ritika Srivastava <ritika.srivastava@oracle.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> ---
> drivers/scsi/scsi_debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index 17249c3650fe..b945d187873f 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
> @@ -1404,7 +1404,7 @@ static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
> arr[4] = SDEBUG_LONG_INQ_SZ - 5;
> arr[5] = (int)have_dif_prot; /* PROTECT bit */
> if (sdebug_vpd_use_hostno == 0)
> - arr[5] = 0x10; /* claim: implicit TGPS */
> + arr[5] |= 0x10; /* claim: implicit TGPS */
> arr[6] = 0x10; /* claim: MultiP */
> /* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */
> arr[7] = 0xa; /* claim: LINKED + CMDQUE */
Code is correct.
s/TGPS/TPGS in the subject line and in one place in the patch description.
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled
2017-05-31 15:21 ` Ewan D. Milne
@ 2017-06-01 2:59 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2017-06-01 2:59 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: Martin K. Petersen, linux-scsi
Ewan,
> Code is correct.
>
> s/TGPS/TPGS in the subject line and in one place in the patch
> description.
Also fixed the original, incorrect comment in the code that begat the
patch description typo. Thanks!
Applied to 4.12/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-01 2:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 16:59 [PATCH 1/1] scsi: scsi_debug: Avoid PI being disabled when TGPS is enabled Martin K. Petersen
2017-05-31 15:05 ` Bart Van Assche
2017-05-31 15:21 ` Ewan D. Milne
2017-06-01 2:59 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.