Lines Matching refs:oct

72 void octeon_pf_changed_vf_macaddr(struct octeon_device *oct, u8 *mac);
74 void octeon_schedule_rxq_oom_work(struct octeon_device *oct,
92 static inline void octeon_unmap_pci_barx(struct octeon_device *oct, int baridx) in octeon_unmap_pci_barx() argument
94 dev_dbg(&oct->pci_dev->dev, "Freeing PCI mapped regions for Bar%d\n", in octeon_unmap_pci_barx()
97 if (oct->mmio[baridx].done) in octeon_unmap_pci_barx()
98 iounmap(oct->mmio[baridx].hw_addr); in octeon_unmap_pci_barx()
100 if (oct->mmio[baridx].start) in octeon_unmap_pci_barx()
101 pci_release_region(oct->pci_dev, baridx * 2); in octeon_unmap_pci_barx()
110 static inline int octeon_map_pci_barx(struct octeon_device *oct, in octeon_map_pci_barx() argument
115 if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) { in octeon_map_pci_barx()
116 dev_err(&oct->pci_dev->dev, "pci_request_region failed for bar %d\n", in octeon_map_pci_barx()
121 oct->mmio[baridx].start = pci_resource_start(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
122 oct->mmio[baridx].len = pci_resource_len(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()
124 mapped_len = oct->mmio[baridx].len; in octeon_map_pci_barx()
131 oct->mmio[baridx].hw_addr = in octeon_map_pci_barx()
132 ioremap(oct->mmio[baridx].start, mapped_len); in octeon_map_pci_barx()
133 oct->mmio[baridx].mapped_len = mapped_len; in octeon_map_pci_barx()
135 dev_dbg(&oct->pci_dev->dev, "BAR%d start: 0x%llx mapped %u of %u bytes\n", in octeon_map_pci_barx()
136 baridx, oct->mmio[baridx].start, mapped_len, in octeon_map_pci_barx()
137 oct->mmio[baridx].len); in octeon_map_pci_barx()
139 if (!oct->mmio[baridx].hw_addr) { in octeon_map_pci_barx()
140 dev_err(&oct->pci_dev->dev, "error ioremap for bar %d\n", in octeon_map_pci_barx()
144 oct->mmio[baridx].done = 1; in octeon_map_pci_barx()
149 pci_release_region(oct->pci_dev, baridx * 2); in octeon_map_pci_barx()