lkml.org 
[lkml]   [2000]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.2.15 driver OK on UP - no ints on SMP (SOLVED)

On Tue, 4 Jul 2000, Alan Cox wrote:

> > compiled as SMP the driver never sees any interrupts. These tests are
> > all done on a dual PIII machine. Also I notice via cat /proc/interrupts
> > that irq 10 is edge triggered, and other interrupts on PCI interfaces
> > (like DEC tulip) are level, is this a clue?
>
> That sounds like the IRQ routing tables on the machine are wrong - either
> because the card and bios dont get on or due to a straight forward bios bug
>

Thanks to all who responded.

I was initially confused by the fact that my driver works OK in UP but not
in SMP. During my analysis of the problem, comparing all info about which
irq was being used, I found a discrepancy between the irq shown by "cat
/proc/pci" and the irq my driver found by pci_read_config_byte(dev,
PCI_INTERRUPT_LINE, &irq). The irq reported by the pci_read_config*
call was 10, the proc/pci reported 19. I'm not yet sure why this is but
it may be due to the PCI interface chip on the board (PLX9080). In any
case, it is working now.

Thought you might be interested in the resolution, I always am.

I am now wondering how this all works. It was my understanding that BIOS
checks PCI devices on power-up and allocates memory addresses and irqs.
These allocations are written into the PCI configuration registers on each
board/device. Drivers are written to query these configuration regs
via the pci_read_config* calls. BIOS can have no knowledge of whether
the O/S will run in UP or SMP (i.e. use the IO-APIC).

So how can my driver my driver work fine in UP and not in SMP when
using the pci_read_config* calls?

My workaround is to use
struct pci_dev *dev;
and when pci_find_device() inits dev, I use dev->irq instead of
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);

Can anyone explain this?

Wm


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.435 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site