Commit 73f9d364 authored by Nathan Fontenot's avatar Nathan Fontenot Committed by David S. Miller

ibmvnic: Only do H_EOI for mobility events

When enabling the sub-CRQ IRQ a previous update sent a H_EOI prior
to the enablement to clear any pending interrupts that may be present
across a partition migration. This fixed a firmware bug where a
migration could erroneously indicate that a H_EOI was pending.

The H_EOI should only be sent when enabling during a mobility
event though. Doing so at other time could wrong and can produce
extra driver output when IRQs are enabled when doing TX completion.
Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab1f1786
...@@ -2617,18 +2617,21 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter, ...@@ -2617,18 +2617,21 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter,
{ {
struct device *dev = &adapter->vdev->dev; struct device *dev = &adapter->vdev->dev;
unsigned long rc; unsigned long rc;
u64 val;
if (scrq->hw_irq > 0x100000000ULL) { if (scrq->hw_irq > 0x100000000ULL) {
dev_err(dev, "bad hw_irq = %lx\n", scrq->hw_irq); dev_err(dev, "bad hw_irq = %lx\n", scrq->hw_irq);
return 1; return 1;
} }
val = (0xff000000) | scrq->hw_irq; if (adapter->resetting &&
adapter->reset_reason == VNIC_RESET_MOBILITY) {
u64 val = (0xff000000) | scrq->hw_irq;
rc = plpar_hcall_norets(H_EOI, val); rc = plpar_hcall_norets(H_EOI, val);
if (rc) if (rc)
dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n", dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n",
val, rc); val, rc);
}
rc = plpar_hcall_norets(H_VIOCTL, adapter->vdev->unit_address, rc = plpar_hcall_norets(H_VIOCTL, adapter->vdev->unit_address,
H_ENABLE_VIO_INTERRUPT, scrq->hw_irq, 0, 0); H_ENABLE_VIO_INTERRUPT, scrq->hw_irq, 0, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment