Lines Matching +full:comp +full:- +full:config

1 /*-
2 * Copyright (c) 2016-2017 Microsoft Corp.
93 mtx_init(&c->lock, "hvcmpl", NULL, MTX_DEF); in init_completion()
94 c->done = 0; in init_completion()
99 c->done = 0; in reinit_completion()
104 mtx_destroy(&c->lock); in free_completion()
110 mtx_lock(&c->lock); in complete()
111 c->done++; in complete()
112 mtx_unlock(&c->lock); in complete()
119 mtx_lock(&c->lock); in wait_for_completion()
120 while (c->done == 0) in wait_for_completion()
121 mtx_sleep(c, &c->lock, 0, "hvwfc", 0); in wait_for_completion()
122 c->done--; in wait_for_completion()
123 mtx_unlock(&c->lock); in wait_for_completion()
127 * Return: 0 if completed, a non-zero value if timed out.
134 mtx_lock(&c->lock); in wait_for_completion_timeout()
136 if (c->done == 0) in wait_for_completion_timeout()
137 mtx_sleep(c, &c->lock, 0, "hvwfc", timeout); in wait_for_completion_timeout()
139 if (c->done > 0) { in wait_for_completion_timeout()
140 c->done--; in wait_for_completion_timeout()
146 mtx_unlock(&c->lock); in wait_for_completion_timeout()
166 #define CFG_PAGE_SIZE (PCI_CONFIG_MMIO_LENGTH - CFG_PAGE_OFFSET)
223 * the Hyper-V parent partition.
458 * read it back, for each of the BAR offsets within config space.
524 /* {44C4F61D-4444-4400-9D52-802E27EDE19F} */
554 if (vmbus_chan_is_revoked(hbus->sc->chan)) { in wait_for_response()
555 device_printf(hbus->pcib, in wait_for_response()
571 comp_pkt->completion_status = resp->status; in hv_pci_generic_compl()
573 comp_pkt->completion_status = -1; in hv_pci_generic_compl()
575 complete(&comp_pkt->host_event); in hv_pci_generic_compl()
587 if (resp->status < 0) { in q_resource_requirements()
591 completion->hpdev->probed_bar[i] = in q_resource_requirements()
592 q_res_req->probed_bar[i]; in q_resource_requirements()
595 complete(&completion->host_event); in q_resource_requirements()
606 comp_pkt->comp_pkt.completion_status = resp->status; in hv_pci_compose_compl()
607 comp_pkt->int_desc = int_resp->int_desc; in hv_pci_compose_compl()
608 complete(&comp_pkt->comp_pkt.host_event); in hv_pci_compose_compl()
622 int_pkt->message_type.type = PCI_DELETE_INTERRUPT_MESSAGE; in hv_int_desc_free()
623 int_pkt->wslot.val = hpdev->desc.wslot.val; in hv_int_desc_free()
624 int_pkt->int_desc = hid->desc; in hv_int_desc_free()
626 vmbus_chan_send(hpdev->hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, in hv_int_desc_free()
635 struct hv_pcibus *hbus = hpdev->hbus; in hv_pci_delete_device()
640 devfn = wslot_to_devfn(hpdev->desc.wslot.val); in hv_pci_delete_device()
644 pci_dev = pci_find_dbsf(hbus->pci_domain, in hv_pci_delete_device()
647 device_delete_child(hbus->pci_bus, pci_dev); in hv_pci_delete_device()
651 mtx_lock(&hbus->device_list_lock); in hv_pci_delete_device()
652 TAILQ_REMOVE(&hbus->children, hpdev, link); in hv_pci_delete_device()
653 mtx_unlock(&hbus->device_list_lock); in hv_pci_delete_device()
655 TAILQ_FOREACH_SAFE(hid, &hpdev->irq_desc_list, link, tmp_hid) in hv_pci_delete_device()
674 hpdev->hbus = hbus; in new_pcichild_device()
676 TAILQ_INIT(&hpdev->irq_desc_list); in new_pcichild_device()
685 res_req->message_type.type = PCI_QUERY_RESOURCE_REQUIREMENTS; in new_pcichild_device()
686 res_req->wslot.val = desc->wslot.val; in new_pcichild_device()
688 ret = vmbus_chan_send(hbus->sc->chan, in new_pcichild_device()
699 hpdev->desc = *desc; in new_pcichild_device()
701 mtx_lock(&hbus->device_list_lock); in new_pcichild_device()
702 if (TAILQ_EMPTY(&hbus->children)) in new_pcichild_device()
703 hbus->pci_domain = desc->ser & 0xFFFF; in new_pcichild_device()
704 TAILQ_INSERT_TAIL(&hbus->children, hpdev, link); in new_pcichild_device()
705 mtx_unlock(&hbus->device_list_lock); in new_pcichild_device()
732 hbus = dr_wrk->bus; in pci_devices_present_work()
736 mtx_lock(&hbus->device_list_lock); in pci_devices_present_work()
737 while (!TAILQ_EMPTY(&hbus->dr_list)) { in pci_devices_present_work()
738 dr = TAILQ_FIRST(&hbus->dr_list); in pci_devices_present_work()
739 TAILQ_REMOVE(&hbus->dr_list, dr, link); in pci_devices_present_work()
742 if (!TAILQ_EMPTY(&hbus->dr_list)) { in pci_devices_present_work()
747 mtx_unlock(&hbus->device_list_lock); in pci_devices_present_work()
753 mtx_lock(&hbus->device_list_lock); in pci_devices_present_work()
754 TAILQ_FOREACH(hpdev, &hbus->children, link) in pci_devices_present_work()
755 hpdev->reported_missing = true; in pci_devices_present_work()
756 mtx_unlock(&hbus->device_list_lock); in pci_devices_present_work()
759 for (child_no = 0; child_no < dr->device_count; child_no++) { in pci_devices_present_work()
761 new_desc = &dr->func[child_no]; in pci_devices_present_work()
763 mtx_lock(&hbus->device_list_lock); in pci_devices_present_work()
764 TAILQ_FOREACH(hpdev, &hbus->children, link) { in pci_devices_present_work()
765 if ((hpdev->desc.wslot.val == in pci_devices_present_work()
766 new_desc->wslot.val) && in pci_devices_present_work()
767 (hpdev->desc.v_id == new_desc->v_id) && in pci_devices_present_work()
768 (hpdev->desc.d_id == new_desc->d_id) && in pci_devices_present_work()
769 (hpdev->desc.ser == new_desc->ser)) { in pci_devices_present_work()
770 hpdev->reported_missing = false; in pci_devices_present_work()
775 mtx_unlock(&hbus->device_list_lock); in pci_devices_present_work()
788 TAILQ_FOREACH_SAFE(hpdev, &hbus->children, link, tmp_hpdev) { in pci_devices_present_work()
789 if (hpdev->reported_missing) in pci_devices_present_work()
794 if (hbus->state == hv_pcibus_installed && need_rescan) in pci_devices_present_work()
795 pci_rescan(hbus->pci_bus); in pci_devices_present_work()
798 query_comp = hbus->query_comp; in pci_devices_present_work()
800 hbus->query_comp = NULL; in pci_devices_present_work()
812 mtx_lock(&hbus->device_list_lock); in get_pcichild_wslot()
813 TAILQ_FOREACH(hpdev, &hbus->children, link) { in get_pcichild_wslot()
814 if (hpdev->desc.wslot.val == wslot) { in get_pcichild_wslot()
819 mtx_unlock(&hbus->device_list_lock); in get_pcichild_wslot()
832 if (hbus->detaching && relations->device_count > 0) in hv_pci_devices_present()
836 (sizeof(struct pci_func_desc) * relations->device_count); in hv_pci_devices_present()
839 dr->device_count = relations->device_count; in hv_pci_devices_present()
840 if (dr->device_count != 0) in hv_pci_devices_present()
841 memcpy(dr->func, relations->func, in hv_pci_devices_present()
842 sizeof(struct hv_pcidev_desc) * dr->device_count); in hv_pci_devices_present()
844 mtx_lock(&hbus->device_list_lock); in hv_pci_devices_present()
845 TAILQ_INSERT_TAIL(&hbus->dr_list, dr, link); in hv_pci_devices_present()
846 mtx_unlock(&hbus->device_list_lock); in hv_pci_devices_present()
849 dr_wrk->bus = hbus; in hv_pci_devices_present()
850 TASK_INIT(&dr_wrk->task, 0, pci_devices_present_work, dr_wrk); in hv_pci_devices_present()
851 taskqueue_enqueue(hbus->sc->taskq, &dr_wrk->task); in hv_pci_devices_present()
862 if (hbus->detaching && relations->device_count > 0) in hv_pci_devices_present2()
866 (sizeof(struct pci_func_desc2) * relations->device_count); in hv_pci_devices_present2()
869 dr->device_count = relations->device_count; in hv_pci_devices_present2()
870 if (dr->device_count != 0) in hv_pci_devices_present2()
871 memcpy(dr->func, relations->func, in hv_pci_devices_present2()
872 sizeof(struct pci_func_desc2) * dr->device_count); in hv_pci_devices_present2()
874 mtx_lock(&hbus->device_list_lock); in hv_pci_devices_present2()
875 TAILQ_INSERT_TAIL(&hbus->dr_list, dr, link); in hv_pci_devices_present2()
876 mtx_unlock(&hbus->device_list_lock); in hv_pci_devices_present2()
879 dr_wrk->bus = hbus; in hv_pci_devices_present2()
880 TASK_INIT(&dr_wrk->task, 0, pci_devices_present_work, dr_wrk); in hv_pci_devices_present2()
881 taskqueue_enqueue(hbus->sc->taskq, &dr_wrk->task); in hv_pci_devices_present2()
888 union win_slot_encoding wslot = hpdev->desc.wslot; in hv_eject_device_work()
889 struct hv_pcibus *hbus = hpdev->hbus; in hv_eject_device_work()
900 eject_pkt->message_type.type = PCI_EJECTION_COMPLETE; in hv_eject_device_work()
901 eject_pkt->wslot.val = wslot.val; in hv_eject_device_work()
902 vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, in hv_eject_device_work()
909 struct hv_pcibus *hbus = hpdev->hbus; in hv_pci_eject_device()
912 if (hbus->detaching) in hv_pci_eject_device()
920 TASK_INIT(&hpdev->eject_task, 0, hv_eject_device_work, hpdev); in hv_pci_eject_device()
921 taskq = vmbus_chan_mgmt_tq(hbus->sc->chan); in hv_pci_eject_device()
922 taskqueue_enqueue(taskq, &hpdev->eject_task); in hv_pci_eject_device()
931 struct hv_pcibus *hbus = sc->hbus; in vmbus_pcib_on_channel_callback()
944 buffer = sc->rx_buf; in vmbus_pcib_on_channel_callback()
976 switch (pkt->cph_type) { in vmbus_pcib_on_channel_callback()
979 (struct pci_packet *)(uintptr_t)pkt->cph_xactid; in vmbus_pcib_on_channel_callback()
981 comp_packet->completion_func(comp_packet->compl_ctxt, in vmbus_pcib_on_channel_callback()
987 switch (new_msg->message_type.type) { in vmbus_pcib_on_channel_callback()
991 if (bus_rel->device_count == 0) in vmbus_pcib_on_channel_callback()
997 (bus_rel->device_count))) in vmbus_pcib_on_channel_callback()
1006 if (bus_rel2->device_count == 0) in vmbus_pcib_on_channel_callback()
1012 (bus_rel2->device_count))) in vmbus_pcib_on_channel_callback()
1020 dev_msg->wslot.val); in vmbus_pcib_on_channel_callback()
1028 new_msg->message_type.type); in vmbus_pcib_on_channel_callback()
1034 pkt->cph_type); in vmbus_pcib_on_channel_callback()
1062 version_req->message_type.type = PCI_QUERY_PROTOCOL_VERSION; in hv_pci_protocol_negotiation()
1065 version_req->protocol_version = version[i]; in hv_pci_protocol_negotiation()
1066 ret = vmbus_chan_send(hbus->sc->chan, in hv_pci_protocol_negotiation()
1074 device_printf(hbus->pcib, in hv_pci_protocol_negotiation()
1081 hbus->protocol_version = version[i]; in hv_pci_protocol_negotiation()
1082 device_printf(hbus->pcib, in hv_pci_protocol_negotiation()
1084 hbus->protocol_version); in hv_pci_protocol_negotiation()
1090 device_printf(hbus->pcib, in hv_pci_protocol_negotiation()
1099 device_printf(hbus->pcib, in hv_pci_protocol_negotiation()
1100 "PCI pass-trhpugh VSP failed to find supported version\n"); in hv_pci_protocol_negotiation()
1114 ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, in hv_pci_query_relations()
1132 * powered-on state. This includes telling the host which region in hv_pci_enter_d0()
1133 * of memory-mapped I/O space has been chosen for configuration space in hv_pci_enter_d0()
1143 d0_entry->message_type.type = PCI_BUS_D0ENTRY; in hv_pci_enter_d0()
1144 d0_entry->mmio_base = rman_get_start(hbus->cfg_res); in hv_pci_enter_d0()
1146 ret = vmbus_chan_send(hbus->sc->chan, VMBUS_CHANPKT_TYPE_INBAND, in hv_pci_enter_d0()
1156 device_printf(hbus->pcib, "vmbus_pcib failed to enable D0\n"); in hv_pci_enter_d0()
1183 size_res = (hbus->protocol_version < PCI_PROTOCOL_VERSION_1_4) in hv_send_resources_allocated()
1196 pkt->completion_func = hv_pci_generic_compl; in hv_send_resources_allocated()
1197 pkt->compl_ctxt = &comp_pkt; in hv_send_resources_allocated()
1199 if (hbus->protocol_version < PCI_PROTOCOL_VERSION_1_4) { in hv_send_resources_allocated()
1201 (struct pci_resources_assigned *)&pkt->message; in hv_send_resources_allocated()
1202 res_assigned->message_type.type = in hv_send_resources_allocated()
1204 res_assigned->wslot.val = hpdev->desc.wslot.val; in hv_send_resources_allocated()
1207 (struct pci_resources_assigned2 *)&pkt->message; in hv_send_resources_allocated()
1208 res_assigned2->message_type.type = in hv_send_resources_allocated()
1210 res_assigned2->wslot.val = hpdev->desc.wslot.val; in hv_send_resources_allocated()
1213 ret = vmbus_chan_send(hbus->sc->chan, in hv_send_resources_allocated()
1215 &pkt->message, size_res, in hv_send_resources_allocated()
1227 device_printf(hbus->pcib, in hv_send_resources_allocated()
1251 pkt.wslot.val = hpdev->desc.wslot.val; in hv_send_resources_released()
1253 ret = vmbus_chan_send(hbus->sc->chan, in hv_send_resources_released()
1266 return (bus_read_##s(bus->cfg_res, offset)); \
1273 return (bus_write_##s(bus->cfg_res, offset, val)); \
1288 struct hv_pcibus *hbus = hpdev->hbus; in _hv_pcifront_read_config()
1295 memcpy(val, ((uint8_t *)&hpdev->desc.v_id) + where, size); in _hv_pcifront_read_config()
1298 memcpy(val, ((uint8_t *)&hpdev->desc.rev) + where - in _hv_pcifront_read_config()
1302 memcpy(val, (uint8_t *)&hpdev->desc.subsystem_id + where - in _hv_pcifront_read_config()
1311 * Interrupt Line and Interrupt PIN are hard-wired to zero in _hv_pcifront_read_config()
1312 * because this front-end only supports message-signaled in _hv_pcifront_read_config()
1317 mtx_lock(&hbus->config_lock); in _hv_pcifront_read_config()
1320 hv_cfg_write_4(hbus, 0, hpdev->desc.wslot.val); in _hv_pcifront_read_config()
1325 /* Read from that function's config space. */ in _hv_pcifront_read_config()
1343 mtx_unlock(&hbus->config_lock); in _hv_pcifront_read_config()
1345 /* Invalid config read: it's unlikely to reach here. */ in _hv_pcifront_read_config()
1354 struct hv_pcibus *hbus = hpdev->hbus; in _hv_pcifront_write_config()
1357 /* SSIDs and ROM BARs are read-only */ in _hv_pcifront_write_config()
1362 mtx_lock(&hbus->config_lock); in _hv_pcifront_write_config()
1365 hv_cfg_write_4(hbus, 0, hpdev->desc.wslot.val); in _hv_pcifront_write_config()
1370 /* Write to that function's config space. */ in _hv_pcifront_write_config()
1389 mtx_unlock(&hbus->config_lock); in _hv_pcifront_write_config()
1391 /* Invalid config write: it's unlikely to reach here. */ in _hv_pcifront_write_config()
1397 * The vPCI in some Hyper-V releases do not initialize the last 4
1402 * This seems to make the Hyper-V vPCI and pci_write_bar() to cooperate
1412 mtx_lock(&hbus->device_list_lock); in vmbus_pcib_prepopulate_bars()
1413 TAILQ_FOREACH(hpdev, &hbus->children, link) { in vmbus_pcib_prepopulate_bars()
1416 if (hpdev->probed_bar[i] == 0) in vmbus_pcib_prepopulate_bars()
1424 if (hpdev->probed_bar[i] != bar_val) { in vmbus_pcib_prepopulate_bars()
1438 mtx_unlock(&hbus->device_list_lock); in vmbus_pcib_prepopulate_bars()
1446 atomic_set_int(&hbus->detaching, 1); in vmbus_pcib_set_detaching()
1458 * PCI_BUS_RELATIONS and PCI_EJECT tasks to sc->taskq. in vmbus_pcib_pre_detach()
1460 vmbus_chan_run_task(hbus->sc->chan, &task); in vmbus_pcib_pre_detach()
1462 taskqueue_drain_all(hbus->sc->taskq); in vmbus_pcib_pre_detach()
1475 device_set_desc(dev, "Hyper-V PCI Express Pass Through"); in vmbus_pcib_probe()
1497 hbus->pcib = dev; in vmbus_pcib_attach()
1501 hbus->pci_domain = inst_guid->hv_guid[9] | in vmbus_pcib_attach()
1502 (inst_guid->hv_guid[8] << 8); in vmbus_pcib_attach()
1504 mtx_init(&hbus->config_lock, "hbcfg", NULL, MTX_DEF); in vmbus_pcib_attach()
1505 mtx_init(&hbus->device_list_lock, "hbdl", NULL, MTX_DEF); in vmbus_pcib_attach()
1506 TAILQ_INIT(&hbus->children); in vmbus_pcib_attach()
1507 TAILQ_INIT(&hbus->dr_list); in vmbus_pcib_attach()
1509 hbus->cfg_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, in vmbus_pcib_attach()
1513 if (!hbus->cfg_res) { in vmbus_pcib_attach()
1520 sc->chan = channel; in vmbus_pcib_attach()
1521 sc->rx_buf = malloc(PCIB_PACKET_SIZE, M_DEVBUF, M_WAITOK | M_ZERO); in vmbus_pcib_attach()
1522 sc->hbus = hbus; in vmbus_pcib_attach()
1531 sc->taskq = taskqueue_create("vmbus_pcib_tq", M_WAITOK, in vmbus_pcib_attach()
1532 taskqueue_thread_enqueue, &sc->taskq); in vmbus_pcib_attach()
1533 taskqueue_start_threads(&sc->taskq, 1, PI_NET, "vmbus_pcib_tq"); in vmbus_pcib_attach()
1535 hbus->sc = sc; in vmbus_pcib_attach()
1537 init_completion(&hbus->query_completion); in vmbus_pcib_attach()
1538 hbus->query_comp = &hbus->query_completion; in vmbus_pcib_attach()
1540 ret = vmbus_chan_open(sc->chan, pci_ring_size, pci_ring_size, in vmbus_pcib_attach()
1552 ret = wait_for_response(hbus, hbus->query_comp); in vmbus_pcib_attach()
1567 hbus->pci_bus = device_add_child(dev, "pci", DEVICE_UNIT_ANY); in vmbus_pcib_attach()
1568 if (!hbus->pci_bus) { in vmbus_pcib_attach()
1576 hbus->state = hv_pcibus_installed; in vmbus_pcib_attach()
1582 vmbus_chan_close(sc->chan); in vmbus_pcib_attach()
1584 taskqueue_free(sc->taskq); in vmbus_pcib_attach()
1585 free_completion(&hbus->query_completion); in vmbus_pcib_attach()
1586 free(sc->rx_buf, M_DEVBUF); in vmbus_pcib_attach()
1587 bus_release_resource(dev, SYS_RES_MEMORY, 0, hbus->cfg_res); in vmbus_pcib_attach()
1589 mtx_destroy(&hbus->device_list_lock); in vmbus_pcib_attach()
1590 mtx_destroy(&hbus->config_lock); in vmbus_pcib_attach()
1602 struct hv_pcibus *hbus = sc->hbus; in vmbus_pcib_detach()
1609 if (hbus->state == hv_pcibus_installed) in vmbus_pcib_detach()
1621 ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, 0, in vmbus_pcib_detach()
1626 taskqueue_drain_all(hbus->sc->taskq); in vmbus_pcib_detach()
1627 vmbus_chan_close(sc->chan); in vmbus_pcib_detach()
1628 taskqueue_free(sc->taskq); in vmbus_pcib_detach()
1630 free_completion(&hbus->query_completion); in vmbus_pcib_detach()
1631 free(sc->rx_buf, M_DEVBUF); in vmbus_pcib_detach()
1632 bus_release_resource(dev, SYS_RES_MEMORY, 0, hbus->cfg_res); in vmbus_pcib_detach()
1634 mtx_destroy(&hbus->device_list_lock); in vmbus_pcib_detach()
1635 mtx_destroy(&hbus->config_lock); in vmbus_pcib_detach()
1648 *val = sc->hbus->pci_domain; in vmbus_pcib_read_ivar()
1676 return (pci_domain_alloc_bus(sc->hbus->pci_domain, child, rid, in vmbus_pcib_alloc_resource()
1686 hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); in vmbus_pcib_alloc_resource()
1694 /* Make sure a 32-bit BAR gets a 32-bit address */ in vmbus_pcib_alloc_resource()
1695 if (!(hpdev->probed_bar[bar_no] & PCIM_BAR_MEM_64)) in vmbus_pcib_alloc_resource()
1705 if (res == NULL && start + count - 1 == end) in vmbus_pcib_alloc_resource()
1721 return (pci_domain_adjust_bus(sc->hbus->pci_domain, child, r, in vmbus_pcib_adjust_resource()
1733 return (pci_domain_release_bus(sc->hbus->pci_domain, child, r)); in vmbus_pcib_release_resource()
1747 return (pci_domain_activate_bus(sc->hbus->pci_domain, child, in vmbus_pcib_activate_resource()
1758 return (pci_domain_deactivate_bus(sc->hbus->pci_domain, child, in vmbus_pcib_deactivate_resource()
1781 hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); in vmbus_pcib_read_config()
1800 hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); in vmbus_pcib_write_config()
1810 /* We only support MSI/MSI-X and don't support INTx interrupt. */ in vmbus_pcib_route_intr()
1889 struct compose_comp_ctxt comp; in vmbus_pcib_map_msi() local
1901 hpdev = get_pcichild_wslot(sc->hbus, devfn_to_wslot(devfn)); in vmbus_pcib_map_msi()
1914 TAILQ_FOREACH_SAFE(hid, &hpdev->irq_desc_list, link, tmp_hid) { in vmbus_pcib_map_msi()
1915 if (hid->irq == irq) { in vmbus_pcib_map_msi()
1916 TAILQ_REMOVE(&hpdev->irq_desc_list, hid, link); in vmbus_pcib_map_msi()
1932 if (hpdev->hbus->protocol_version < PCI_PROTOCOL_VERSION_1_4 && in vmbus_pcib_map_msi()
1938 vcpu_id, hpdev->hbus->protocol_version); in vmbus_pcib_map_msi()
1942 init_completion(&comp.comp_pkt.host_event); in vmbus_pcib_map_msi()
1946 ctxt.pkt.compl_ctxt = &comp; in vmbus_pcib_map_msi()
1947 switch (hpdev->hbus->protocol_version) { in vmbus_pcib_map_msi()
1951 ctxt.int_pkts.v1.wslot.val = hpdev->desc.wslot.val; in vmbus_pcib_map_msi()
1963 ctxt.int_pkts.v3.wslot.val = hpdev->desc.wslot.val; in vmbus_pcib_map_msi()
1974 ret = vmbus_chan_send(sc->chan, VMBUS_CHANPKT_TYPE_INBAND, in vmbus_pcib_map_msi()
1978 free_completion(&comp.comp_pkt.host_event); in vmbus_pcib_map_msi()
1982 wait_for_completion(&comp.comp_pkt.host_event); in vmbus_pcib_map_msi()
1983 free_completion(&comp.comp_pkt.host_event); in vmbus_pcib_map_msi()
1985 if (comp.comp_pkt.completion_status < 0) { in vmbus_pcib_map_msi()
1988 comp.comp_pkt.completion_status); in vmbus_pcib_map_msi()
1992 *addr = comp.int_desc.address; in vmbus_pcib_map_msi()
1993 *data = comp.int_desc.data; in vmbus_pcib_map_msi()
1996 hid->irq = irq; in vmbus_pcib_map_msi()
1997 hid->desc = comp.int_desc; in vmbus_pcib_map_msi()
1998 TAILQ_INSERT_TAIL(&hpdev->irq_desc_list, hid, link); in vmbus_pcib_map_msi()