[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-scsi
Subject:    Re: [PATCH v3 08/17] ufs: core: mcq: Allocate memory for mcq mode
From:       Asutosh Das <quic_asutoshd () quicinc ! com>
Date:       2022-10-31 19:39:14
Message-ID: 20221031193914.GF9077 () asutoshd-linux1 ! qualcomm ! com
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic