Lines Matching refs:mem_item

74 	struct mlxsw_pci_mem_item mem_item;  member
176 return q->mem_item.buf + (elem_size * elem_index); in __mlxsw_pci_queue_elem_get()
292 return q->mem_item.mapaddr + MLXSW_PCI_PAGE_SIZE * page_index; in __mlxsw_pci_queue_page_get()
1241 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_init() local
1257 mem_item->size = MLXSW_PCI_AQ_SIZE; in mlxsw_pci_queue_init()
1258 mem_item->buf = dma_alloc_coherent(&mlxsw_pci->pdev->dev, in mlxsw_pci_queue_init()
1259 mem_item->size, &mem_item->mapaddr, in mlxsw_pci_queue_init()
1261 if (!mem_item->buf) in mlxsw_pci_queue_init()
1290 dma_free_coherent(&mlxsw_pci->pdev->dev, mem_item->size, in mlxsw_pci_queue_init()
1291 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_init()
1299 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_fini() local
1303 dma_free_coherent(&mlxsw_pci->pdev->dev, mem_item->size, in mlxsw_pci_queue_fini()
1304 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_fini()
1662 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_init() local
1667 mlxsw_pci->fw_area.items = kcalloc(num_pages, sizeof(*mem_item), in mlxsw_pci_fw_area_init()
1675 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1677 mem_item->size = MLXSW_PCI_PAGE_SIZE; in mlxsw_pci_fw_area_init()
1678 mem_item->buf = dma_alloc_coherent(&mlxsw_pci->pdev->dev, in mlxsw_pci_fw_area_init()
1679 mem_item->size, in mlxsw_pci_fw_area_init()
1680 &mem_item->mapaddr, GFP_KERNEL); in mlxsw_pci_fw_area_init()
1681 if (!mem_item->buf) { in mlxsw_pci_fw_area_init()
1685 mlxsw_cmd_mbox_map_fa_pa_set(mbox, nent, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1707 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1709 dma_free_coherent(&mlxsw_pci->pdev->dev, mem_item->size, in mlxsw_pci_fw_area_init()
1710 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1718 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_fini() local
1724 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_fini()
1726 dma_free_coherent(&mlxsw_pci->pdev->dev, mem_item->size, in mlxsw_pci_fw_area_fini()
1727 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_fini()