Home
last modified time | relevance | path

Searched refs:devfn (Results 1 – 25 of 122) sorted by relevance

12345

/linux-4.19.296/drivers/pci/hotplug/
Dcpci_hotplug_pci.c41 slot->devfn, in cpci_get_attention_status()
47 slot->devfn, in cpci_get_attention_status()
61 slot->devfn, in cpci_set_attention_status()
66 slot->devfn, in cpci_set_attention_status()
75 slot->devfn, in cpci_set_attention_status()
88 slot->devfn, in cpci_get_hs_csr()
93 slot->devfn, in cpci_get_hs_csr()
107 slot->devfn, in cpci_check_and_clear_ins()
112 slot->devfn, in cpci_check_and_clear_ins()
119 slot->devfn, in cpci_check_and_clear_ins()
[all …]
Dibmphp_pci.c93 unsigned int devfn = PCI_DEVFN(device, function); in ibmphp_configure_card() local
101 pci_bus_read_config_word(ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); in ibmphp_configure_card()
115 pci_bus_read_config_byte(ibmphp_pci_bus, devfn, PCI_HEADER_TYPE, &hdr_type); in ibmphp_configure_card()
116 pci_bus_read_config_dword(ibmphp_pci_bus, devfn, PCI_CLASS_REVISION, &class); in ibmphp_configure_card()
188 pci_bus_read_config_byte(ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card()
258 pci_bus_read_config_byte(ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card()
349 unsigned int devfn; in configure_device() local
353 devfn = PCI_DEVFN(func->device, func->function); in configure_device()
371 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], 0xFFFFFFFF); in configure_device()
372 pci_bus_read_config_dword(ibmphp_pci_bus, devfn, address[count], &bar[count]); in configure_device()
[all …]
Dcpqphp_pci.c135 static int PCI_RefinedAccessConfig(struct pci_bus *bus, unsigned int devfn, u8 offset, u32 *value) in PCI_RefinedAccessConfig() argument
139 if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &vendID) == -1) in PCI_RefinedAccessConfig()
143 return pci_bus_read_config_dword(bus, devfn, offset, value); in PCI_RefinedAccessConfig()
171 fakedev->devfn = dev_num << 3; in cpqhp_set_irq()
246 tdevice = cpqhp_routing_table->slots[loop].devfn; in PCI_GetBusDevHelper()
315 u16 devfn; in cpqhp_save_config() local
413 devfn = (new_slot->device << 3) | new_slot->function; in cpqhp_save_config()
415 new_slot->bus, devfn); in cpqhp_save_config()
561 unsigned int devfn; in cpqhp_save_base_addr_length() local
567 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_save_base_addr_length()
[all …]
Dcpqphp_ctrl.c2073 unsigned int devfn; in cpqhp_process_SS() local
2087 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_process_SS()
2090 rc = pci_bus_read_config_byte(pci_bus, devfn, 0x0B, &class_code); in cpqhp_process_SS()
2099 rc = pci_bus_read_config_byte(pci_bus, devfn, PCI_HEADER_TYPE, &header_type); in cpqhp_process_SS()
2105 rc = pci_bus_read_config_byte(pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR); in cpqhp_process_SS()
2367 unsigned int devfn; in configure_new_function() local
2383 devfn = PCI_DEVFN(func->device, func->function); in configure_new_function()
2386 rc = pci_bus_read_config_byte(pci_bus, devfn, PCI_HEADER_TYPE, &temp_byte); in configure_new_function()
2393 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_PRIMARY_BUS, func->bus); in configure_new_function()
2408 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_SECONDARY_BUS, temp_byte); in configure_new_function()
[all …]
/linux-4.19.296/drivers/pci/controller/
Dpci-thunder-ecam.c30 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar() argument
43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
58 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
74 addr = bus->ops->map_bus(bus, devfn, bar + 4); /* BAR 1 */ in handle_ea_bar()
86 static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_p2_config_read() argument
103 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_ecam_p2_config_read()
106 addr = bus->ops->map_bus(bus, devfn, where_a); in thunder_ecam_p2_config_read()
127 static int thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_config_read() argument
137 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
148 addr = bus->ops->map_bus(bus, devfn, 8); in thunder_ecam_config_read()
[all …]
Dpcie-altera.c50 #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn)) argument
61 #define TLP_CFG_DW2(bus, devfn, offset) \ argument
62 (((bus) << 24) | ((devfn) << 16) | (offset))
113 static bool altera_pcie_hide_rc_bar(struct pci_bus *bus, unsigned int devfn, in altera_pcie_hide_rc_bar() argument
116 if (pci_is_root_bus(bus) && (devfn == 0) && in altera_pcie_hide_rc_bar()
213 static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_read() argument
220 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_read()
227 static int tlp_cfg_dword_write(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_write() argument
235 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_write()
258 unsigned int devfn, int where, int size, in _altera_pcie_cfg_read() argument
[all …]
Dpci-host-generic.c27 static bool pci_dw_valid_device(struct pci_bus *bus, unsigned int devfn) in pci_dw_valid_device() argument
37 if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0) in pci_dw_valid_device()
44 unsigned int devfn, int where) in pci_dw_ecam_map_bus() argument
46 if (!pci_dw_valid_device(bus, devfn)) in pci_dw_ecam_map_bus()
49 return pci_ecam_map_bus(bus, devfn, where); in pci_dw_ecam_map_bus()
Dpci-thunder-pem.c27 static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn, in thunder_pem_bridge_read() argument
34 if (devfn != 0 || where >= 2048) { in thunder_pem_bridge_read()
129 static int thunder_pem_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_pem_config_read() argument
143 return thunder_pem_bridge_read(bus, devfn, where, size, val); in thunder_pem_config_read()
145 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_pem_config_read()
205 static int thunder_pem_bridge_write(struct pci_bus *bus, unsigned int devfn, in thunder_pem_bridge_write() argument
215 if (devfn != 0 || where >= 2048) in thunder_pem_bridge_write()
278 static int thunder_pem_config_write(struct pci_bus *bus, unsigned int devfn, in thunder_pem_config_write() argument
291 return thunder_pem_bridge_write(bus, devfn, where, size, val); in thunder_pem_config_write()
294 return pci_generic_config_write(bus, devfn, where, size, val); in thunder_pem_config_write()
Dpci-mvebu.c49 #define PCIE_CONF_ADDR(bus, devfn, where) \ argument
50 (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \
51 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where) | \
148 int devfn; member
284 u32 devfn, int where, int size, u32 *val) in mvebu_pcie_hw_rd_conf() argument
288 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_rd_conf()
308 u32 devfn, int where, int size, u32 val) in mvebu_pcie_hw_wr_conf() argument
312 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_wr_conf()
782 int devfn) in mvebu_pcie_find_port() argument
789 if (bus->number == 0 && port->devfn == devfn) in mvebu_pcie_find_port()
[all …]
/linux-4.19.296/drivers/xen/
Dpci.c64 .add.devfn = pci_dev->devfn in xen_add_device()
76 add->physfn.devfn = physfn->devfn; in xen_add_device()
79 if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) in xen_add_device()
130 .devfn = pci_dev->devfn, in xen_add_device()
133 .physfn.devfn = physfn->devfn, in xen_add_device()
140 else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) { in xen_add_device()
143 .devfn = pci_dev->devfn, in xen_add_device()
152 .devfn = pci_dev->devfn, in xen_add_device()
171 .devfn = pci_dev->devfn in xen_remove_device()
181 .devfn = pci_dev->devfn in xen_remove_device()
/linux-4.19.296/drivers/xen/xen-pciback/
Dvpci.c33 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument
42 if (PCI_SLOT(devfn) < PCI_SLOT_MAX) { in __xen_pcibk_get_pci_dev()
46 &vpci_dev->dev_list[PCI_SLOT(devfn)], in __xen_pcibk_get_pci_dev()
48 if (PCI_FUNC(entry->dev->devfn) == PCI_FUNC(devfn)) { in __xen_pcibk_get_pci_dev()
62 && l->bus == r->bus && PCI_SLOT(l->devfn) == PCI_SLOT(r->devfn)) in match_slot()
72 int err = 0, slot, func = PCI_FUNC(dev->devfn); in __xen_pcibk_add_pci_dev()
108 if (t->dev->is_virtfn && !PCI_FUNC(t->dev->devfn)) in __xen_pcibk_add_pci_dev()
235 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument
251 && dev->devfn == pcidev->devfn) { in __xen_pcibk_get_pcifront_dev()
255 *devfn = PCI_DEVFN(slot, in __xen_pcibk_get_pcifront_dev()
[all …]
Dpassthrough.c23 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument
34 && devfn == dev_entry->dev->devfn) { in __xen_pcibk_get_pci_dev()
51 unsigned int domain, bus, devfn; in __xen_pcibk_add_pci_dev() local
66 devfn = dev->devfn; in __xen_pcibk_add_pci_dev()
67 err = publish_cb(pdev, domain, bus, devfn, devid); in __xen_pcibk_add_pci_dev()
180 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument
184 *devfn = pcidev->devfn; in __xen_pcibk_get_pcifront_dev()
Dpci_stub.c42 unsigned int devfn; member
119 .devfn = dev->devfn in pcistub_device_release()
164 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_device_find_locked()
165 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_device_find_locked()
326 && dev->devfn == pdev_id->devfn) in pcistub_match_one()
404 .devfn = dev->devfn in pcistub_init_device()
485 int domain, int bus, unsigned int devfn) in pcistub_device_id_add_list() argument
495 pci_dev_id->devfn == devfn) { in pcistub_device_id_add_list()
504 new->devfn = devfn; in pcistub_device_id_add_list()
551 dev->bus->number, dev->devfn); in pcistub_seize()
[all …]
Dpciback.h90 unsigned int devfn, unsigned int devid);
104 unsigned int *devfn);
112 unsigned int devfn);
138 unsigned int bus, unsigned int devfn) in xen_pcibk_get_pci_dev() argument
141 return xen_pcibk_backend->get(pdev, domain, bus, devfn); in xen_pcibk_get_pci_dev()
155 unsigned int *devfn) in xen_pcibk_get_pcifront_dev() argument
159 devfn); in xen_pcibk_get_pcifront_dev()
/linux-4.19.296/drivers/pci/
Daccess.c37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
44 res = bus->ops->read(bus, devfn, pos, len, &data); \
52 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \
58 res = bus->ops->write(bus, devfn, pos, len, value); \
77 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read() argument
82 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_read()
99 int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_write() argument
104 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_write()
119 int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read32() argument
124 addr = bus->ops->map_bus(bus, devfn, where & ~0x3); in pci_generic_config_read32()
[all …]
Dsearch.c36 ret = fn(pdev, PCI_DEVID(pdev->bus->number, pdev->devfn), data); in pci_for_each_dma_alias()
45 u8 devfn; in pci_for_each_dma_alias() local
47 for_each_set_bit(devfn, pdev->dma_alias_mask, U8_MAX) { in pci_for_each_dma_alias()
48 ret = fn(pdev, PCI_DEVID(pdev->bus->number, devfn), in pci_for_each_dma_alias()
93 tmp->devfn), data); in pci_for_each_dma_alias()
106 tmp->devfn), data); in pci_for_each_dma_alias()
194 struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn) in pci_get_slot() argument
202 if (dev->devfn == devfn) in pci_get_slot()
230 unsigned int devfn) in pci_get_domain_bus_and_slot() argument
236 (dev->bus->number == bus && dev->devfn == devfn)) in pci_get_domain_bus_and_slot()
Dxen-pcifront.c178 static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_read() argument
186 .devfn = devfn, in pcifront_bus_read()
196 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pcifront_bus_read()
197 PCI_FUNC(devfn), where, size); in pcifront_bus_read()
217 static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_write() argument
224 .devfn = devfn, in pcifront_bus_write()
237 PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); in pcifront_bus_write()
257 .devfn = dev->devfn, in pci_frontend_enable_msix()
311 .devfn = dev->devfn, in pci_frontend_disable_msix()
330 .devfn = dev->devfn, in pci_frontend_enable_msi()
[all …]
Dof.c23 dev->devfn); in pci_set_of_node()
94 int devfn; in __of_pci_pci_compare() local
96 devfn = of_pci_get_devfn(node); in __of_pci_pci_compare()
97 if (devfn < 0) in __of_pci_pci_compare()
100 return devfn == data; in __of_pci_pci_compare()
104 unsigned int devfn) in of_pci_find_child_device() argument
109 if (__of_pci_pci_compare(node, devfn)) in of_pci_find_child_device()
118 if (__of_pci_pci_compare(node2, devfn)) { in of_pci_find_child_device()
547 laddr[0] = cpu_to_be32((pdev->bus->number << 16) | (pdev->devfn << 8)); in of_irq_parse_pci()
/linux-4.19.296/include/xen/interface/
Dphysdev.h148 int devfn; member
172 uint8_t devfn; member
179 uint8_t devfn; member
186 uint8_t devfn; member
191 uint8_t devfn; member
256 uint8_t devfn; member
260 uint8_t devfn; member
281 uint8_t devfn; member
/linux-4.19.296/include/uapi/linux/
Dpci.h32 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) argument
33 #define PCI_FUNC(devfn) ((devfn) & 0x07) argument
/linux-4.19.296/drivers/pci/pcie/
Daer_inject.c48 unsigned int devfn; member
75 unsigned int bus, unsigned int devfn, in aer_error_init() argument
81 err->devfn = devfn; in aer_error_init()
87 unsigned int devfn) in __find_aer_error() argument
94 devfn == err->devfn) in __find_aer_error()
106 return __find_aer_error(domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev()
178 static int aer_inj_read_config(struct pci_bus *bus, unsigned int devfn, in aer_inj_read_config() argument
195 err = __find_aer_error(domain, bus->number, devfn); in aer_inj_read_config()
216 rv = ops->read(bus, devfn, where, size, val); in aer_inj_read_config()
222 static int aer_inj_write_config(struct pci_bus *bus, unsigned int devfn, in aer_inj_write_config() argument
[all …]
Dpme.c99 static bool pcie_pme_from_pci_bridge(struct pci_bus *bus, u8 devfn) in pcie_pme_from_pci_bridge() argument
104 if (devfn) in pcie_pme_from_pci_bridge()
129 u8 busnr = req_id >> 8, devfn = req_id & 0xff; in pcie_pme_handle_request() local
135 if (port->devfn == devfn && port->bus->number == busnr) { in pcie_pme_handle_request()
164 found = pcie_pme_from_pci_bridge(bus, devfn); in pcie_pme_handle_request()
172 if (dev->devfn == devfn) { in pcie_pme_handle_request()
191 } else if (devfn) { in pcie_pme_handle_request()
198 busnr, PCI_SLOT(devfn), PCI_FUNC(devfn)); in pcie_pme_handle_request()
/linux-4.19.296/drivers/misc/cxl/
Dvphb.c97 static int cxl_pcie_cfg_record(u8 bus, u8 devfn) in cxl_pcie_cfg_record() argument
99 return (bus << 8) + devfn; in cxl_pcie_cfg_record()
119 static inline int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument
124 record = cxl_pcie_cfg_record(bus->number, devfn); in cxl_pcie_config_info()
132 static int cxl_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_read_config() argument
146 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_read_config()
172 static int cxl_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_write_config() argument
183 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_write_config()
331 return cxl_pcie_cfg_record(dev->bus->number, dev->devfn); in cxl_pci_to_cfg_record()
/linux-4.19.296/drivers/edac/
Damd8131_edac.c71 .devfn = DEVFN_PCIX_BRIDGE_NORTH_A,
76 .devfn = DEVFN_PCIX_BRIDGE_NORTH_B,
81 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_A,
86 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_B,
254 if (dev_info->devfn == dev->devfn) in amd8131_probe()
271 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
307 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
318 if (dev_info->devfn == dev->devfn) in amd8131_remove()
/linux-4.19.296/drivers/pci/controller/dwc/
Dpcie-hisi.c26 static int hisi_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in hisi_pcie_rd_conf() argument
30 int dev = PCI_SLOT(devfn); in hisi_pcie_rd_conf()
37 return pci_generic_config_read32(bus, devfn, where, in hisi_pcie_rd_conf()
41 return pci_generic_config_read(bus, devfn, where, size, val); in hisi_pcie_rd_conf()
44 static int hisi_pcie_wr_conf(struct pci_bus *bus, u32 devfn, in hisi_pcie_wr_conf() argument
48 int dev = PCI_SLOT(devfn); in hisi_pcie_wr_conf()
55 return pci_generic_config_write32(bus, devfn, where, in hisi_pcie_wr_conf()
59 return pci_generic_config_write(bus, devfn, where, size, val); in hisi_pcie_wr_conf()
62 static void __iomem *hisi_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, in hisi_pcie_map_bus() argument
71 return pci_ecam_map_bus(bus, devfn, where); in hisi_pcie_map_bus()

12345