Commit 58bedf35 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: xen-scsiback: Use DID_ERROR instead of DRIVER_ERROR

DRIVER_ERROR was supposed to signal an error generated by the driver, which
xen-scsiback arguably isn't. Also the driver bytes don't have a detailed
error recovery, so we should rather return DID_ERROR instead of
DRIVER_ERROR.

Link: https://lore.kernel.org/r/20210427083046.31620-13-hare@suse.deReviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4bd51e54
...@@ -719,10 +719,10 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info, ...@@ -719,10 +719,10 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info,
result = DID_NO_CONNECT; result = DID_NO_CONNECT;
break; break;
default: default:
result = DRIVER_ERROR; result = DID_ERROR;
break; break;
} }
scsiback_send_response(info, NULL, result << 24, 0, scsiback_send_response(info, NULL, result << 16, 0,
ring_req.rqid); ring_req.rqid);
return 1; return 1;
} }
...@@ -732,7 +732,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info, ...@@ -732,7 +732,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info,
if (scsiback_gnttab_data_map(&ring_req, pending_req)) { if (scsiback_gnttab_data_map(&ring_req, pending_req)) {
scsiback_fast_flush_area(pending_req); scsiback_fast_flush_area(pending_req);
scsiback_do_resp_with_sense(NULL, 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); transport_generic_free_cmd(&pending_req->se_cmd, 0);
} else { } else {
scsiback_cmd_exec(pending_req); scsiback_cmd_exec(pending_req);
...@@ -747,7 +747,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info, ...@@ -747,7 +747,7 @@ static int scsiback_do_cmd_fn(struct vscsibk_info *info,
break; break;
default: default:
pr_err_ratelimited("invalid request\n"); 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); pending_req);
transport_generic_free_cmd(&pending_req->se_cmd, 0); transport_generic_free_cmd(&pending_req->se_cmd, 0);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment