Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers
From: Simon Horman <horms@verge.net.au>
Date: 2011-08-19 03:30:55
Also in:
linux-mmc
On Fri, Aug 19, 2011 at 12:09:50PM +0900, Magnus Damm wrote:
On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman [off-list ref] wrote:quoted
Provide separate interrupt handlers which may be used by platforms where SDHI has three interrupt sources. This patch also removes the commented-out handling of CRC and other errors. Cc: Guennadi Liakhovetski <redacted> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> ---quoted
+irqreturn_t tmio_mmc_irq(int irq, void *devid) +{ + struct tmio_mmc_host *host = devid; + unsigned int ireg, status; + + pr_debug("MMC IRQ begin\n"); + + tmio_mmc_card_irq_status(host, &ireg, &status); + if (__tmio_mmc_card_detect_irq(host, ireg, status)) + return IRQ_HANDLED; + if (__tmio_mmc_sdcard_irq(host, ireg, status)) + return IRQ_HANDLED; + + tmio_mmc_sdio_irq(irq, devid); -out: return IRQ_HANDLED; } EXPORT_SYMBOL(tmio_mmc_irq);Is there any particular reason for returning early in this interrupt handler? By returning early I mean the "if ... return IRQ_HANDLED" cases above. I realize the old ISR code in the driver does just this, so if the goal is to stay compatible then I guess we should keep this behavior.quoted
From my point of view it usually makes more sense to try to handle allevents that may be associated with the IRQ.
My original post had the behaviour that you suggest but Guennadi indicted that he would be much more comfortable with keeping the original behaviour as it is know to work on a wide range of hardware.