From: Daniel Ritz <daniel.ritz@gmx.ch>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org,
Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: fix suspend/resume irq request free for yenta..
Date: Sun, 24 Jul 2005 01:46:29 +0200 [thread overview]
Message-ID: <200507240146.30670.daniel.ritz@gmx.ch> (raw)
hi
the patch is wrong. yenta_request_irq() registers the wrong handler.
plus yenta_probe_cb_irq() has nothing to do with suspend/resume
(besides it frees the irq in the very same function). correct patch below.
somebody cares to explain me why the free_irq() is necessary before
a suspend?
rgds
-daniel
---------------
[PATCH] yenta: free_irq() on suspend.
Resume doesn't seem to work without.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -1107,6 +1107,8 @@ static int yenta_dev_suspend (struct pci
pci_read_config_dword(dev, 17*4, &socket->saved_state[1]);
pci_disable_device(dev);
+ free_irq(dev->irq, socket);
+
/*
* Some laptops (IBM T22) do not like us putting the Cardbus
* bridge into D3. At a guess, some other laptop will
@@ -1132,6 +1134,13 @@ static int yenta_dev_resume (struct pci_
pci_enable_device(dev);
pci_set_master(dev);
+ if (socket->cb_irq)
+ if (request_irq(socket->cb_irq, yenta_interrupt,
+ SA_SHIRQ, "yenta", socket)) {
+ printk(KERN_WARNING "Yenta: request_irq() failed on resume!\n");
+ socket->cb_irq = 0;
+ }
+
if (socket->type && socket->type->restore_state)
socket->type->restore_state(socket);
}
next reply other threads:[~2005-07-23 23:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-23 23:46 Daniel Ritz [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-26 5:44 fix suspend/resume irq request free for yenta Brown, Len
2005-07-22 22:33 Dave Airlie
2005-07-22 23:16 ` Dmitry Torokhov
2005-07-23 0:29 ` Pavel Machek
2005-07-23 7:40 ` Russell King
2005-07-23 15:41 ` Zwane Mwaikambo
2005-07-23 22:40 ` Dave Airlie
2005-07-24 8:19 ` Russell King
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=200507240146.30670.daniel.ritz@gmx.ch \
--to=daniel.ritz@gmx.ch \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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