aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/devices
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2013-05-24 18:55:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-24 19:22:51 -0400
commit1ccc819da6fda9bee10ab8b72e9adbb5ad3e4959 (patch)
treeffe3a4cc65e4061d78cc093c705b39321a059e95 /drivers/rapidio/devices
parentfb09c3733a94b5f1dba50359d09c9e217c763fb9 (diff)
rapidio/tsi721: fix bug in MSI interrupt handling
Fix bug in MSI interrupt handling which causes loss of event notifications. Typical indication of lost MSI interrupts are stalled message and doorbell transfers between RapidIO endpoints. To avoid loss of MSI interrupts all interrupts from the device must be disabled on entering the interrupt handler routine and re-enabled when exiting it. Re-enabling device interrupts will trigger new MSI message(s) if Tsi721 registered new events since entering interrupt handler routine. This patch is applicable to kernel versions starting from v3.2. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/devices')
-rw-r--r--drivers/rapidio/devices/tsi721.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 6faba406b6e9..a8b2c23a7ef4 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -471,6 +471,10 @@ static irqreturn_t tsi721_irqhandler(int irq, void *ptr)
471 u32 intval; 471 u32 intval;
472 u32 ch_inte; 472 u32 ch_inte;
473 473
474 /* For MSI mode disable all device-level interrupts */
475 if (priv->flags & TSI721_USING_MSI)
476 iowrite32(0, priv->regs + TSI721_DEV_INTE);
477
474 dev_int = ioread32(priv->regs + TSI721_DEV_INT); 478 dev_int = ioread32(priv->regs + TSI721_DEV_INT);
475 if (!dev_int) 479 if (!dev_int)
476 return IRQ_NONE; 480 return IRQ_NONE;
@@ -560,6 +564,14 @@ static irqreturn_t tsi721_irqhandler(int irq, void *ptr)
560 } 564 }
561 } 565 }
562#endif 566#endif
567
568 /* For MSI mode re-enable device-level interrupts */
569 if (priv->flags & TSI721_USING_MSI) {
570 dev_int = TSI721_DEV_INT_SR2PC_CH | TSI721_DEV_INT_SRIO |
571 TSI721_DEV_INT_SMSG_CH | TSI721_DEV_INT_BDMA_CH;
572 iowrite32(dev_int, priv->regs + TSI721_DEV_INTE);
573 }
574
563 return IRQ_HANDLED; 575 return IRQ_HANDLED;
564} 576}
565 577