* [Qemu-devel] [PATCH] scsi: fill in additional sense length correctly
@ 2011-09-06 10:31 Paolo Bonzini
2011-09-06 13:46 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2011-09-06 10:31 UTC (permalink / raw)
To: qemu-devel
Even though we do not use them, we should include the last three
bytes of sense data in the additional sense length.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi-bus.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 80b8802..96d6305 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -501,6 +501,7 @@ void scsi_req_build_sense(SCSIRequest *req, SCSISense sense)
memset(req->sense, 0, 18);
req->sense[0] = 0xf0;
req->sense[2] = sense.key;
+ req->sense[7] = 10;
req->sense[12] = sense.asc;
req->sense[13] = sense.ascq;
req->sense_len = 18;
@@ -887,7 +888,7 @@ int scsi_build_sense(uint8_t *in_buf, int in_len,
/* Return fixed format sense buffer */
buf[0] = 0xf0;
buf[2] = sense.key;
- buf[7] = 7;
+ buf[7] = 10;
buf[12] = sense.asc;
buf[13] = sense.ascq;
return MIN(len, 18);
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi: fill in additional sense length correctly
2011-09-06 10:31 [Qemu-devel] [PATCH] scsi: fill in additional sense length correctly Paolo Bonzini
@ 2011-09-06 13:46 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2011-09-06 13:46 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
Am 06.09.2011 12:31, schrieb Paolo Bonzini:
> Even though we do not use them, we should include the last three
> bytes of sense data in the additional sense length.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-06 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 10:31 [Qemu-devel] [PATCH] scsi: fill in additional sense length correctly Paolo Bonzini
2011-09-06 13:46 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).