From: Russell King <rmk@arm.linux.org.uk>
To: Eivind Tagseth <eivindt@multinet.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Problems with PCMCIA Compact Flash adapter in 2.5.72
Date: Mon, 23 Jun 2003 10:29:41 +0100 [thread overview]
Message-ID: <20030623102941.D23411@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030622191626.GA1811@tagseth-trd.consultit.no>; from eivindt@multinet.no on Sun, Jun 22, 2003 at 09:16:27PM +0200
On Sun, Jun 22, 2003 at 09:16:27PM +0200, Eivind Tagseth wrote:
> However, removing the card causes a kernel panic, and everything completely
> freezes. This also happened with 2.5.69, so it's not caused by a recent
> change.
ide-cs currently calls ide_unregister from interrupt context, which is
a big nono. Can you try the following patch please (which is completely
untested)?
--- orig/drivers/ide/legacy/ide-cs.c Sat Jun 14 22:33:52 2003
+++ linux/drivers/ide/legacy/ide-cs.c Mon Jun 23 10:27:20 2003
@@ -92,7 +92,7 @@
int hd;
} ide_info_t;
-static void ide_release(u_long arg);
+static void ide_release(dev_link_t *link);
static int ide_event(event_t event, int priority,
event_callback_args_t *args);
@@ -126,9 +126,6 @@
memset(info, 0, sizeof(*info));
link = &info->link; link->priv = info;
- init_timer(&link->release);
- link->release.function = &ide_release;
- link->release.data = (u_long)link;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
link->io.IOAddrLines = 3;
@@ -187,9 +184,8 @@
if (*linkp == NULL)
return;
- del_timer(&link->release);
if (link->state & DEV_CONFIG)
- ide_release((u_long)link);
+ ide_release(link);
if (link->handle) {
ret = CardServices(DeregisterClient, link->handle);
@@ -383,7 +379,7 @@
cs_failed:
cs_error(link->handle, last_fn, last_ret);
failed:
- ide_release((u_long)link);
+ ide_release(link);
link->state &= ~DEV_CONFIG_PENDING;
} /* ide_config */
@@ -396,9 +392,8 @@
======================================================================*/
-void ide_release(u_long arg)
+void ide_release(dev_link_t *link)
{
- dev_link_t *link = (dev_link_t *)arg;
ide_info_t *info = link->priv;
DEBUG(0, "ide_release(0x%p)\n", link);
@@ -446,7 +441,7 @@
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG)
- mod_timer(&link->release, jiffies + HZ/20);
+ ide_release(link);
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-06-23 9:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-20 8:18 Problems with PCMCIA Compact Flash adapter in 2.5.72 Eivind Tagseth
2003-06-20 17:50 ` Bill Davidsen
2003-06-20 20:08 ` Russell King
2003-06-20 20:16 ` Russell King
2003-06-22 11:46 ` Eivind Tagseth
2003-06-22 13:15 ` Russell King
2003-06-22 18:28 ` Eivind Tagseth
2003-06-22 19:16 ` Eivind Tagseth
2003-06-23 9:29 ` Russell King [this message]
2003-06-23 11:33 ` Alan Cox
2003-06-24 8:50 ` Eivind Tagseth
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=20030623102941.D23411@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=eivindt@multinet.no \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.