Re: [PATCH v3 08/17] ufs: core: mcq: Allocate memory for mcq mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux