Always return SCSI host byte errors and drop the usage of DRIVER_ERROR status. This also fixes an issue where we would return a host byte value interpreted as a driver byte. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/xen/xen-scsiback.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index e130b4426c62..8e93b7113b26 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c @@ -260,10 +260,10 @@ static void scsiback_print_status(char *sense_buffer, int errors, { struct scsiback_tpg *tpg = pending_req->v2p->tpg; - pr_err("[%s:%d] cmnd[0]=%02x -> st=%02x msg=%02x host=%02x drv=%02x\n", + pr_err("[%s:%d] cmnd[0]=%02x -> st=%02x msg=%02x host=%02x drv=00\n", tpg->tport->tport_name, pending_req->v2p->lun, pending_req->cmnd[0], status_byte(errors), msg_byte(errors), - host_byte(errors), driver_byte(errors)); + host_byte(errors)); } static void scsiback_fast_flush_area(struct vscsibk_pend *req) @@ -757,10 +757,10 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info) result = DID_NO_CONNECT; break; default: - result = DRIVER_ERROR; + result = DID_ERROR; break; } - scsiback_send_response(info, NULL, result << 24, 0, + scsiback_send_response(info, NULL, result << 16, 0, ring_req.rqid); return 1; } @@ -770,7 +770,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info) if (scsiback_gnttab_data_map(&ring_req, pending_req)) { scsiback_fast_flush_area(pending_req); scsiback_do_resp_with_sense(NULL, - DRIVER_ERROR << 24, 0, pending_req); + DID_ERROR << 16, 0, pending_req); transport_generic_free_cmd(&pending_req->se_cmd, 0); } else { scsiback_cmd_exec(pending_req); @@ -785,7 +785,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info) break; default: pr_err_ratelimited("invalid request\n"); - scsiback_do_resp_with_sense(NULL, DRIVER_ERROR << 24, 0, + scsiback_do_resp_with_sense(NULL, DID_ERROR << 16, 0, pending_req); transport_generic_free_cmd(&pending_req->se_cmd, 0); break; -- 2.16.4