blk_execute_rq(q, bd_disk, rq);
/* write to all output members */
- hdr->status = rq->errors;
- hdr->masked_status = (hdr->status >> 1) & 0x1f;
- hdr->msg_status = 0;
- hdr->host_status = 0;
- hdr->driver_status = 0;
+ hdr->status = 0xff & rq->errors;
+ hdr->masked_status = status_byte(rq->errors);
+ hdr->msg_status = msg_byte(rq->errors);
+ hdr->host_status = host_byte(rq->errors);
+ hdr->driver_status = driver_byte(rq->errors);
hdr->info = 0;
if (hdr->masked_status || hdr->host_status || hdr->driver_status)
hdr->info |= SG_INFO_CHECK;
}
if (blk_pc_request(req)) { /* SG_IO ioctl from block level */
- req->errors = (driver_byte(result) & DRIVER_SENSE) ?
- (CHECK_CONDITION << 1) : (result & 0xff);
+ req->errors = result;
if (result) {
clear_errors = 0;
if (scsi_command_normalize_sense(cmd, &sshdr)) {