On 11/16/20 7:58 PM, Paolo Bonzini wrote:
On 16/11/20 19:40, Hannes Reinecke wrote:
+    if (sreq->host_status == SCSI_HOST_OK) {
+        SCSISense sense;
+
+        sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense);
+        if (sreq->status == CHECK_CONDITION) {
+            scsi_req_build_sense(sreq, sense);
+        }
+    }

Should be != of course.

No.
scsi_req_build_sense() transfers the sense code from the second argument
into a proper SCSI sense. Which is only set if the status is CHECK_CONDITION...

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
h...@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

Reply via email to