Re: [PATCH] sc16is7xx: Enable shared interrupts.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  6 Nov 2015 16:48:20 +0100, Maarten Brock wrote:
> Enable shared interrupts for the sc16is7xx serial driver.
> 
> Signed-off-by: Maarten Brock <m.brock@xxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/sc16is7xx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> index 72ffd0d..13f5f69 100644
> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -1230,7 +1230,8 @@ static int sc16is7xx_probe(struct device *dev,
>  
>  	/* Setup interrupt */
>  	ret = devm_request_irq(dev, irq, sc16is7xx_irq,
> -			       IRQF_ONESHOT | flags, dev_name(dev), s);
> +			       IRQF_SHARED | IRQF_ONESHOT | flags,
> +			       dev_name(dev), s);
>  	if (!ret)
>  		return 0;
>  

The reason why shared IRQs were not enabled is that we cannot read
the status register from IRQ handler and therefore cannot decide if
the interrupt was actually ours (we always return IRQ_HANDLED).  Would
you consider setting the IRQF_SHARED in your device tree instead of
changing the default?

Also I just noticed I forgot to drop the ONESHOT flag which I think
makes no sense for non-threaded interrupts.  You can remove it if you
care.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux