mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Noah Misch <noah@cs.caltech.edu>
Cc: linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.13-rc3] pcmcia: pcmcia_request_irq for !IRQ_HANDLE_PRESENT
Date: Sat, 23 Jul 2005 22:11:13 +0200	[thread overview]
Message-ID: <20050723201113.GA12537@dominikbrodowski.de> (raw)
In-Reply-To: <20050717035124.GC13529@orchestra.cs.caltech.edu>

Hi,

> When a driver calls pcmcia_request_irq with IRQ_HANDLE_PRESENT unset, it looks
> for an open IRQ by request_irq()ing with a dummy handler and NULL dev_info.
> free_irq uses dev_info as a key for identifying the handler to free among those
> sharing an IRQ, so request_irq returns -EINVAL if dev_info is NULL and the IRQ
> may be shared.  That unknown error code is the -EINVAL.
> 
> It looks like only pcnet_cs and axnet_cs are affected.  Most other drivers let
> pcmcia_request_irq install their interrupt handlers.  sym53c500_cs requests its
> IRQ manually, but it cannot share an IRQ.
> 
> The appended patch changes pcmcia_request_irq to pass an arbitrary, unique,
> non-NULL dev_info with the dummy handler.

Thanks for the excellent debugging. Your patch seems to work, however it
might be better to do just this:

Index: 2.6.13-rc3-git2/drivers/pcmcia/pcmcia_resource.c
===================================================================
--- 2.6.13-rc3-git2.orig/drivers/pcmcia/pcmcia_resource.c
+++ 2.6.13-rc3-git2/drivers/pcmcia/pcmcia_resource.c
@@ -800,7 +800,7 @@ int pcmcia_request_irq(struct pcmcia_dev
 	} else {
 		int try;
 		u32 mask = s->irq_mask;
-		void *data = NULL;
+		void *data = test_action;
 
 		for (try = 0; try < 64; try++) {
 			irq = try % 32;


Thanks,
	Dominik

  reply	other threads:[~2005-07-23 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-17  3:51 Noah Misch
2005-07-23 20:11 ` Dominik Brodowski [this message]
2005-07-24 11:40   ` Russell King
2005-07-24 20:02     ` Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050723201113.GA12537@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=noah@cs.caltech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®