Lines Matching defs:hdev

497 	struct hv_device *hdev;
634 dev_warn(&hbus->hdev->device, "%s() can not unmask irq %u\n",
647 params->device_id = (hbus->hdev->dev_instance.b[5] << 24) |
648 (hbus->hdev->dev_instance.b[4] << 16) |
649 (hbus->hdev->dev_instance.b[7] << 8) |
650 (hbus->hdev->dev_instance.b[6] & 0xf8) |
722 dev_err(&hbus->hdev->device,
985 static int wait_for_response(struct hv_device *hdev,
989 if (hdev->channel->rescind) {
990 dev_warn_once(&hdev->device, "The device is gone.\n");
1119 struct device *dev = &hbus->hdev->device;
1191 struct device *dev = &hbus->hdev->device;
1237 struct device *dev = &hbus->hdev->device;
1454 ret = vmbus_sendpacket(hbus->hdev->channel, read_blk,
1461 ret = wait_for_response(hbus->hdev, &comp_pkt.comp_pkt.host_event);
1467 dev_err(&hbus->hdev->device,
1544 ret = vmbus_sendpacket(hbus->hdev->channel, write_blk, pkt_size,
1550 ret = wait_for_response(hbus->hdev, &comp_pkt.host_event);
1555 dev_err(&hbus->hdev->device,
1614 vmbus_sendpacket(hpdev->hbus->hdev->channel, int_pkt, sizeof(*int_pkt),
1868 channel = hbus->hdev->channel;
1956 dev_err(&hbus->hdev->device,
1961 ret = vmbus_sendpacket_getid(hpdev->hbus->hdev->channel, &ctxt.int_pkts,
1966 dev_err(&hbus->hdev->device,
1987 dev_err_once(&hbus->hdev->device,
2013 dev_err(&hbus->hdev->device,
2102 dev_err(&hbus->hdev->device,
2166 dev_err(&hbus->hdev->device,
2401 bridge->dev.parent = &hbus->hdev->device;
2444 dev_err(&completion->hpdev->hbus->hdev->device,
2496 ret = vmbus_sendpacket(hbus->hdev->channel, res_req,
2504 if (wait_for_response(hbus->hdev, &comp_pkt.host_event))
2641 dev_err(&hbus->hdev->device,
2715 dev_info(&hbus->hdev->device,
2873 vmbus_sendpacket(hbus->hdev->channel, ejct_pkt,
2898 struct hv_device *hdev = hbus->hdev;
2901 dev_info(&hdev->device, "PCI VMBus EJECT: ignored\n");
2922 struct vmbus_channel *chan = hbus->hdev->channel;
2976 dev_err(&hbus->hdev->device,
3007 dev_err(&hbus->hdev->device,
3022 dev_err(&hbus->hdev->device,
3034 dev_err(&hbus->hdev->device,
3050 dev_err(&hbus->hdev->device,
3067 dev_warn(&hbus->hdev->device,
3075 dev_err(&hbus->hdev->device,
3087 * @hdev: VMBus's tracking struct for this root PCI bus.
3104 static int hv_pci_protocol_negotiation(struct hv_device *hdev,
3108 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3133 ret = vmbus_sendpacket(hdev->channel, version_req,
3138 ret = wait_for_response(hdev, &comp_pkt.host_event);
3141 dev_err(&hdev->device,
3149 dev_info(&hdev->device,
3156 dev_err(&hdev->device,
3166 dev_err(&hdev->device,
3232 ret = vmbus_allocate_mmio(&hbus->low_mmio_res, hbus->hdev, 0,
3237 dev_err(&hbus->hdev->device,
3251 ret = vmbus_allocate_mmio(&hbus->high_mmio_res, hbus->hdev,
3256 dev_err(&hbus->hdev->device,
3296 ret = vmbus_allocate_mmio(&hbus->mem_config, hbus->hdev, 0, -1,
3319 static int hv_pci_bus_exit(struct hv_device *hdev, bool keep_devs);
3323 * @hdev: VMBus's tracking struct for this root PCI bus
3327 static int hv_pci_enter_d0(struct hv_device *hdev)
3329 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3354 ret = vmbus_sendpacket(hdev->channel, d0_entry, sizeof(*d0_entry),
3358 ret = wait_for_response(hdev, &comp_pkt.host_event);
3373 dev_err(&hdev->device, "Retrying D0 Entry\n");
3385 ret = hv_pci_bus_exit(hdev, true);
3391 dev_err(&hdev->device,
3396 dev_err(&hdev->device,
3413 * @hdev: VMBus's tracking struct for this root PCI bus
3417 static int hv_pci_query_relations(struct hv_device *hdev)
3419 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3432 ret = vmbus_sendpacket(hdev->channel, &message, sizeof(message),
3435 ret = wait_for_response(hdev, &comp);
3460 * @hdev: VMBus's tracking struct for this root PCI bus
3475 static int hv_send_resources_allocated(struct hv_device *hdev)
3477 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3521 ret = vmbus_sendpacket(hdev->channel, &pkt->message,
3526 ret = wait_for_response(hdev, &comp_pkt.host_event);
3532 dev_err(&hdev->device,
3548 * @hdev: VMBus's tracking struct for this root PCI bus
3552 static int hv_send_resources_released(struct hv_device *hdev)
3554 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3571 ret = vmbus_sendpacket(hdev->channel, &pkt, sizeof(pkt), 0,
3628 * @hdev: VMBus's tracking struct for this root PCI bus
3633 static int hv_pci_probe(struct hv_device *hdev,
3642 bridge = devm_pci_alloc_host_bridge(&hdev->device, 0);
3668 dom_req = hdev->dev_instance.b[5] << 8 | hdev->dev_instance.b[4];
3672 dev_err(&hdev->device,
3679 dev_info(&hdev->device,
3695 hbus->sysdata.parent = hdev->device.parent;
3699 hbus->hdev = hdev;
3711 hdev->channel->next_request_id_callback = vmbus_next_request_id;
3712 hdev->channel->request_addr_callback = vmbus_request_addr;
3713 hdev->channel->rqstor_size = HV_PCI_RQSTOR_SIZE;
3715 ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
3720 hv_set_drvdata(hdev, hbus);
3722 ret = hv_pci_protocol_negotiation(hdev, pci_protocol_versions,
3734 dev_err(&hdev->device,
3740 name = kasprintf(GFP_KERNEL, "%pUL", &hdev->dev_instance);
3757 ret = hv_pci_query_relations(hdev);
3763 ret = hv_pci_enter_d0(hdev);
3771 ret = hv_send_resources_allocated(hdev);
3789 (void) hv_pci_bus_exit(hdev, true);
3801 vmbus_close(hdev->channel);
3811 static int hv_pci_bus_exit(struct hv_device *hdev, bool keep_devs)
3813 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3814 struct vmbus_channel *chan = hdev->channel;
3853 ret = hv_send_resources_released(hdev);
3855 dev_err(&hdev->device,
3892 * @hdev: VMBus's tracking struct for this root PCI bus
3894 static void hv_pci_remove(struct hv_device *hdev)
3898 hbus = hv_get_drvdata(hdev);
3900 tasklet_disable(&hdev->channel->callback_event);
3902 tasklet_enable(&hdev->channel->callback_event);
3919 hv_pci_bus_exit(hdev, false);
3921 vmbus_close(hdev->channel);
3934 static int hv_pci_suspend(struct hv_device *hdev)
3936 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
3958 tasklet_disable(&hdev->channel->callback_event);
3965 tasklet_enable(&hdev->channel->callback_event);
3972 ret = hv_pci_bus_exit(hdev, true);
3976 vmbus_close(hdev->channel);
4017 static int hv_pci_resume(struct hv_device *hdev)
4019 struct hv_pcibus_device *hbus = hv_get_drvdata(hdev);
4025 hdev->channel->next_request_id_callback = vmbus_next_request_id;
4026 hdev->channel->request_addr_callback = vmbus_request_addr;
4027 hdev->channel->rqstor_size = HV_PCI_RQSTOR_SIZE;
4029 ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
4036 ret = hv_pci_protocol_negotiation(hdev, version, 1);
4040 ret = hv_pci_query_relations(hdev);
4046 ret = hv_pci_enter_d0(hdev);
4050 ret = hv_send_resources_allocated(hdev);
4065 vmbus_close(hdev->channel);