[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9fb79479-454d-d636-5554-5e080f05415e@quicinc.com>
Date: Thu, 28 Jul 2022 13:00:30 -0700
From: "Asutosh Das (asd)" <quic_asutoshd@...cinc.com>
To: Bart Van Assche <bvanassche@....org>,
Can Guo <quic_cang@...cinc.com>, <stanley.chu@...iatek.com>,
<adrian.hunter@...el.com>, <alim.akhtar@...sung.com>,
<avri.altman@....com>, <beanhuo@...ron.com>,
<quic_nguyenb@...cinc.com>, <quic_ziqichen@...cinc.com>,
<linux-scsi@...r.kernel.org>, <kernel-team@...roid.com>
CC: "James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Daejun Park <daejun7.park@...sung.com>,
Jinyoung Choi <j-young.choi@...sung.com>,
Kiwoong Kim <kwmad.kim@...sung.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] scsi: ufs: Add Multi-Circular Queue support
On 7/28/2022 12:38 PM, Bart Van Assche wrote:
> On 7/19/22 00:01, Can Guo wrote:
>> static int ufshcd_map_queues(struct Scsi_Host *shost)
>> {
>> - int i, ret;
>> + int i, queue_offset = 0, ret;
>> + struct ufs_hba *hba = shost_priv(shost);
>> for (i = 0; i < shost->nr_maps; i++) {
>> struct blk_mq_queue_map *map = &shost->tag_set.map[i];
>> - switch (i) {
>> - case HCTX_TYPE_DEFAULT:
>> - case HCTX_TYPE_POLL:
>> - map->nr_queues = 1;
>> - break;
>> - case HCTX_TYPE_READ:
>> - map->nr_queues = 0;
>> + map->nr_queues = hba->nr_queues[i];
>> + if (!map->nr_queues)
>> continue;
>> - default:
>> - WARN_ON_ONCE(true);
>> - }
>> - map->queue_offset = 0;
>> +
>> + map->queue_offset = queue_offset;
>> + if (i == HCTX_TYPE_POLL && !is_mcq_enabled(hba))
>> + map->queue_offset = 0;
>> +
>> ret = blk_mq_map_queues(map);
>> - WARN_ON_ONCE(ret);
>> +
>> + if (ret)
>> + return ret;
>> +
>> + queue_offset += map->nr_queues;
>> }
>
> It is not clear to me why the WARN_ON_ONCE(ret) statement has been
> changed into "if (ret) return ret;"?
>
Looks like blk_mq_map_queues() only returns 0.
Will remove the if (ret) return ret statement in the next version.
> Thanks,
>
> Bart.
Powered by blists - more mailing lists