| /illumos-gate/usr/src/uts/common/os/ |
| H A D | sunpci.c | 173 static uint32_t pci_generic_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 175 static uint32_t pci_msi_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 177 static uint32_t pci_pcix_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 179 static uint32_t pci_pcie_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 181 static uint32_t pci_ht_addrmap_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 183 static uint32_t pci_ht_funcext_save(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 185 static void pci_fill_buf(ddi_acc_handle_t confhdl, uint16_t cap_ptr, 288 uint8_t cap_ptr, cap_id; local 329 cap_ptr = pci_config_get8(confhdl, PCI_BCNF_CAP_PTR); 333 while (cap_ptr != PCI_CAP_NEXT_PTR_NULL) { [all …]
|
| H A D | ddi_intr_impl.c | 570 i_ddi_set_msi_msix_cap_ptr(dev_info_t *dip, int cap_ptr) in i_ddi_set_msi_msix_cap_ptr() argument 575 intr_p->devi_cap_ptr = cap_ptr; in i_ddi_set_msi_msix_cap_ptr()
|
| /illumos-gate/usr/src/uts/i86xpv/io/psm/ |
| H A D | xpv_intr.c | 244 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apic_pci_msi_enable_vector() local 251 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_enable_vector() 266 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apic_pci_msi_enable_vector() 270 pci_config_put16(handle, cap_ptr + PCI_MSI_CTRL, msi_ctrl); in apic_pci_msi_enable_vector() 282 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(rdip); in apic_pci_msi_disable_mode() local 285 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_disable_mode() 288 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apic_pci_msi_disable_mode() 293 pci_config_put16(handle, cap_ptr + PCI_MSI_CTRL, msi_ctrl); in apic_pci_msi_disable_mode() 296 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSIX_CTRL); in apic_pci_msi_disable_mode() 299 pci_config_put16(handle, cap_ptr + PCI_MSIX_CTRL, in apic_pci_msi_disable_mode() [all …]
|
| H A D | xpv_psm.c | 1108 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in xpv_psm_get_msi_vector() local 1113 ASSERT((handle != NULL) && (cap_ptr != 0)); in xpv_psm_get_msi_vector() 1116 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in xpv_psm_get_msi_vector() 1122 cap_ptr + PCI_MSI_64BIT_DATA); in xpv_psm_get_msi_vector() 1125 cap_ptr + PCI_MSI_32BIT_DATA); in xpv_psm_get_msi_vector()
|
| /illumos-gate/usr/src/uts/i86pc/io/pcplusmp/ |
| H A D | apic_introp.c | 65 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apic_pci_msi_enable_vector() local 75 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_enable_vector() 107 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apic_pci_msi_enable_vector() 111 pci_config_put16(handle, cap_ptr + PCI_MSI_CTRL, msi_ctrl); in apic_pci_msi_enable_vector() 117 cap_ptr + PCI_MSI_ADDR_OFFSET, msi_addr); in apic_pci_msi_enable_vector() 121 cap_ptr + PCI_MSI_ADDR_OFFSET + 4, msi_addr >> 32); in apic_pci_msi_enable_vector() 123 cap_ptr + PCI_MSI_64BIT_DATA, msi_data); in apic_pci_msi_enable_vector() 126 cap_ptr + PCI_MSI_32BIT_DATA, msi_data); in apic_pci_msi_enable_vector() 416 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(rdip); in apic_pci_msi_enable_mode() local 419 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_enable_mode() [all …]
|
| H A D | apic_common.c | 1843 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(rdip); in apic_pci_msi_unconfigure() local 1846 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_unconfigure() 1849 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apic_pci_msi_unconfigure() 1851 pci_config_put16(handle, cap_ptr + PCI_MSI_CTRL, msi_ctrl); in apic_pci_msi_unconfigure() 1852 pci_config_put32(handle, cap_ptr + PCI_MSI_ADDR_OFFSET, 0); in apic_pci_msi_unconfigure() 1856 cap_ptr + PCI_MSI_64BIT_DATA, 0); in apic_pci_msi_unconfigure() 1858 cap_ptr + PCI_MSI_ADDR_OFFSET + 4, 0); in apic_pci_msi_unconfigure() 1861 cap_ptr + PCI_MSI_32BIT_DATA, 0); in apic_pci_msi_unconfigure() 1897 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(rdip); in apic_pci_msi_disable_mode() local 1900 ASSERT((handle != NULL) && (cap_ptr != 0)); in apic_pci_msi_disable_mode() [all …]
|
| /illumos-gate/usr/src/uts/common/sys/ |
| H A D | pci_impl.h | 178 #define CAP_ID(confhdl, cap_ptr, xspace) \ argument 179 ((xspace) ? 0 : pci_config_get8((confhdl), (cap_ptr) + PCI_CAP_ID)) 181 #define NEXT_CAP(confhdl, cap_ptr, xspace) \ argument 183 pci_config_get8((confhdl), (cap_ptr) + PCI_CAP_NEXT_PTR))
|
| H A D | ddi_intr_impl.h | 353 void i_ddi_set_msi_msix_cap_ptr(dev_info_t *dip, int cap_ptr);
|
| H A D | ddi_impldefs.h | 1268 uint32_t (*cap_save_func)(ddi_acc_handle_t confhdl, uint16_t cap_ptr,
|
| /illumos-gate/usr/src/uts/intel/io/vmm/io/ |
| H A D | ppt.c | 739 uint16_t cap_ptr, devsts; in ppt_wait_for_pending_txn() local 745 if (PCI_CAP_LOCATE(hdl, PCI_CAP_ID_PCI_E, &cap_ptr) != DDI_SUCCESS) { in ppt_wait_for_pending_txn() 750 devsts = PCI_CAP_GET16(hdl, 0, cap_ptr, PCIE_DEVSTS); in ppt_wait_for_pending_txn() 765 devsts = PCI_CAP_GET16(hdl, 0, cap_ptr, PCIE_DEVSTS); in ppt_wait_for_pending_txn() 776 uint16_t cap_ptr; in ppt_max_completion_tmo_us() local 800 if (PCI_CAP_LOCATE(hdl, PCI_CAP_ID_PCI_E, &cap_ptr) != DDI_SUCCESS) in ppt_max_completion_tmo_us() 803 if ((PCI_CAP_GET16(hdl, 0, cap_ptr, PCIE_PCIECAP) & in ppt_max_completion_tmo_us() 807 if ((PCI_CAP_GET32(hdl, 0, cap_ptr, PCIE_DEVCAP2) & in ppt_max_completion_tmo_us() 811 timo = timo_ranges[PCI_CAP_GET16(hdl, 0, cap_ptr, PCIE_DEVCTL2) & in ppt_max_completion_tmo_us() 825 uint16_t cap_ptr, ctl, cmd; in ppt_flr() local [all …]
|
| /illumos-gate/usr/src/lib/storage/libg_fc/common/ |
| H A D | io.c | 482 struct scsi_capacity_16 *cap_ptr, int buf_len) in g_scsi_read_capacity_1016_cmd() argument 490 if ((fd < 0) || (cap_ptr == NULL) || in g_scsi_read_capacity_1016_cmd() 516 ret = scsi_read_capacity_16_cmd(fd, cap_ptr, buf_len); in g_scsi_read_capacity_1016_cmd() 518 cap_ptr->sc_capacity = cap_old.capacity; in g_scsi_read_capacity_1016_cmd() 519 cap_ptr->sc_lbasize = cap_old.lbasize; in g_scsi_read_capacity_1016_cmd() 526 struct scsi_capacity_16 *cap_ptr, int buf_len) in scsi_read_capacity_16_cmd() argument 532 if ((fd < 0) || (cap_ptr == NULL) || in scsi_read_capacity_16_cmd() 537 (void) memset((char *)cap_ptr, 0, buf_len); in scsi_read_capacity_16_cmd() 543 ucmd.uscsi_bufaddr = (caddr_t)cap_ptr; in scsi_read_capacity_16_cmd()
|
| /illumos-gate/usr/src/lib/libprtdiag_psr/sparc/opl/common/ |
| H A D | opl_picl.c | 646 uint_t cap_ptr, cap_reg, link_status, link_cap, capid; in get_lane_width() local 673 cap_ptr = read_byte(fd, bus, dev, func, PCI_CONF_CAP_PTR, &ret); in get_lane_width() 679 cap_reg = read_word(fd, bus, dev, func, cap_ptr, &ret); in get_lane_width() 687 while (cap_ptr != 0) { in get_lane_width() 690 link_cap = read_long(fd, bus, dev, func, cap_ptr + in get_lane_width() 697 cap_ptr + PCIE_LINKSTS, &ret); in get_lane_width() 724 cap_ptr + PCI_PCIX_SEC_STATUS, &ret); in get_lane_width() 752 cap_ptr + PCI_PCIX_STATUS, &ret); in get_lane_width() 770 cap_ptr = (cap_reg >> PCI_REG_FUNC_SHIFT); in get_lane_width() 771 cap_reg = read_word(fd, bus, dev, func, cap_ptr, &ret); in get_lane_width()
|
| /illumos-gate/usr/src/uts/i86pc/io/apix/ |
| H A D | apix_utils.c | 307 int i, cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apix_pci_msi_enable_vector() local 316 ASSERT((handle != NULL) && (cap_ptr != 0)); in apix_pci_msi_enable_vector() 343 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apix_pci_msi_enable_vector() 347 pci_config_put16(handle, cap_ptr + PCI_MSI_CTRL, msi_ctrl); in apix_pci_msi_enable_vector() 350 APIX_WRITE_MSI_DATA(handle, cap_ptr, msi_ctrl, in apix_pci_msi_enable_vector() 354 cap_ptr + PCI_MSI_ADDR_OFFSET, msi_addr); in apix_pci_msi_enable_vector() 357 cap_ptr + PCI_MSI_ADDR_OFFSET + 4, msi_addr >> 32); in apix_pci_msi_enable_vector() 359 APIX_WRITE_MSI_DATA(handle, cap_ptr, msi_ctrl, msi_data); in apix_pci_msi_enable_vector() 382 int cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apix_pci_msi_enable_mode() local 385 ASSERT((handle != NULL) && (cap_ptr != 0)); in apix_pci_msi_enable_mode() [all …]
|
| H A D | apix.c | 1573 int inum, cap_ptr; in apix_set_cpu() local 1600 cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apix_set_cpu() 1601 msix_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSIX_CTRL); in apix_set_cpu() 1636 int i, num_vectors, cap_ptr, msi_mask_off = 0; in apix_grp_set_cpu() local 1693 cap_ptr = i_ddi_get_msi_msix_cap_ptr(dip); in apix_grp_set_cpu() 1695 msi_ctrl = pci_config_get16(handle, cap_ptr + PCI_MSI_CTRL); in apix_grp_set_cpu() 1700 msi_mask_off = cap_ptr + PCI_MSI_64BIT_MASKBITS; in apix_grp_set_cpu() 1702 msi_mask_off = cap_ptr + PCI_MSI_32BIT_MASK; in apix_grp_set_cpu()
|
| /illumos-gate/usr/src/uts/common/io/igb/ |
| H A D | igb_debug.c | 42 uint8_t cap_ptr; in pci_dump() local 131 cap_ptr = pci_config_get8(handle, PCI_CONF_CAP_PTR); in pci_dump() 134 "PCI_CONF_CAP_PTR:\t0x%x\n", cap_ptr); in pci_dump() 149 offset = cap_ptr; in pci_dump()
|
| /illumos-gate/usr/src/uts/common/io/pciex/ |
| H A D | pcieb.c | 424 uint16_t sdip_dev_ctrl, sdip_mrrs_mps, cap_ptr; in pcieb_41210_mps_wkrnd() local 438 if (PCI_CAP_LOCATE(cfg_hdl, PCI_CAP_ID_PCI_E, &cap_ptr) in pcieb_41210_mps_wkrnd() 445 sdip_dev_ctrl = PCI_CAP_GET16(cfg_hdl, 0, cap_ptr, in pcieb_41210_mps_wkrnd() 464 (void) PCI_CAP_PUT16(cfg_hdl, 0, cap_ptr, PCIE_DEVCTL, in pcieb_41210_mps_wkrnd() 1858 uint16_t pmcap, cap_ptr; in pcieb_pwr_setup() local 1882 if ((PCI_CAP_LOCATE(conf_hdl, PCI_CAP_ID_PM, &cap_ptr)) == in pcieb_pwr_setup() 1892 pwr_p->pwr_pmcsr_offset = cap_ptr + PCI_PMCSR; in pcieb_pwr_setup() 1893 pmcap = PCI_CAP_GET16(conf_hdl, 0, cap_ptr, PCI_PMCAP); in pcieb_pwr_setup() 2050 uint16_t cap_ptr; in pcieb_id_props() local 2071 PCI_CAP_ID_SLOT_ID, &cap_ptr)) != DDI_FAILURE)) { in pcieb_id_props() [all …]
|
| H A D | pcie.c | 2712 uint16_t cap_ptr; in pcie_root_port() local 2726 &cap_ptr)) == DDI_FAILURE) { in pcie_root_port() 2731 port_type = PCI_CAP_GET16(config_handle, 0, cap_ptr, in pcie_root_port() 2908 uint16_t cap_ptr; in pcie_ari_device() local 2924 if ((PCI_CAP_LOCATE(handle, PCI_CAP_ID_PCI_E, &cap_ptr)) in pcie_ari_device() 2933 &cap_ptr)) == DDI_FAILURE) { in pcie_ari_device() 2949 uint16_t cap_ptr, next_function; in pcie_ari_get_next_function() local 2963 PCI_CAP_XCFG_SPC(PCIE_EXT_CAP_ID_ARI), &cap_ptr)) == DDI_FAILURE) { in pcie_ari_get_next_function() 2968 val = PCI_CAP_GET32(handle, 0, cap_ptr, PCIE_ARI_CAP); in pcie_ari_get_next_function()
|
| /illumos-gate/usr/src/uts/common/io/ixgbe/ |
| H A D | ixgbe_debug.c | 167 uint8_t cap_ptr; in ixgbe_pci_dump() local 256 cap_ptr = pci_config_get8(handle, PCI_CONF_CAP_PTR); in ixgbe_pci_dump() 259 "PCI_CONF_CAP_PTR:\t0x%x\n", cap_ptr); in ixgbe_pci_dump() 274 offset = cap_ptr; in ixgbe_pci_dump()
|
| /illumos-gate/usr/src/uts/common/io/e1000g/ |
| H A D | e1000g_debug.c | 373 uint8_t cap_ptr; in pciconfig_dump() local 438 cap_ptr = pci_config_get8(handle, PCI_CONF_CAP_PTR); in pciconfig_dump() 441 "PCI_CONF_CAP_PTR:\t0x%x\n", cap_ptr); in pciconfig_dump() 456 offset = cap_ptr; in pciconfig_dump()
|
| /illumos-gate/usr/src/uts/sun4/io/ |
| H A D | pcicfg.c | 575 uint16_t cap_ptr; in pcicfg_get_nslots() local 578 &cap_ptr)) == DDI_SUCCESS) { in pcicfg_get_nslots() 581 PCI_CAP_PUT8(handle, 0, cap_ptr, PCI_HP_DWORD_SELECT_OFF, in pcicfg_get_nslots() 583 config = PCI_CAP_GET32(handle, 0, cap_ptr, in pcicfg_get_nslots() 586 } else if ((PCI_CAP_LOCATE(handle, PCI_CAP_ID_SLOT_ID, &cap_ptr)) in pcicfg_get_nslots() 589 cap_ptr, PCI_CAP_ID_REGS_OFF); in pcicfg_get_nslots() 592 } else if ((PCI_CAP_LOCATE(handle, PCI_CAP_ID_PCI_E, &cap_ptr)) in pcicfg_get_nslots() 594 int port_type = PCI_CAP_GET16(handle, 0, cap_ptr, in pcicfg_get_nslots() 598 (PCI_CAP_GET16(handle, 0, cap_ptr, PCIE_PCIECAP) in pcicfg_get_nslots() 613 uint16_t cap_ptr; in pcicfg_is_chassis() local [all …]
|
| /illumos-gate/usr/src/uts/intel/io/pci/ |
| H A D | pci_boot.c | 1169 int rv, cap_ptr, physhi; in fix_ppb_res() local 1206 cap_ptr = get_pci_cap(bus, dev, func, PCI_CAP_ID_PCI_E); in fix_ppb_res() 1207 if (cap_ptr != -1) { in fix_ppb_res() 1209 (uint16_t)cap_ptr + PCIE_LINKCTL); in fix_ppb_res() 2206 uint8_t cap_ptr; in set_devpm_d0() local 2216 cap_ptr = pci_getb(bus, dev, func, PCI_CBUS_CAP_PTR); in set_devpm_d0() 2218 cap_ptr = pci_getb(bus, dev, func, PCI_CONF_CAP_PTR); in set_devpm_d0() 2222 while (cap_ptr != PCI_CAP_NEXT_PTR_NULL && cap_ptr >= PCI_CAP_PTR_OFF) { in set_devpm_d0() 2223 cap_ptr &= PCI_CAP_PTR_MASK; in set_devpm_d0() 2224 cap_id = pci_getb(bus, dev, func, cap_ptr + PCI_CAP_ID); in set_devpm_d0() [all …]
|
| /illumos-gate/usr/src/uts/i86pc/io/pci/ |
| H A D | pci_common.c | 203 int cap_ptr; in pci_common_intr_ops() local 347 cap_ptr = 0; in pci_common_intr_ops() 358 cap_ptr = ddi_prop_get_int(DDI_DEV_T_ANY, rdip, in pci_common_intr_ops() 360 if (cap_ptr == 0) { in pci_common_intr_ops() 368 i_ddi_set_msi_msix_cap_ptr(rdip, cap_ptr); in pci_common_intr_ops() 438 if (cap_ptr = i_ddi_get_msi_msix_cap_ptr(rdip)) in pci_common_intr_ops()
|
| /illumos-gate/usr/src/uts/sparc/io/pciex/ |
| H A D | pcieb_sparc.c | 125 uint16_t cap_ptr; in pcieb_plat_pcishpc_probe() local 126 if ((PCI_CAP_LOCATE(config_handle, PCI_CAP_ID_PCI_HOTPLUG, &cap_ptr)) != in pcieb_plat_pcishpc_probe()
|
| /illumos-gate/usr/src/uts/common/io/cxgbe/t4nex/ |
| H A D | t4_nexus.c | 2965 uint8_t cap_ptr = pci_config_get8(sc->pci_regh, PCI_CONF_CAP_PTR); in t4_os_find_pci_capability() local 2966 while (cap_ptr) { in t4_os_find_pci_capability() 2968 pci_config_get8(sc->pci_regh, cap_ptr + PCI_CAP_ID); in t4_os_find_pci_capability() 2970 return (cap_ptr); in t4_os_find_pci_capability() 2972 cap_ptr = in t4_os_find_pci_capability() 2973 pci_config_get8(sc->pci_regh, cap_ptr + PCI_CAP_NEXT_PTR); in t4_os_find_pci_capability()
|
| /illumos-gate/usr/src/uts/common/io/atge/ |
| H A D | atge_main.c | 1059 uint16_t cap_ptr; in atge_attach() local 1201 &cap_ptr); in atge_attach() 1209 cap_ptr + 0x08); in atge_attach()
|