lkml.org 
[lkml]   [2021]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: RE: [PATCH v29 4/4] scsi: ufs: Add HPB 2.0 support
From
Date
Hi Avri,

>> +static int ufshpb_execute_umap_req(struct ufshpb_lu *hpb,
>> + struct ufshpb_req *umap_req,
>> + struct ufshpb_region *rgn)
>> +{
>> + struct request *req;
>> + struct scsi_request *rq;
>> +
>> + req = umap_req->req;
>> + req->timeout = 0;
>> + req->end_io_data = (void *)umap_req;
>> + rq = scsi_req(req);
>> + ufshpb_set_unmap_cmd(rq->cmd, rgn);
>> + rq->cmd_len = HPB_WRITE_BUFFER_CMD_LENGTH;
>> +
>> + blk_execute_rq_nowait(NULL, req, 1, ufshpb_umap_req_compl_fn);
>Typo? Forgot the struct request_queue *q?

The argument of q is removed after this patch.

https://lore.kernel.org/linux-scsi/1611550198-17142-1-git-send-email-guoqing.jiang@cloud.ionos.com/#r

Thanks,
Daejun

>> +
>> + return 0;
>> +}
>> +
>> static int ufshpb_execute_map_req(struct ufshpb_lu *hpb,
>> struct ufshpb_req *map_req, bool last)
>> {
>> @@ -533,12 +878,12 @@ static int ufshpb_execute_map_req(struct ufshpb_lu
>> *hpb,
>>
>> q = hpb->sdev_ufs_lu->request_queue;
>> for (i = 0; i < hpb->pages_per_srgn; i++) {
>> - ret = bio_add_pc_page(q, map_req->bio, map_req->mctx->m_page[i],
>> + ret = bio_add_pc_page(q, map_req->bio, map_req->rb.mctx-
>> >m_page[i],
>> PAGE_SIZE, 0);
>> if (ret != PAGE_SIZE) {
>> dev_err(&hpb->sdev_ufs_lu->sdev_dev,
>> "bio_add_pc_page fail %d - %d\n",
>> - map_req->rgn_idx, map_req->srgn_idx);
>> + map_req->rb.rgn_idx, map_req->rb.srgn_idx);
>> return ret;
>> }
>> }
>> @@ -554,8 +899,8 @@ static int ufshpb_execute_map_req(struct ufshpb_lu
>> *hpb,
>> if (unlikely(last))
>> mem_size = hpb->last_srgn_entries * HPB_ENTRY_SIZE;
>>
>> - ufshpb_set_read_buf_cmd(rq->cmd, map_req->rgn_idx,
>> - map_req->srgn_idx, mem_size);
>> + ufshpb_set_read_buf_cmd(rq->cmd, map_req->rb.rgn_idx,
>> + map_req->rb.srgn_idx, mem_size);
>> rq->cmd_len = HPB_READ_BUFFER_CMD_LENGTH;
>>
>> blk_execute_rq_nowait(NULL, req, 1, ufshpb_map_req_compl_fn);
>Ditto
>
>
>Thanks,
>Avri
>
>
>

\
 
 \ /
  Last update: 2021-03-22 01:53    [W:1.594 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site