[PATCH] pcmcia: defer ide-cs initialization after other IDE drivers started up [Was: Re: Heads up for distro folks: PCMCIA hotplug differences (Re: -rc4: arm broken?)]
[Posted August 3, 2005 by corbet]
| From: |
| Dominik Brodowski <linux-AT-dominikbrodowski.net> |
| To: |
| torvalds-AT-osdl.org, akpm-AT-osdl.org |
| Subject: |
| [PATCH] pcmcia: defer ide-cs initialization after other IDE drivers started up [Was: Re: Heads up for distro folks: PCMCIA hotplug differences (Re: -rc4: arm broken?)] |
| Date: |
| Mon, 1 Aug 2005 14:16:55 +0200 |
| Cc: |
| Alan Cox <alan-AT-lxorguk.ukuu.org.uk>,
Richard Purdie <rpurdie-AT-rpsys.net>,
Pavel Machek <pavel-AT-ucw.cz>,
kernel list <linux-kernel-AT-vger.kernel.org> |
| Archive-link: |
| Article,
Thread
|
On Mon, Aug 01, 2005 at 07:48:31AM +0100, Russell King wrote:
> On Mon, Aug 01, 2005 at 02:01:07AM +0100, Alan Cox wrote:
> > On Sad, 2005-07-30 at 22:36 +0100, Russell King wrote:
> > > Since PCMCIA cards are detected and drivers bound at boot time, we no
> > > longer get hotplug events to setup networking for PCMCIA network cards
> > > already inserted. Consequently, if you are relying on /sbin/hotplug to
> > > setup your PCMCIA network card at boot time, triggered by the cardmgr
> > > startup binding the driver, it won't happen.
> >
> > So eth0 now randomly changes between on board and PCMCIA depending upon
> > whether the PCMCIA card was inserted or not, and your disks re-order
> > themselves in the same situation. That'll be funny if anyone does a
> > mkswap to share their swap between Linux and Windows. Gosh look there
> > goes the root partition.
> >
> > I'm hoping thats not what you are implying. Especially for disks,
> > network is much much less of an issue.
>
> If you have the socket driver as a module, as some (most?) distros do,
> then of course such cards won't be detected at boot time. If PCMCIA
> and the socket driver are built-in, along with the card driver, then
> I guess this possibility may well exist - it does for NE2K cards.
Linus, Andrew,
Please apply this for 2.6.13 - Thanks,
Dominik
Avoid registering PCMCIA CF cards before other IDE stuff. This means the risk
of /dev/hd* being re-ordered is lessened. The _sane_ thing to assert any
ordering is to use udev, nameif and so on, of course.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Index: 2.6.13-rc4-git1/drivers/ide/legacy/ide-cs.c
===================================================================
--- 2.6.13-rc4-git1.orig/drivers/ide/legacy/ide-cs.c
+++ 2.6.13-rc4-git1/drivers/ide/legacy/ide-cs.c
@@ -508,5 +508,5 @@ static void __exit exit_ide_cs(void)
BUG_ON(dev_list != NULL);
}
-module_init(init_ide_cs);
+late_initcall(init_ide_cs);
module_exit(exit_ide_cs);
(
Log in to post comments)