Skip to content

Commit 635416e

Browse files
Alan-CoxDominik Brodowski
authored andcommitted
pcmcia: irq probe can be done without risking an IRQ storm
Nowdays you can ask for an IRQ to be allocated but not enabled, when PCMCIA was written this was not true and this feature is thus not used [linux@dominikbrodowski.net: add comment and ifdef to avoid compilation breakage at least on alpha] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
1 parent 05f43d4 commit 635416e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎drivers/pcmcia/pcmcia_resource.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,15 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
812812
type = IRQF_SHARED;
813813

814814
#ifdef CONFIG_PCMCIA_PROBE
815+
816+
#ifdef IRQ_NOAUTOEN
817+
/* if the underlying IRQ infrastructure allows for it, only allocate
818+
* the IRQ, but do not enable it
819+
*/
820+
if (!(req->Attributes & IRQ_HANDLE_PRESENT))
821+
type |= IRQ_NOAUTOEN;
822+
#endif /* IRQ_NOAUTOEN */
823+
815824
if (s->irq.AssignedIRQ != 0) {
816825
/* If the interrupt is already assigned, it must be the same */
817826
irq = s->irq.AssignedIRQ;

0 commit comments

Comments
 (0)