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()
825 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_init() local
844 mem_item->size = MLXSW_PCI_AQ_SIZE; in mlxsw_pci_queue_init()
845 mem_item->buf = pci_alloc_consistent(mlxsw_pci->pdev, in mlxsw_pci_queue_init()
846 mem_item->size, in mlxsw_pci_queue_init()
847 &mem_item->mapaddr); in mlxsw_pci_queue_init()
848 if (!mem_item->buf) in mlxsw_pci_queue_init()
877 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_queue_init()
878 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_init()
886 struct mlxsw_pci_mem_item *mem_item = &q->mem_item; in mlxsw_pci_queue_fini() local
890 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_queue_fini()
891 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_queue_fini()
1212 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_init() local
1217 mlxsw_pci->fw_area.items = kcalloc(num_pages, sizeof(*mem_item), in mlxsw_pci_fw_area_init()
1225 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1227 mem_item->size = MLXSW_PCI_PAGE_SIZE; in mlxsw_pci_fw_area_init()
1228 mem_item->buf = pci_alloc_consistent(mlxsw_pci->pdev, in mlxsw_pci_fw_area_init()
1229 mem_item->size, in mlxsw_pci_fw_area_init()
1230 &mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1231 if (!mem_item->buf) { in mlxsw_pci_fw_area_init()
1235 mlxsw_cmd_mbox_map_fa_pa_set(mbox, nent, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1257 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_init()
1259 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_fw_area_init()
1260 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_init()
1268 struct mlxsw_pci_mem_item *mem_item; in mlxsw_pci_fw_area_fini() local
1274 mem_item = &mlxsw_pci->fw_area.items[i]; in mlxsw_pci_fw_area_fini()
1276 pci_free_consistent(mlxsw_pci->pdev, mem_item->size, in mlxsw_pci_fw_area_fini()
1277 mem_item->buf, mem_item->mapaddr); in mlxsw_pci_fw_area_fini()