Merge tag 'mmc-v5.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[linux-2.6-microblaze.git] / block / bsg.c
index bd10922..33e3f82 100644 (file)
@@ -96,7 +96,9 @@ static int bsg_scsi_complete_rq(struct request *rq, struct sg_io_v4 *hdr)
         */
        hdr->device_status = sreq->result & 0xff;
        hdr->transport_status = host_byte(sreq->result);
-       hdr->driver_status = driver_byte(sreq->result);
+       hdr->driver_status = 0;
+       if (scsi_status_is_check_condition(sreq->result))
+               hdr->driver_status = DRIVER_SENSE;
        hdr->info = 0;
        if (hdr->device_status || hdr->transport_status || hdr->driver_status)
                hdr->info |= SG_INFO_CHECK;