HI Mark, > -----Original Message----- > From: Mark Brown [mailto:broo...@kernel.org] > Sent: Tuesday, March 18, 2014 6:04 PM > To: Harini Katakam > Cc: robh...@kernel.org; pawel.m...@arm.com; mark.rutl...@arm.com; > ijc+devicet...@hellion.org.uk; ga...@codeaurora.org; r...@landley.net; > grant.lik...@linaro.org; devicet...@vger.kernel.org; linux- > d...@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > s...@vger.kernel.org; Michal Simek > Subject: Re: [PATCH] SPI: Add driver for Cadence SPI controller > > On Tue, Mar 18, 2014 at 12:13:45PM +0000, Harini Katakam wrote: > > > > > > In this case both possible interrupt conditions are handled. > > > > Are you sure that's the case, and even if you are that's still not > > > handling the case where the device isn't flagging an interrupt at all. > > > The IXR_ALL mask is only used to disable all the interrupts in the > beginning. > > These two are the only interrupts enabled. > > And RXNEMPTY status is just polled. That interrupt is not enabled either > > This is all going to be fragile in the face of bugs or changes in the > code though and like I keep saying it doesn't handle interrupt sharing.
OK. I dint consider interrupt sharing. Do you think the following implementation would be better? status = IRQ_NONE; if (intr_status & CDNS_SPI_IXR_MODF_MASK) { /* Handle this interrupt here */ status = IRQ_HANDLED; } else if (intr_status & CDNS_SPI_IXR_TXOW_MASK) { /* Handle this interrupt here */ status = IRQ_HANDLED; } return status; Regards, Harini -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/