Lines Matching defs:cpi
7551 mdi_vhcache_pathinfo_t *cpi, *cpi_next;
7569 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi_next) {
7570 cpi_next = cpi->cpi_next;
7571 free_vhcache_pathinfo(cpi);
7674 * Enqueue the vhcache pathinfo (cpi) at the tail of the list
7678 mdi_vhcache_pathinfo_t *cpi)
7680 cpi->cpi_next = NULL;
7682 cct->cct_cpi_head = cpi;
7684 cct->cct_cpi_tail->cpi_next = cpi;
7685 cct->cct_cpi_tail = cpi;
7689 * Enqueue the vhcache pathinfo (cpi) at the correct location in the
7698 mdi_vhcache_pathinfo_t *cpi, *prev_cpi;
7704 for (cpi = cct->cct_cpi_head, prev_cpi = NULL; cpi != NULL &&
7705 !(cpi->cpi_flags & MDI_CPI_HINT_PATH_DOES_NOT_EXIST);
7706 prev_cpi = cpi, cpi = cpi->cpi_next)
7714 newcpi->cpi_next = cpi;
7716 if (cpi == NULL)
7758 free_vhcache_pathinfo(mdi_vhcache_pathinfo_t *cpi)
7760 kmem_free(cpi->cpi_addr, strlen(cpi->cpi_addr) + 1);
7761 kmem_free(cpi, sizeof (*cpi));
7796 mdi_vhcache_pathinfo_t *cpi;
7802 cpi = kmem_zalloc(sizeof (*cpi), KM_SLEEP);
7803 cpi->cpi_addr = i_ddi_strdup(nvpair_name(nvp), KM_SLEEP);
7806 cpi->cpi_cphci = cphci_list[val[0]];
7807 cpi->cpi_flags = val[1];
7808 enqueue_tail_vhcache_pathinfo(cct, cpi);
7927 mdi_vhcache_pathinfo_t *cpi;
7937 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
7938 val[0] = cpi->cpi_cphci->cphci_id;
7939 val[1] = cpi->cpi_flags;
7940 if ((err = nvlist_add_uint32_array(nvl, cpi->cpi_addr, val, 2))
8198 mdi_vhcache_pathinfo_t *cpi;
8217 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
8218 if (cpi->cpi_cphci->cphci_phci == ph &&
8219 strcmp(cpi->cpi_addr, pip->pi_addr) == 0) {
8220 cpi->cpi_pip = pip;
8221 if (cpi->cpi_flags & MDI_CPI_HINT_PATH_DOES_NOT_EXIST) {
8222 cpi->cpi_flags &=
8231 if (cpi == NULL) {
8232 cpi = kmem_zalloc(sizeof (*cpi), KM_SLEEP);
8233 cpi->cpi_addr = i_ddi_strdup(pip->pi_addr, KM_SLEEP);
8234 cpi->cpi_cphci = lookup_vhcache_phci_by_addr(vhcache, ph);
8235 ASSERT(cpi->cpi_cphci != NULL);
8236 cpi->cpi_pip = pip;
8237 enqueue_vhcache_pathinfo(cct, cpi);
8256 mdi_vhcache_pathinfo_t *cpi;
8261 for (cpi = cct->cct_cpi_head; cpi != NULL;
8262 cpi = cpi->cpi_next) {
8263 if (cpi->cpi_pip == pip) {
8264 cpi->cpi_pip = NULL;
8602 mdi_vhcache_pathinfo_t *cpi;
8606 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
8611 if (cpi->cpi_pip == NULL)
8614 MDI_PI_LOCK(cpi->cpi_pip);
8615 if (MDI_PI_IS_INIT(cpi->cpi_pip))
8617 MDI_PI_UNLOCK(cpi->cpi_pip);
8622 len = strlen(cpi->cpi_cphci->cphci_path) +
8623 strlen(ct_name) + strlen(cpi->cpi_addr) + 3;
8626 cpi->cpi_cphci->cphci_path, ct_name,
8627 cpi->cpi_addr);
8696 mdi_vhcache_pathinfo_t *cpi, *cpi_next, *cpi_head;
8700 for (cpi = cpi_head; cpi != NULL; cpi = cpi_next) {
8701 cpi_next = cpi->cpi_next;
8702 enqueue_vhcache_pathinfo(cct, cpi);
8721 mdi_vhcache_pathinfo_t *cpi;
8734 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
8735 if ((cpi->cpi_pip != NULL &&
8736 (cpi->cpi_flags & MDI_CPI_HINT_PATH_DOES_NOT_EXIST)) ||
8737 (cpi->cpi_pip == NULL &&
8738 !(cpi->cpi_flags & MDI_CPI_HINT_PATH_DOES_NOT_EXIST))) {
8742 if (cpi == NULL) {
8757 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
8758 if (cpi->cpi_pip != NULL)
8759 cpi->cpi_flags &= ~MDI_CPI_HINT_PATH_DOES_NOT_EXIST;
8761 cpi->cpi_flags |= MDI_CPI_HINT_PATH_DOES_NOT_EXIST;
8895 mdi_vhcache_pathinfo_t *cpi;
8898 for (cpi = cct->cct_cpi_head; cpi != NULL; cpi = cpi->cpi_next) {
8899 if (cpi->cpi_pip != NULL) {
8900 MDI_PI_LOCK(cpi->cpi_pip);
8901 if (cpi->cpi_pip->pi_state == MDI_PATHINFO_STATE_ONLINE)
8903 MDI_PI_UNLOCK(cpi->cpi_pip);