Home
last modified time | relevance | path

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

1234567891011

/drivers/pci/hotplug/
Dcpci_hotplug_pci.c55 slot->devfn, in cpci_get_attention_status()
61 slot->devfn, in cpci_get_attention_status()
75 slot->devfn, in cpci_set_attention_status()
80 slot->devfn, in cpci_set_attention_status()
89 slot->devfn, in cpci_set_attention_status()
102 slot->devfn, in cpci_get_hs_csr()
107 slot->devfn, in cpci_get_hs_csr()
121 slot->devfn, in cpci_check_and_clear_ins()
126 slot->devfn, in cpci_check_and_clear_ins()
133 slot->devfn, in cpci_check_and_clear_ins()
[all …]
Dibmphp_pci.c107 unsigned int devfn = PCI_DEVFN(device, function); in ibmphp_configure_card() local
115 pci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); in ibmphp_configure_card()
129 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_HEADER_TYPE, &hdr_type); in ibmphp_configure_card()
130 pci_bus_read_config_dword (ibmphp_pci_bus, devfn, PCI_CLASS_REVISION, &class); in ibmphp_configure_card()
203 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card()
275 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card()
367 unsigned int devfn; in configure_device() local
371 devfn = PCI_DEVFN(func->device, func->function); in configure_device()
389 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], 0xFFFFFFFF); in configure_device()
390 pci_bus_read_config_dword (ibmphp_pci_bus, devfn, address[count], &bar[count]); in configure_device()
[all …]
Dcpqphp_pci.c142 static int PCI_RefinedAccessConfig(struct pci_bus *bus, unsigned int devfn, u8 offset, u32 *value) in PCI_RefinedAccessConfig() argument
146 if (pci_bus_read_config_dword (bus, devfn, PCI_VENDOR_ID, &vendID) == -1) in PCI_RefinedAccessConfig()
150 return pci_bus_read_config_dword (bus, devfn, offset, value); in PCI_RefinedAccessConfig()
178 fakedev->devfn = dev_num << 3; in cpqhp_set_irq()
253 tdevice = cpqhp_routing_table->slots[loop].devfn; in PCI_GetBusDevHelper()
565 unsigned int devfn; in cpqhp_save_base_addr_length() local
571 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_save_base_addr_length()
574 pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type); in cpqhp_save_base_addr_length()
577 pci_bus_read_config_byte (pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus); in cpqhp_save_base_addr_length()
598 pci_bus_write_config_dword (pci_bus, devfn, cloop, temp_register); in cpqhp_save_base_addr_length()
[all …]
Dcpqphp_ctrl.c2086 unsigned int devfn; in cpqhp_process_SS() local
2100 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_process_SS()
2103 rc = pci_bus_read_config_byte (pci_bus, devfn, 0x0B, &class_code); in cpqhp_process_SS()
2112 rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type); in cpqhp_process_SS()
2118 rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR); in cpqhp_process_SS()
2380 unsigned int devfn; in configure_new_function() local
2396 devfn = PCI_DEVFN(func->device, func->function); in configure_new_function()
2399 rc = pci_bus_read_config_byte(pci_bus, devfn, PCI_HEADER_TYPE, &temp_byte); in configure_new_function()
2406 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_PRIMARY_BUS, func->bus); in configure_new_function()
2421 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_SECONDARY_BUS, temp_byte); in configure_new_function()
[all …]
/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()
/drivers/pci/host/
Dpcie-altera.c57 #define TLP_CFG_DW2(bus, devfn, offset) \ argument
58 (((bus) << 24) | ((devfn) << 16) | (offset))
59 #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn)) argument
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()
220 static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_read() argument
232 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_read()
239 static int tlp_cfg_dword_write(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_write() argument
252 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_write()
275 unsigned int devfn, int where, int size, in _altera_pcie_cfg_read() argument
[all …]
Dpci-mvebu.c48 #define PCIE_CONF_ADDR(bus, devfn, where) \ argument
49 (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \
50 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where) | \
146 int devfn; member
282 u32 devfn, int where, int size, u32 *val) in mvebu_pcie_hw_rd_conf() argument
286 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_rd_conf()
306 u32 devfn, int where, int size, u32 val) in mvebu_pcie_hw_wr_conf() argument
310 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_wr_conf()
779 int devfn) in mvebu_pcie_find_port() argument
786 if (bus->number == 0 && port->devfn == devfn) in mvebu_pcie_find_port()
[all …]
Dpcie-designware.c567 u32 devfn, int where, int size, u32 *val) in dw_pcie_rd_other_conf() argument
574 busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | in dw_pcie_rd_other_conf()
575 PCIE_ATU_FUNC(PCI_FUNC(devfn)); in dw_pcie_rd_other_conf()
601 u32 devfn, int where, int size, u32 val) in dw_pcie_wr_other_conf() argument
608 busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | in dw_pcie_wr_other_conf()
609 PCIE_ATU_FUNC(PCI_FUNC(devfn)); in dw_pcie_wr_other_conf()
657 static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in dw_pcie_rd_conf() argument
663 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) { in dw_pcie_rd_conf()
670 ret = pp->ops->rd_other_conf(pp, bus, devfn, in dw_pcie_rd_conf()
673 ret = dw_pcie_rd_other_conf(pp, bus, devfn, in dw_pcie_rd_conf()
[all …]
/drivers/xen/xen-pciback/
Dvpci.c32 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument
41 if (PCI_SLOT(devfn) < PCI_SLOT_MAX) { in __xen_pcibk_get_pci_dev()
45 &vpci_dev->dev_list[PCI_SLOT(devfn)], in __xen_pcibk_get_pci_dev()
47 if (PCI_FUNC(entry->dev->devfn) == PCI_FUNC(devfn)) { in __xen_pcibk_get_pci_dev()
61 && l->bus == r->bus && PCI_SLOT(l->devfn) == PCI_SLOT(r->devfn)) in match_slot()
71 int err = 0, slot, func = PCI_FUNC(dev->devfn); in __xen_pcibk_add_pci_dev()
107 if (t->dev->is_virtfn && !PCI_FUNC(t->dev->devfn)) in __xen_pcibk_add_pci_dev()
234 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument
250 && dev->devfn == pcidev->devfn) { in __xen_pcibk_get_pcifront_dev()
254 *devfn = PCI_DEVFN(slot, in __xen_pcibk_get_pcifront_dev()
[all …]
Dpassthrough.c22 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument
33 && devfn == dev_entry->dev->devfn) { in __xen_pcibk_get_pci_dev()
50 unsigned int domain, bus, devfn; in __xen_pcibk_add_pci_dev() local
65 devfn = dev->devfn; in __xen_pcibk_add_pci_dev()
66 err = publish_cb(pdev, domain, bus, devfn, devid); in __xen_pcibk_add_pci_dev()
179 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument
183 *devfn = pcidev->devfn; in __xen_pcibk_get_pcifront_dev()
Dpci_stub.c40 unsigned int devfn; member
117 .devfn = dev->devfn in pcistub_device_release()
165 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_device_find()
166 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_device_find()
215 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_get_pci_dev_by_slot()
216 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_get_pci_dev_by_slot()
324 && dev->devfn == pdev_id->devfn) in pcistub_match_one()
402 .devfn = dev->devfn in pcistub_init_device()
658 &aer_op->domain, &aer_op->bus, &aer_op->devfn); in common_process()
668 aer_cmd, aer_op->domain, aer_op->bus, aer_op->devfn); in common_process()
[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()
/drivers/pci/pcie/aer/
Daer_inject.c51 unsigned int devfn; member
78 unsigned int bus, unsigned int devfn, in aer_error_init() argument
84 err->devfn = devfn; in aer_error_init()
90 unsigned int devfn) in __find_aer_error() argument
97 devfn == err->devfn) in __find_aer_error()
109 return __find_aer_error((u16)domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev()
184 static int pci_read_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_read_aer() argument
199 err = __find_aer_error((u16)domain, bus->number, devfn); in pci_read_aer()
212 return ops->read(bus, devfn, where, size, val); in pci_read_aer()
215 static int pci_write_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_write_aer() argument
[all …]
/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()
103 u8 bus, u8 devfn, int offset) in cxl_pcie_cfg_addr() argument
105 int record = cxl_pcie_cfg_record(bus, devfn); in cxl_pcie_cfg_addr()
111 static int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument
125 if (cxl_pcie_cfg_record(bus->number, devfn) > afu->crs_num) in cxl_pcie_config_info()
129 addr = cxl_pcie_cfg_addr(phb, bus->number, devfn, offset); in cxl_pcie_config_info()
167 static int cxl_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_read_config() argument
174 rc = cxl_pcie_config_info(bus, devfn, offset, len, &ioaddr, in cxl_pcie_read_config()
187 static int cxl_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_write_config() argument
[all …]
/drivers/pci/
Dxen-pcifront.c177 static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_read() argument
185 .devfn = devfn, in pcifront_bus_read()
195 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pcifront_bus_read()
196 PCI_FUNC(devfn), where, size); in pcifront_bus_read()
216 static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_write() argument
223 .devfn = devfn, in pcifront_bus_write()
236 PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); in pcifront_bus_write()
256 .devfn = dev->devfn, in pci_frontend_enable_msix()
310 .devfn = dev->devfn, in pci_frontend_disable_msix()
329 .devfn = dev->devfn, in pci_frontend_enable_msi()
[all …]
Dsearch.c35 ret = fn(pdev, PCI_DEVID(pdev->bus->number, pdev->devfn), data); in pci_for_each_dma_alias()
84 tmp->devfn), data); in pci_for_each_dma_alias()
97 tmp->devfn), data); in pci_for_each_dma_alias()
185 struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn) in pci_get_slot() argument
193 if (dev->devfn == devfn) in pci_get_slot()
221 unsigned int devfn) in pci_get_domain_bus_and_slot() argument
227 (dev->bus->number == bus && dev->devfn == devfn)) in pci_get_domain_bus_and_slot()
Daccess.c30 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
37 res = bus->ops->read(bus, devfn, pos, len, &data); \
45 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \
51 res = bus->ops->write(bus, devfn, pos, len, value); \
70 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read() argument
75 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_read()
92 int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_write() argument
97 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_write()
112 int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read32() argument
117 addr = bus->ops->map_bus(bus, devfn, where & ~0x3); in pci_generic_config_read32()
[all …]
/drivers/pci/pcie/
Dpme.c110 static bool pcie_pme_from_pci_bridge(struct pci_bus *bus, u8 devfn) in pcie_pme_from_pci_bridge() argument
115 if (devfn) in pcie_pme_from_pci_bridge()
140 u8 busnr = req_id >> 8, devfn = req_id & 0xff; in pcie_pme_handle_request() local
146 if (port->devfn == devfn && port->bus->number == busnr) { in pcie_pme_handle_request()
175 found = pcie_pme_from_pci_bridge(bus, devfn); in pcie_pme_handle_request()
183 if (dev->devfn == devfn) { in pcie_pme_handle_request()
202 } else if (devfn) { in pcie_pme_handle_request()
209 busnr, PCI_SLOT(devfn), PCI_FUNC(devfn)); in pcie_pme_handle_request()
/drivers/edac/
Damd8131_edac.c72 .devfn = DEVFN_PCIX_BRIDGE_NORTH_A,
77 .devfn = DEVFN_PCIX_BRIDGE_NORTH_B,
82 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_A,
87 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_B,
255 if (dev_info->devfn == dev->devfn) in amd8131_probe()
272 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
308 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
319 if (dev_info->devfn == dev->devfn) in amd8131_remove()
/drivers/of/
Dof_pci.c13 int devfn; in __of_pci_pci_compare() local
15 devfn = of_pci_get_devfn(node); in __of_pci_pci_compare()
16 if (devfn < 0) in __of_pci_pci_compare()
19 return devfn == data; in __of_pci_pci_compare()
23 unsigned int devfn) in of_pci_find_child_device() argument
28 if (__of_pci_pci_compare(node, devfn)) in of_pci_find_child_device()
37 if (__of_pci_pci_compare(node2, devfn)) { in of_pci_find_child_device()
/drivers/iommu/
Dintel-iommu.c421 u8 devfn; /* PCI devfn number */ member
838 u8 bus, u8 devfn, int alloc) in iommu_context_addr() argument
846 if (devfn >= 0x80) { in iommu_context_addr()
847 devfn -= 0x80; in iommu_context_addr()
850 devfn *= 2; in iommu_context_addr()
868 return &context[devfn]; in iommu_context_addr()
876 static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn) in device_to_iommu() argument
916 *devfn = drhd->devices[i].devfn; in device_to_iommu()
933 *devfn = pdev->devfn; in device_to_iommu()
951 static int device_context_mapped(struct intel_iommu *iommu, u8 bus, u8 devfn) in device_context_mapped() argument
[all …]
/drivers/hwmon/
Dfam15h_power.c71 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in show_power()
88 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in show_power()
153 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 3), in should_load_on_this_node()
184 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), in tweak_runavg_range()
192 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), in tweak_runavg_range()
217 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in fam15h_power_init_data()
/drivers/acpi/
Dreboot.c11 unsigned int devfn; in acpi_reboot() local
40 devfn = PCI_DEVFN((rr->address >> 32) & 0xffff, in acpi_reboot()
44 pci_bus_write_config_byte(bus0, devfn, in acpi_reboot()
/drivers/isdn/hardware/eicon/
Ddivasmain.c211 return ((byte) pdev->devfn); in diva_os_get_pci_func()
703 pdev->bus->number, pdev->devfn)) in divas_init_one()
706 pdev->bus->number, pdev->devfn); in divas_init_one()
713 pdev->devfn)) in divas_init_one()
719 pdev->devfn); in divas_init_one()
728 DRIVERLNAME, pdev->bus->number, pdev->devfn)) in divas_init_one()
731 DRIVERLNAME, pdev->bus->number, pdev->devfn); in divas_init_one()
740 pdev->devfn)) in divas_init_one()
746 pdev->devfn); in divas_init_one()
760 pdev->bus->number, pdev->devfn)) in divas_remove_one()
[all …]
/drivers/pcmcia/
Dti113x.h240 if(PCI_FUNC(socket->dev->devfn)==1) in ti1250_zoom_video()
487 func0 = pci_get_slot(socket->dev->bus, socket->dev->devfn & ~0x07); in ti12xx_align_irqs()
655 int devfn; in ti12xx_2nd_slot_empty() local
706 devfn = socket->dev->devfn & ~0x07; in ti12xx_2nd_slot_empty()
708 (socket->dev->devfn & 0x07) ? devfn : devfn | 0x01); in ti12xx_2nd_slot_empty()
789 if ((PCI_FUNC(socket->dev->devfn) == 0) || in ti12xx_power_hook()
848 if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { in ti12xx_override()
871 if (PCI_FUNC(socket->dev->devfn) == 0) in ti12xx_override()

1234567891011