Re: better leve triggered IRQ management needed

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

 



On Saturday April 29, [email protected] wrote:
> 
> That said, I'm surprised that the kernel doesn't set ELCR for you. If it 
> sees a PCI device, it really should know that it's a PCI interrupt. I 
> wonder if we should do the following.. (Does this automatically make it do 
> the right thing on your machine?)
> 
> 			Linus
> 
> ---
> diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
> index 7323544..6e3eaef 100644
> --- a/arch/i386/pci/irq.c
> +++ b/arch/i386/pci/irq.c
> @@ -881,6 +881,7 @@ static int pcibios_lookup_irq(struct pci
>  	((!(pci_probe & PCI_USE_PIRQ_MASK)) || ((1 << irq) & mask)) ) {
>  		DBG(" -> got IRQ %d\n", irq);
>  		msg = "Found";
> +		eisa_set_level_irq(newirq);
>  	} else if (newirq && r->set && (dev->class >> 8) != PCI_CLASS_DISPLAY_VGA) {
>  		DBG(" -> assigning IRQ %d", newirq);
>  		if (r->set(pirq_router_dev, dev, pirq, newirq)) {
> -

Yes, this helps.  It sets the offending IRQ to be level triggered, so
the wireless card works nicely.

My only concern is that dmesg contains:

[354446.223241] PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0
[354446.223302] PCI: IRQ 0 for device 0000:00:04.0 doesn't match PIRQ mask - try
 pci=usepirqmask
[354446.223363] PCI: setting IRQ 0 as level-triggered
[354446.223401] PCI: Found IRQ 10 for device 0000:00:04.0
[354446.223446] PCI: Sharing IRQ 10 with 0000:00:04.1


Setting IRQ 0 to level-triggered doesn't seem healthy as it is the
timer interrupt.

It definitely gets IRQ 10 (the problematic one - 0:04 is the PCMCIA
controller) and IRQ 11 (which was already level-triggered).
e.g.


[354446.228016] PCI: setting IRQ 10 as level-triggered
[354446.228060] PCI: Found IRQ 10 for device 0000:00:04.0
[354446.228140] PCI: Sharing IRQ 10 with 0000:00:04.1
[354446.228218] PCI: Found IRQ 10 for device 0000:00:04.1
[354446.228268] PCI: Sharing IRQ 10 with 0000:00:04.0

A subsequent printout of the ELCR show the two bytes to be
 00 and 0c

representing IRQ10 and IRQ11 - so it seems the setting of IRQ-0 to
level triggered didn't have a lasting effect.

Maybe the eisa_set_level_irq should be passed 'irq' rather than
'newirq' ??

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux