Lines Matching refs:mem_item
73 struct mlxsw_pci_mem_item mem_item; member
139 return q->mem_item.buf + (elem_size * elem_index); in __mlxsw_pci_queue_elem_get()
281 return q->mem_item.mapaddr + MLXSW_PCI_PAGE_SIZE * page_index; in __mlxsw_pci_queue_page_get()
841 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_init() local
860 mem_item->size = MLXSW_PCI_AQ_SIZE; in mlxsw_pci_queue_init()
861 mem_item->buf = pci_alloc_consistent(mlxsw_pci->pdev, in mlxsw_pci_queue_init()
862 mem_item->size, in mlxsw_pci_queue_init()
863 &mem_item->mapaddr); in mlxsw_pci_queue_init()
864 if (!mem_item->buf) in mlxsw_pci_queue_init()
893 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_queue_init()
894 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_init()
902 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_fini() local
906 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_queue_fini()
907 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_fini()
1229 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_init() local
1234 mlxsw_pci->fw_area.items = kcalloc(num_pages, sizeof(*mem_item), in mlxsw_pci_fw_area_init()
1242 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1244 mem_item->size = MLXSW_PCI_PAGE_SIZE; in mlxsw_pci_fw_area_init()
1245 mem_item->buf = pci_alloc_consistent(mlxsw_pci->pdev, in mlxsw_pci_fw_area_init()
1246 mem_item->size, in mlxsw_pci_fw_area_init()
1247 &mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1248 if (!mem_item->buf) { in mlxsw_pci_fw_area_init()
1252 mlxsw_cmd_mbox_map_fa_pa_set(mbox, nent, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1274 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1276 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_fw_area_init()
1277 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1285 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_fini() local
1291 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_fini()
1293 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_fw_area_fini()
1294 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_fini()