/* fc_bsg_jobdone - completion routine for bsg requests that the LLD has completed @job: fc_bsg_job that is complete  */
static void fc_bsg_jobdone(struct fc_bsg_job *job)
/* fc_bsg_jobdone - completion routine for bsg requests that the LLD has completed @job: fc_bsg_job that is complete  */
static void fc_bsg_jobdone(struct fc_bsg_job *job)
{
	struct request *req = job->req;
	struct request *rsp = req->next_rq;
	int err;
	err = job->req->errors = job->reply->result;
	if (err < 0)
		job->req->sense_len = sizeof(uint32_t);
	else
		job->req->sense_len = job->reply_len;
	req->resid_len = 0;
	if (rsp) {
		WARN_ON(job->reply->reply_payload_rcv_len > rsp->resid_len);
		rsp->resid_len -= min(job->reply->reply_payload_rcv_len,
				      rsp->resid_len);
	}
	blk_complete_request(req);
}