linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: PCI interrupts
@ 2001-11-06  8:57 Zwane Mwaikambo
  0 siblings, 0 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2001-11-06  8:57 UTC (permalink / raw)
  To: matt; +Cc: linux-kernel

Matthew Clark said...
>(b) if it shouldn't have a unique number do I have to share the
>interrupt (with the usb controller) or can I change it to
>another address (by writing to the config space?)?
>If I have to share it how do I do this- (my card will generate a
>lot of interrupt traffic)?.
Assuming i386

>From my limited knowledge about the IRQ handling subsystems, you would
call arch/i386/irq.c:request_irq() with the appropriate flags, ie
SA_SHIRQ and any others you may require. I *think* you might also be able
to do dev->irq = irq_num and then do your request_irq() but you might
require a bit of voodoo inbetween.

Regards,
	Zwane Mwaikambo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI interrupts
  2001-11-05 23:43 Matthew Clark
  2001-11-05 23:57 ` Alan Cox
@ 2001-11-06 14:37 ` Tommy Reynolds
  1 sibling, 0 replies; 4+ messages in thread
From: Tommy Reynolds @ 2001-11-06 14:37 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

It was a dark and stormy night.  Suddenly "Matthew Clark" <matt@eee.nott.ac.uk> wrote:

> In my development system the PCI card I am developing  the
> driver for reports (from the PCI config region) that it is using
> interrupt 5.  I can't register this interrupt as it is already
> in use by the USB controller.

PCI interrupts can be shared, but every handler must be registered with the
SA_SHIRQ flag on the request_irq() call.  Both the request_irq() and free_irq()
routines need a "dev_id" cookie to uniquely identify your instance of the
interrurpt handler.

You can see shared interrupts in "/proc/interrupts" because there will be a
comma-separated list of handler names for each IRQ level.

---------------------------------------------+-----------------------------
Tommy Reynolds                               | mailto: <reynolds@redhat.com>
Red Hat, Inc., Embedded Development Services | Phone:  +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA  | FAX:    +1.256.837.3839
Senior Software Developer                    | Mobile: +1.919.641.2923

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PCI interrupts
  2001-11-05 23:43 Matthew Clark
@ 2001-11-05 23:57 ` Alan Cox
  2001-11-06 14:37 ` Tommy Reynolds
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2001-11-05 23:57 UTC (permalink / raw)
  To: Matthew Clark; +Cc: linux-kernel

> In my development system the PCI card I am developing  the
> driver for reports (from the PCI config region) that it is using
> interrupt 5.  I can't register this interrupt as it is already
> in use by the USB controller.

PCI interrupts are shared, and must be sharable. Generally the bus wiring
determines what gets shared

^ permalink raw reply	[flat|nested] 4+ messages in thread

* PCI interrupts
@ 2001-11-05 23:43 Matthew Clark
  2001-11-05 23:57 ` Alan Cox
  2001-11-06 14:37 ` Tommy Reynolds
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Clark @ 2001-11-05 23:43 UTC (permalink / raw)
  To: linux-kernel


Dear kernel list,

I am writing a dev driver for a pci device and I am having some
difficultly getting the interrupts line.

As far as I understood the BIOS / kernel would sort out a unique
interrupt line for me which I could then get by registering with
the system.

In my development system the PCI card I am developing  the
driver for reports (from the PCI config region) that it is using
interrupt 5.  I can't register this interrupt as it is already
in use by the USB controller.


(a) should my card have a unique number- if so what should I
do?

(b) if it shouldn't have a unique number do I have to share the
interrupt (with the usb controller) or can I change it to
another address (by writing to the config space?)?
If I have to share it how do I do this- (my card will generate a
lot of interrupt traffic)?.

I have free interrupts and would prefer not to share the
interrrupt for this device.

Any help / suggestions gratefully received-

apologies if this is in the wrong place--


Thanks matt


snippet from lspci -v
.....
00:1f.2 USB Controller: Intel Corporation 82801AA USB (rev 02)
(prog-if 00 [UHCI])
        Subsystem: Intel Corporation 82801AA USB
        Flags: bus master, medium devsel, latency 0, IRQ 5
......
01:05.0 DMA controller: PLX Technology, Inc. PCI <-> IOBus
Bridge (rev 02) (prog-if 00 [8237])
        Subsystem: PLX Technology, Inc. PCI <-> IOBus Bridge
        Flags: medium devsel, IRQ 5
......
Ignore the PLX PCI id- the card developers didn't get their own
number.....


cat /proc/interrupts

           CPU0
  0:    2099604          XT-PIC  timer
  1:       3541          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:         11          XT-PIC  serial
  4:       1537          XT-PIC  serial
  5:          0          XT-PIC  usb-uhci
  8:          1          XT-PIC  rtc
 11:     196886          XT-PIC  eth0, i810@PCI:0:1:0
 14:      13005          XT-PIC  ide0
 15:          0          XT-PIC  ide1
NMI:          0
ERR:          0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-06 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-06  8:57 PCI interrupts Zwane Mwaikambo
  -- strict thread matches above, loose matches on Subject: below --
2001-11-05 23:43 Matthew Clark
2001-11-05 23:57 ` Alan Cox
2001-11-06 14:37 ` Tommy Reynolds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).