lkml.org 
[lkml]   [2021]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v22 4/4] scsi: ufs: Add HPB 2.0 support
Date

> @@ -2656,7 +2656,12 @@ static int ufshcd_queuecommand(struct Scsi_Host
> *host, struct scsi_cmnd *cmd)
>
> lrbp->req_abort_skip = false;
>
> - ufshpb_prep(hba, lrbp);
> + err = ufshpb_prep(hba, lrbp);
> + if (err == -EAGAIN) {
> + lrbp->cmd = NULL;
> + ufshcd_release(hba);
> + goto out;
> + }
Did I miss-read it, or are you bailing out of wb failed e.g. because no tag is available?
Why not continue with read10?



> + if (blk_insert_cloned_request(q, req) != BLK_STS_OK)
> + return -EAGAIN;
Why did you choose to use blk_insert_cloned_request and not e.g. the more common blk_execute_rq_nowait?

> + hpb->stats.pre_req_cnt++;
> +
> + return 0;
> +}

> - ufshpb_set_hpb_read_to_upiu(hpb, lrbp, lpn, ppn, transfer_len);
> + if (ufshpb_is_required_wb(hpb, transfer_len)) {
> + err = ufshpb_issue_pre_req(hpb, cmd, &read_id);
> + if (err) {
> + unsigned long timeout;
> +
> + timeout = cmd->jiffies_at_alloc + msecs_to_jiffies(
> + hpb->params.requeue_timeout_ms);
> + if (time_before(jiffies, timeout))
> + return -EAGAIN;
Why requeue_timeout_ms needs to be a configurable parameter?
Why rq->timeout is not enough?

Thanks,
Avri


\
 
 \ /
  Last update: 2021-02-23 13:49    [W:0.184 / U:26.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site