Re: [PATCH] V4L/DVB: saa7146: IRQF_DISABLED causes only trouble

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

 



On Sun, 2010-03-21 at 21:08 +0100, Bjørn Mork wrote:
> As discussed many times, e.g. in http://lkml.org/lkml/2007/7/26/401
> mixing IRQF_DISABLED with IRQF_SHARED just doesn't make sense.
> 
> Remove IRQF_DISABLED to avoid random unexpected behaviour.
> 
> Ever since I started using the saa7146 driver, I've had occasional
> soft lockups.  I do not have any real evidence that the saa7146
> driver is the cause, but the lockups are gone after removing the
> IRQF_DISABLED flag from this driver.
> 
> On my system, this driver shares an irq17 with the pata_jmicron
> driver:
> 
>  17:       2115      10605    9422844    8193902   IO-APIC-fasteoi   pata_jmicron, saa7146 (0)
> 
> This may be a mitigating factor.
> 
> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
> Cc: stable@xxxxxxxxxx

And here are some more recent discussions:

http://lkml.org/lkml/2009/11/30/215
http://lkml.org/lkml/2009/3/2/33
http://lkml.org/lkml/2009/3/2/225
http://www.mail-archive.com/ivtv-devel@xxxxxxxxxxxxxx/msg06319.html
http://www.mail-archive.com/ivtv-devel@xxxxxxxxxxxxxx/msg06362.html

And the ones on the LKML seem prettry inconclusive to me.


If the saa7146 driver was registered second, then this change should
have no effect on your system.

If the saa7146 driver was registered first, then this can cause the
saa7146 driver's interrupt handler to be interrupted.  I doubt the
saa7146 driver is prepared for this contingency.

I doubt that this is the "proper" fix for your problem.


Does the "soft lockup" put an Oops or BUG message in dmesg
or /var/log/messages? 

What precisely do you mean by "soft lockup"?

Regards,
Andy

> ---
>  drivers/media/common/saa7146_core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
> index 982f000..038dcc8 100644
> --- a/drivers/media/common/saa7146_core.c
> +++ b/drivers/media/common/saa7146_core.c
> @@ -416,7 +416,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
>  	saa7146_write(dev, MC2, 0xf8000000);
>  
>  	/* request an interrupt for the saa7146 */
> -	err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED | IRQF_DISABLED,
> +	err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED,
>  			  dev->name, dev);
>  	if (err < 0) {
>  		ERR(("request_irq() failed.\n"));

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux