lkml.org 
[lkml]   [2006]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: de2104x: interrupts before interrupt handler is registered
linux-os (Dick Johnson) wrote:
> Thinking that a device powers ON in a stable state is naive.

I don't think so.. if you build a device that connects to the PCI bus it
had better come up in a stable state if it wants to be compliant with
the spec. That's what the reset line and power-up reset interval is for.

> Many
> complex devices will have FPGA devices with floating pins that don't
> become stable until their contents are loaded serially. Others will
> have IRQ requests based upon power-on states that need to be cleared
> with a software reset. One can't issue a software reset until the
> device is enabled and enabling the device may generate interrupts
> with no handler in place so you have a "can't get there from here"
> problem.

You still aren't seeing my point. Why does enabling the device BARs
cause the device to generate interrupts? And if there's something you
need to do to prevent the device from generating interrupts, how can you
do it without enabling the device?

Also, the device's ISR must clear the condition which is causing the
interrupt, otherwise interrupt storms will result. If your device can
enter a state where the interrupt cannot be reliably cleared, how can
you possibly comply with this?

> Linux-2.4.x had IRQs that were stable. One could put
> a handler in place that would handle the possible burst of interrupts
> upon startup. Then this was changed so the IRQ value is wrong
> until an unrelated and illogical event occurs. Now, you need to
> make work-arounds that were never before necessary. My request
> to fix this fell upon deaf ears.

I don't think any workarounds are needed except for devices that don't
comply with the spec. Asserting interrupts that have not been
specifically enabled by the driver would meet that definition in my
view. If a device happens to do this then maybe a workaround would be
needed, but that's what it would be, a workaround for a broken device.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/

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

\
 
 \ /
  Last update: 2006-03-08 01:03    [from the cache]
©2003-2011 Jasper Spaans