[linux,dev-4.7,v2,2/4] drivers/fsi: Look for Hub sourced IRQs

Submitted by Christopher Bostic on April 10, 2017, 9:26 p.m.

Details

Message ID 20170410212651.65499-3-cbostic@linux.vnet.ibm.com
State Rejected, archived
Headers show

Commit Message

Christopher Bostic April 10, 2017, 9:26 p.m.
In addition to looking for local device IRQs on the slave also
check if the IRQ came from a hub source in the interrupt handler.

Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
---
 drivers/fsi/fsi-core.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
index 36dde94..45e1171 100644
--- a/drivers/fsi/fsi-core.c
+++ b/drivers/fsi/fsi-core.c
@@ -98,6 +98,11 @@  static int fsi_slave_write(struct fsi_slave *slave, uint32_t addr,
 #define FSI_SI1S		0x1C	/* R: IRQ status */
 
 /*
+ * SI1S, SI1M fields
+ */
+#define FSI_SI1_HUB_SRC		0x00100000	/* hub IRQ source */
+
+/*
  * SMODE fields
  */
 #define	FSI_SMODE_WSC		0x80000000	/* Warm start done */
@@ -793,6 +798,13 @@  static int __fsi_dev_irq(struct device *dev, void *data)
 		return 1;
 	}
 
+	if (!(*si1s & FSI_SI1_HUB_SRC)) {
+		dev_dbg(dev, "IRQ not from a hub source\n");
+		return 0;
+	}
+
+	/* TODO: handle hub sourced IRQ */
+
 	return 0;
 }