* [PATCH] scsi: Fix sense information setting in fixed sized format
@ 2015-07-08 15:00 Sagi Grimberg
2015-07-09 14:38 ` Bart Van Assche
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sagi Grimberg @ 2015-07-08 15:00 UTC (permalink / raw)
To: linux-scsi
Cc: Christoph Hellwig, Hannes Reinecke, Martin K. Petersen,
James Bottomley
In fixed size sense format the information field is a four byte
field.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
---
drivers/scsi/scsi_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c
index 41432c1..8cfb7ee 100644
--- a/drivers/scsi/scsi_common.c
+++ b/drivers/scsi/scsi_common.c
@@ -270,7 +270,7 @@ void scsi_set_sense_information(u8 *buf, u64 info)
put_unaligned_be64(info, &ucp[4]);
} else if ((buf[0] & 0x7f) == 0x70) {
buf[0] |= 0x80;
- put_unaligned_be64(info, &buf[3]);
+ put_unaligned_be32(info, &buf[3]);
}
}
EXPORT_SYMBOL(scsi_set_sense_information);
--
1.8.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] scsi: Fix sense information setting in fixed sized format
2015-07-08 15:00 [PATCH] scsi: Fix sense information setting in fixed sized format Sagi Grimberg
@ 2015-07-09 14:38 ` Bart Van Assche
2015-07-09 16:27 ` Martin K. Petersen
2015-07-11 11:27 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2015-07-09 14:38 UTC (permalink / raw)
To: Sagi Grimberg, linux-scsi
Cc: Christoph Hellwig, Hannes Reinecke, Martin K. Petersen,
James Bottomley
On 07/08/15 08:00, Sagi Grimberg wrote:
> In fixed size sense format the information field is a four byte
> field.
>
> Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
> ---
> drivers/scsi/scsi_common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_common.c b/drivers/scsi/scsi_common.c
> index 41432c1..8cfb7ee 100644
> --- a/drivers/scsi/scsi_common.c
> +++ b/drivers/scsi/scsi_common.c
> @@ -270,7 +270,7 @@ void scsi_set_sense_information(u8 *buf, u64 info)
> put_unaligned_be64(info, &ucp[4]);
> } else if ((buf[0] & 0x7f) == 0x70) {
> buf[0] |= 0x80;
> - put_unaligned_be64(info, &buf[3]);
> + put_unaligned_be32(info, &buf[3]);
> }
> }
> EXPORT_SYMBOL(scsi_set_sense_information);
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] scsi: Fix sense information setting in fixed sized format
2015-07-08 15:00 [PATCH] scsi: Fix sense information setting in fixed sized format Sagi Grimberg
2015-07-09 14:38 ` Bart Van Assche
@ 2015-07-09 16:27 ` Martin K. Petersen
2015-07-11 11:27 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2015-07-09 16:27 UTC (permalink / raw)
To: Sagi Grimberg
Cc: linux-scsi, Christoph Hellwig, Hannes Reinecke,
Martin K. Petersen, James Bottomley
>>>>> "Sagi" == Sagi Grimberg <sagig@mellanox.com> writes:
Sagi> In fixed size sense format the information field is a four byte
Sagi> field.
Correct.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: Fix sense information setting in fixed sized format
2015-07-08 15:00 [PATCH] scsi: Fix sense information setting in fixed sized format Sagi Grimberg
2015-07-09 14:38 ` Bart Van Assche
2015-07-09 16:27 ` Martin K. Petersen
@ 2015-07-11 11:27 ` Christoph Hellwig
2015-07-12 6:36 ` Sagi Grimberg
2 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2015-07-11 11:27 UTC (permalink / raw)
To: Sagi Grimberg
Cc: linux-scsi, Christoph Hellwig, Hannes Reinecke,
Martin K. Petersen, James Bottomley
On Wed, Jul 08, 2015 at 06:00:03PM +0300, Sagi Grimberg wrote:
> In fixed size sense format the information field is a four byte
> field.
This looks correct to me,
Reviewed-by: Christoph Hellwig <hch@lst.de>
But: this will truncate > 32bit sector numbers. Maybe we need to
enable descriptor format sense data for large enough LUs.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: Fix sense information setting in fixed sized format
2015-07-11 11:27 ` Christoph Hellwig
@ 2015-07-12 6:36 ` Sagi Grimberg
0 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2015-07-12 6:36 UTC (permalink / raw)
To: Christoph Hellwig, Sagi Grimberg
Cc: linux-scsi, Hannes Reinecke, Martin K. Petersen, James Bottomley
> This looks correct to me,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> But: this will truncate > 32bit sector numbers. Maybe we need to
> enable descriptor format sense data for large enough LUs.
That should be easy enough now that the sense data is constructed using
scsi helpers.
Let me prepare a patch for that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-12 6:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 15:00 [PATCH] scsi: Fix sense information setting in fixed sized format Sagi Grimberg
2015-07-09 14:38 ` Bart Van Assche
2015-07-09 16:27 ` Martin K. Petersen
2015-07-11 11:27 ` Christoph Hellwig
2015-07-12 6:36 ` Sagi Grimberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox