[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221031193914.GF9077@asutoshd-linux1.qualcomm.com>
Date: Mon, 31 Oct 2022 12:39:14 -0700
From: Asutosh Das <quic_asutoshd@...cinc.com>
To: Avri Altman <Avri.Altman@....com>
CC: "quic_cang@...cinc.com" <quic_cang@...cinc.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
"quic_xiaosenh@...cinc.com" <quic_xiaosenh@...cinc.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"eddie.huang@...iatek.com" <eddie.huang@...iatek.com>,
"daejun7.park@...sung.com" <daejun7.park@...sung.com>,
"bvanassche@....org" <bvanassche@....org>,
"mani@...nel.org" <mani@...nel.org>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"quic_richardp@...cinc.com" <quic_richardp@...cinc.com>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Kiwoong Kim <kwmad.kim@...sung.com>,
"open list" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 08/17] ufs: core: mcq: Allocate memory for mcq mode
On Sun, Oct 30 2022 at 05:28 -0700, Avri Altman wrote:
[...]
>> +/* SDB - Single Doorbell */
>> +static void ufshcd_release_sdb_queue(struct ufs_hba *hba, int nutrs)
>> +{
>> + size_t ucdl_size, utrdl_size;
>> +
>> + ucdl_size = sizeof(struct utp_transfer_cmd_desc) * nutrs;
>> + dmam_free_coherent(hba->dev, ucdl_size, hba->ucdl_base_addr,
>> + hba->ucdl_dma_addr);
>> +
>> + utrdl_size = sizeof(struct utp_transfer_req_desc) * nutrs;
>> + dmam_free_coherent(hba->dev, utrdl_size, hba->utrdl_base_addr,
>> + hba->utrdl_dma_addr);
>> +
>> + devm_kfree(hba->dev, hba->lrb);
>Is it possible not to release the lrb here?
>and then you won't be needing to call ufshcd_memory_alloc again?
>
The hba->nutrs may have changed so number of lrb's may increase as well.
So a reallocation is needed, I think.
-asd
Powered by blists - more mailing lists