This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Question about cyg_pci_translate_interrupt
- From: Mark Salter <msalter at redhat dot com>
- To: David Brennan <eCos at brennanhome dot com>
- Cc: eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 08 Oct 2004 08:28:25 -0400
- Subject: Re: [ECOS] Question about cyg_pci_translate_interrupt
- Organization: Red Hat Inc.
- References: <4164AA1F.2050303@brennanhome.com>
On Wed, 2004-10-06 at 22:29, David Brennan wrote:
> Is this function allowed to be called multiple times? I have a
> particular device for which the driver is broken into two modules. Each
> uses the standard pci probe and print logic from the pci1 test file. The
> interrupt routine gets attached by the second module. However, when I
> got the latest CVS, the device now reports to the second module that it
> does not generate interrupts. I assume the problem was introduced with
> this change
> (http://sources.redhat.com/ml/ecos-patches/2004-08/msg00080.html). And I
> can re-write my code (basically not check the interrupt vector in the
> first module) to work. But wanted to make sure that was a desired effect
> of the change. The problem may also be my specific device, in which case
> it make perfect sense for me to solve it on my end.
>
There should be no problem in calling cyg_pci_translate_interrupt
more than once. I tried it on a number of devices and it seems to
work fine. You may be dealing with a device which modifies its
interrupt pin register when the interrupt line register is written.
I can't find anything in the standard which would support this
behavior though. The actual translation is done by the HAL, so
there may be issues with the particular HAL you are using. If a
workaround is needed, it should be in that HAL code, not the drivers.
--Mark
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss