lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 09/16] ufs: core: mcq: Configure operation and runtime interface
From
On 11/22/22 20:10, Asutosh Das wrote:
> +static void ufshcd_config_mcq(struct ufs_hba *hba)
> +{
> + ufshcd_enable_intr(hba, UFSHCD_ENABLE_MCQ_INTRS);
> + ufshcd_mcq_make_queues_operational(hba);
> + ufshcd_mcq_config_mac(hba, hba->nutrs);
> +
> + hba->host->can_queue = hba->nutrs - UFSHCD_NUM_RESERVED;
> + hba->reserved_slot = hba->nutrs - UFSHCD_NUM_RESERVED;
> + dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n",
> + hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT],
> + hba->nr_queues[HCTX_TYPE_READ], hba->nr_queues[HCTX_TYPE_POLL],
> + hba->nutrs);
> +}

Please do not reserve a slot for device commands in MCQ mode but instead
queue device management commands on the device management command queue
in MCQ mode. Please also add WARN_ON_ONCE() statements in the code that
uses hba->reserved_slot to make sure that that variable is not used in
MCQ mode.

Thanks,

Bart.

\
 
 \ /
  Last update: 2022-11-26 02:29    [W:0.597 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site