/drivers/pci/hotplug/ |
D | cpci_hotplug_pci.c | 39 slot->devfn, in cpci_get_attention_status() 45 slot->devfn, in cpci_get_attention_status() 59 slot->devfn, in cpci_set_attention_status() 64 slot->devfn, in cpci_set_attention_status() 73 slot->devfn, in cpci_set_attention_status() 86 slot->devfn, in cpci_get_hs_csr() 91 slot->devfn, in cpci_get_hs_csr() 105 slot->devfn, in cpci_check_and_clear_ins() 110 slot->devfn, in cpci_check_and_clear_ins() 117 slot->devfn, in cpci_check_and_clear_ins() [all …]
|
D | ibmphp_pci.c | 93 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() 348 unsigned int devfn; in configure_device() local 352 devfn = PCI_DEVFN(func->device, func->function); in configure_device() 370 pci_bus_write_config_dword(ibmphp_pci_bus, devfn, address[count], 0xFFFFFFFF); in configure_device() 371 pci_bus_read_config_dword(ibmphp_pci_bus, devfn, address[count], &bar[count]); in configure_device() [all …]
|
D | cpqphp_pci.c | 135 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() 248 tdevice = cpqhp_routing_table->slots[loop].devfn; in PCI_GetBusDevHelper() 317 u16 devfn; in cpqhp_save_config() local 415 devfn = (new_slot->device << 3) | new_slot->function; in cpqhp_save_config() 417 new_slot->bus, devfn); in cpqhp_save_config() 563 unsigned int devfn; in cpqhp_save_base_addr_length() local 569 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_save_base_addr_length() [all …]
|
/drivers/pci/controller/ |
D | pci-thunder-ecam.c | 30 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() 57 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar() 72 addr = bus->ops->map_bus(bus, devfn, bar + 4); /* BAR 1 */ in handle_ea_bar() 83 static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_p2_config_read() argument 100 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_ecam_p2_config_read() 103 addr = bus->ops->map_bus(bus, devfn, where_a); in thunder_ecam_p2_config_read() 122 static int thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_config_read() argument 132 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read() 141 addr = bus->ops->map_bus(bus, devfn, 8); in thunder_ecam_config_read() [all …]
|
D | pcie-altera.c | 59 #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn)) argument 65 #define TLP_CFG_DW2(bus, devfn, offset) \ argument 66 (((bus) << 24) | ((devfn) << 16) | (offset)) 159 static bool altera_pcie_hide_rc_bar(struct pci_bus *bus, unsigned int devfn, in altera_pcie_hide_rc_bar() argument 162 if (pci_is_root_bus(bus) && (devfn == 0) && in altera_pcie_hide_rc_bar() 321 static void get_tlp_header(struct altera_pcie *pcie, u8 bus, u32 devfn, in get_tlp_header() argument 336 headers[2] = TLP_CFG_DW2(bus, devfn, where); in get_tlp_header() 339 static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_read() argument 344 get_tlp_header(pcie, bus, devfn, where, byte_en, true, in tlp_cfg_dword_read() 352 static int tlp_cfg_dword_write(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_write() argument [all …]
|
D | pci-host-generic.c | 26 static bool pci_dw_valid_device(struct pci_bus *bus, unsigned int devfn) in pci_dw_valid_device() argument 36 if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0) in pci_dw_valid_device() 43 unsigned int devfn, int where) in pci_dw_ecam_map_bus() argument 45 if (!pci_dw_valid_device(bus, devfn)) in pci_dw_ecam_map_bus() 48 return pci_ecam_map_bus(bus, devfn, where); in pci_dw_ecam_map_bus()
|
D | pci-loongson.c | 149 pdev->pin = 1 + (PCI_FUNC(pdev->devfn) & 3); in loongson_pci_pin_quirk() 178 unsigned int devfn, int where) in cfg0_map() argument 187 addroff |= (devfn << 8) | where; in cfg0_map() 192 unsigned int devfn, int where) in cfg1_map() argument 201 addroff |= (devfn << 8) | (where & 0xff) | ((where & 0xf00) << 16); in cfg1_map() 213 unsigned int devfn, int where) in pci_loongson_map_bus() argument 215 unsigned int device = PCI_SLOT(devfn); in pci_loongson_map_bus() 216 unsigned int function = PCI_FUNC(devfn); in pci_loongson_map_bus() 236 return cfg0_map(priv, bus, devfn, where); in pci_loongson_map_bus() 240 return cfg1_map(priv, bus, devfn, where); in pci_loongson_map_bus()
|
D | pci-thunder-pem.c | 37 static int thunder_pem_bridge_read(struct pci_bus *bus, unsigned int devfn, in thunder_pem_bridge_read() argument 44 if (devfn != 0 || where >= 2048) in thunder_pem_bridge_read() 137 static int thunder_pem_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_pem_config_read() argument 151 return thunder_pem_bridge_read(bus, devfn, where, size, val); in thunder_pem_config_read() 153 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_pem_config_read() 213 static int thunder_pem_bridge_write(struct pci_bus *bus, unsigned int devfn, in thunder_pem_bridge_write() argument 223 if (devfn != 0 || where >= 2048) in thunder_pem_bridge_write() 286 static int thunder_pem_config_write(struct pci_bus *bus, unsigned int devfn, in thunder_pem_config_write() argument 299 return thunder_pem_bridge_write(bus, devfn, where, size, val); in thunder_pem_config_write() 302 return pci_generic_config_write(bus, devfn, where, size, val); in thunder_pem_config_write()
|
D | pci-ixp4xx.c | 186 static u32 ixp4xx_config_addr(u8 bus_num, u16 devfn, int where) in ixp4xx_config_addr() argument 191 return BIT(32-PCI_SLOT(devfn)) | ((PCI_FUNC(devfn)) << 8) | in ixp4xx_config_addr() 195 return (bus_num << 16) | ((PCI_SLOT(devfn)) << 11) | in ixp4xx_config_addr() 196 ((PCI_FUNC(devfn)) << 8) | (where & ~3) | 1; in ixp4xx_config_addr() 292 static int ixp4xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, in ixp4xx_pci_read_config() argument 306 addr = ixp4xx_config_addr(bus_num, devfn, where); in ixp4xx_pci_read_config() 309 where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn), addr, cmd); in ixp4xx_pci_read_config() 339 static int ixp4xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, in ixp4xx_pci_write_config() argument 352 addr = ixp4xx_config_addr(bus_num, devfn, where); in ixp4xx_pci_write_config() 357 value, where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn), addr, cmd); in ixp4xx_pci_write_config()
|
/drivers/platform/x86/ |
D | p2sb.c | 44 static int p2sb_get_devfn(unsigned int *devfn) in p2sb_get_devfn() argument 53 *devfn = fn; in p2sb_get_devfn() 84 static void p2sb_scan_and_cache_devfn(struct pci_bus *bus, unsigned int devfn) in p2sb_scan_and_cache_devfn() argument 86 struct p2sb_res_cache *cache = &p2sb_resources[PCI_FUNC(devfn)]; in p2sb_scan_and_cache_devfn() 89 pdev = pci_scan_single_device(bus, devfn); in p2sb_scan_and_cache_devfn() 99 static int p2sb_scan_and_cache(struct pci_bus *bus, unsigned int devfn) in p2sb_scan_and_cache() argument 103 if (PCI_FUNC(devfn) == 0) { in p2sb_scan_and_cache() 109 slot = PCI_SLOT(devfn); in p2sb_scan_and_cache() 114 p2sb_scan_and_cache_devfn(bus, devfn); in p2sb_scan_and_cache() 117 if (!p2sb_valid_resource(&p2sb_resources[PCI_FUNC(devfn)].res)) in p2sb_scan_and_cache() [all …]
|
/drivers/xen/ |
D | pci.c | 53 .add.devfn = pci_dev->devfn in xen_add_device() 65 add->physfn.devfn = physfn->devfn; in xen_add_device() 68 if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) in xen_add_device() 119 .devfn = pci_dev->devfn, in xen_add_device() 122 .physfn.devfn = physfn->devfn, in xen_add_device() 129 else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) { in xen_add_device() 132 .devfn = pci_dev->devfn, in xen_add_device() 141 .devfn = pci_dev->devfn, in xen_add_device() 160 .devfn = pci_dev->devfn in xen_remove_device() 170 .devfn = pci_dev->devfn in xen_remove_device()
|
/drivers/pci/pcie/ |
D | aer_inject.c | 51 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(domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev() 181 static int aer_inj_read(struct pci_bus *bus, unsigned int devfn, int where, in aer_inj_read() argument 193 rv = ops->read(bus, devfn, where, size, val); in aer_inj_read() 199 static int aer_inj_write(struct pci_bus *bus, unsigned int devfn, int where, in aer_inj_write() argument 211 rv = ops->write(bus, devfn, where, size, val); in aer_inj_write() [all …]
|
D | pme.c | 101 static bool pcie_pme_from_pci_bridge(struct pci_bus *bus, u8 devfn) in pcie_pme_from_pci_bridge() argument 106 if (devfn) in pcie_pme_from_pci_bridge() 131 u8 busnr = req_id >> 8, devfn = req_id & 0xff; in pcie_pme_handle_request() local 137 if (port->devfn == devfn && port->bus->number == busnr) { in pcie_pme_handle_request() 166 found = pcie_pme_from_pci_bridge(bus, devfn); in pcie_pme_handle_request() 174 if (dev->devfn == devfn) { in pcie_pme_handle_request() 193 } else if (devfn) { in pcie_pme_handle_request() 200 busnr, PCI_SLOT(devfn), PCI_FUNC(devfn)); in pcie_pme_handle_request()
|
/drivers/usb/cdns3/ |
D | cdns3-pci-wrap.c | 20 int devfn; member 57 if (func->devfn == pdev->devfn) { in cdns3_get_second_fun() 63 if (func->devfn != PCI_DEV_FN_HOST_DEVICE && in cdns3_get_second_fun() 64 func->devfn != PCI_DEV_FN_OTG) { in cdns3_get_second_fun() 84 if (!id || (pdev->devfn != PCI_DEV_FN_HOST_DEVICE && in cdns3_pci_probe() 85 pdev->devfn != PCI_DEV_FN_OTG)) in cdns3_pci_probe() 112 if (pdev->devfn == PCI_DEV_FN_HOST_DEVICE) { in cdns3_pci_probe() 158 plat_info.id = pdev->devfn; in cdns3_pci_probe() 159 wrap->devfn = pdev->devfn; in cdns3_pci_probe() 185 if (wrap->devfn == pdev->devfn) in cdns3_pci_remove()
|
/drivers/pci/ |
D | access.c | 37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ 44 res = bus->ops->read(bus, devfn, pos, len, &data); \ 55 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \ 61 res = bus->ops->write(bus, devfn, pos, len, value); \ 80 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read() argument 85 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_read() 100 int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_write() argument 105 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_write() 120 int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read32() argument 125 addr = bus->ops->map_bus(bus, devfn, where & ~0x3); in pci_generic_config_read32() [all …]
|
D | xen-pcifront.c | 176 static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_read() argument 184 .devfn = devfn, in pcifront_bus_read() 193 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pcifront_bus_read() 194 PCI_FUNC(devfn), where, size); in pcifront_bus_read() 213 static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_write() argument 220 .devfn = devfn, in pcifront_bus_write() 231 PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); in pcifront_bus_write() 251 .devfn = dev->devfn, in pci_frontend_enable_msix() 304 .devfn = dev->devfn, in pci_frontend_disable_msix() 323 .devfn = dev->devfn, in pci_frontend_enable_msi() [all …]
|
D | search.c | 50 unsigned int devfn; in pci_for_each_dma_alias() local 52 for_each_set_bit(devfn, pdev->dma_alias_mask, MAX_NR_DEVFNS) { in pci_for_each_dma_alias() 53 ret = fn(pdev, PCI_DEVID(pdev->bus->number, devfn), 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 201 if (dev->devfn == devfn) in pci_get_slot() 229 unsigned int devfn) in pci_get_domain_bus_and_slot() argument 235 (dev->bus->number == bus && dev->devfn == devfn)) in pci_get_domain_bus_and_slot()
|
/drivers/pci/controller/dwc/ |
D | pcie-hisi.c | 25 static int hisi_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in hisi_pcie_rd_conf() argument 29 int dev = PCI_SLOT(devfn); in hisi_pcie_rd_conf() 36 return pci_generic_config_read32(bus, devfn, where, in hisi_pcie_rd_conf() 40 return pci_generic_config_read(bus, devfn, where, size, val); in hisi_pcie_rd_conf() 43 static int hisi_pcie_wr_conf(struct pci_bus *bus, u32 devfn, in hisi_pcie_wr_conf() argument 47 int dev = PCI_SLOT(devfn); in hisi_pcie_wr_conf() 54 return pci_generic_config_write32(bus, devfn, where, in hisi_pcie_wr_conf() 58 return pci_generic_config_write(bus, devfn, where, size, val); in hisi_pcie_wr_conf() 61 static void __iomem *hisi_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, in hisi_pcie_map_bus() argument 70 return pci_ecam_map_bus(bus, devfn, where); in hisi_pcie_map_bus()
|
/drivers/xen/xen-pciback/ |
D | vpci.c | 34 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument 43 if (PCI_SLOT(devfn) < PCI_SLOT_MAX) { in __xen_pcibk_get_pci_dev() 47 &vpci_dev->dev_list[PCI_SLOT(devfn)], in __xen_pcibk_get_pci_dev() 49 if (PCI_FUNC(entry->dev->devfn) == PCI_FUNC(devfn)) { in __xen_pcibk_get_pci_dev() 63 && l->bus == r->bus && PCI_SLOT(l->devfn) == PCI_SLOT(r->devfn)) in match_slot() 73 int err = 0, slot, func = PCI_FUNC(dev->devfn); in __xen_pcibk_add_pci_dev() 109 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 250 *devfn = PCI_DEVFN(slot, in __xen_pcibk_get_pcifront_dev() 251 PCI_FUNC(pcidev->devfn)); in __xen_pcibk_get_pcifront_dev()
|
D | passthrough.c | 23 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()
|
D | pci_stub.c | 44 unsigned int devfn; member 121 .devfn = dev->devfn in pcistub_device_release() 166 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_device_find_locked() 167 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_device_find_locked() 330 && dev->devfn == pdev_id->devfn) in pcistub_match_one() 408 .devfn = dev->devfn in pcistub_init_device() 489 int domain, int bus, unsigned int devfn) in pcistub_device_id_add_list() argument 499 pci_dev_id->devfn == devfn) { in pcistub_device_id_add_list() 508 new->devfn = devfn; in pcistub_device_id_add_list() 555 dev->bus->number, dev->devfn); in pcistub_seize() [all …]
|
D | pciback.h | 96 unsigned int devfn, unsigned int devid); 110 unsigned int *devfn); 118 unsigned int devfn); 144 unsigned int bus, unsigned int devfn) in xen_pcibk_get_pci_dev() argument 147 return xen_pcibk_backend->get(pdev, domain, bus, devfn); in xen_pcibk_get_pci_dev() 161 unsigned int *devfn) in xen_pcibk_get_pcifront_dev() argument 165 devfn); in xen_pcibk_get_pcifront_dev()
|
/drivers/misc/cxl/ |
D | vphb.c | 81 static int cxl_pcie_cfg_record(u8 bus, u8 devfn) in cxl_pcie_cfg_record() argument 83 return (bus << 8) + devfn; in cxl_pcie_cfg_record() 103 static inline int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument 108 record = cxl_pcie_cfg_record(bus->number, devfn); in cxl_pcie_config_info() 116 static int cxl_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_read_config() argument 130 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_read_config() 156 static int cxl_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_write_config() argument 167 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_write_config() 314 return cxl_pcie_cfg_record(dev->bus->number, dev->devfn); in cxl_pci_to_cfg_record()
|
/drivers/edac/ |
D | amd8131_edac.c | 51 .devfn = DEVFN_PCIX_BRIDGE_NORTH_A, 56 .devfn = DEVFN_PCIX_BRIDGE_NORTH_B, 61 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_A, 66 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_B, 234 if (dev_info->devfn == dev->devfn) in amd8131_probe() 251 dev_info->devfn, dev_info->ctl_name); in amd8131_probe() 287 dev_info->devfn, dev_info->ctl_name); in amd8131_probe() 298 if (dev_info->devfn == dev->devfn) in amd8131_remove()
|
/drivers/firmware/efi/ |
D | dev-path-parser.c | 55 unsigned int devfn = *(unsigned int *)data; in match_pci_dev() local 57 return dev_is_pci(dev) && to_pci_dev(dev)->devfn == devfn; in match_pci_dev() 63 unsigned int devfn; in parse_pci_path() local 70 devfn = PCI_DEVFN(node->pci.dev, node->pci.fn); in parse_pci_path() 72 *child = device_find_child(parent, &devfn, match_pci_dev); in parse_pci_path()
|