]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/pci/host/pci-hyperv.c
Merge tag 'pci-v4.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[mirror_ubuntu-hirsute-kernel.git] / drivers / pci / host / pci-hyperv.c
index aba041438566944c7be46dcd21fdc2b0476a87f4..0fe3ea164ee53321b2a23aded63eeac6c68684fa 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 #include <linux/semaphore.h>
 #include <linux/irqdomain.h>
 #include <asm/irqdomain.h>
@@ -1113,7 +1114,12 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
                goto free_int_desc;
        }
 
-       wait_for_completion(&comp.comp_pkt.host_event);
+       /*
+        * Since this function is called with IRQ locks held, can't
+        * do normal wait for completion; instead poll.
+        */
+       while (!try_wait_for_completion(&comp.comp_pkt.host_event))
+               udelay(100);
 
        if (comp.comp_pkt.completion_status < 0) {
                dev_err(&hbus->hdev->device,