diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-09-07 21:23:59 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-09-07 21:23:59 +0300 |
commit | b7c19476bd80183f105c6aa22d2bbad1ecd26a2e (patch) | |
tree | 465c32893639c462ab77e38164e698b654f8302a /drivers/pci | |
parent | 6238e057d4056015f757956b0046fca8a64d8cfa (diff) | |
parent | 80bfeeb9dd6b54ac108c884c792f0fc7d4912bee (diff) | |
download | linux-b7c19476bd80183f105c6aa22d2bbad1ecd26a2e.tar.xz |
Merge branch 'pci/host-hv' into next
* pci/host-hv:
PCI: hv: Do not sleep in compose_msi_msg()
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-hyperv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 415dcc69a502..334c9a7b8991 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c @@ -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> @@ -1159,7 +1160,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, |