Add option HD64461PCMCIA_REORDER_ATTACH that attaches channels in

reversed order.

When you boot with two CF cards inserted, this options makes the one
in the "memory only" slot (channel 1), which is almost always the card
with the NetBSD install, attached as wd0.

Unlike using fixed unit numbers in the kernel config, if you boot with
only a single CF card, that single card will still be wd0 regardless
of which slot it is inserted in.

http://mail-index.netbsd.org/port-hpcsh/2003/10/23/0000.html provides
a more verbose description of why this option is convenient for most
usage patterns.
This commit is contained in:
uwe 2004-03-27 02:24:01 +00:00
parent fb20d3f467
commit 8dd212dad7
1 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64461pcmcia.c,v 1.23 2003/10/23 02:34:07 uwe Exp $ */
/* $NetBSD: hd64461pcmcia.c,v 1.24 2004/03/27 02:24:01 uwe Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hd64461pcmcia.c,v 1.23 2003/10/23 02:34:07 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: hd64461pcmcia.c,v 1.24 2004/03/27 02:24:01 uwe Exp $");
#include "debug_hpcsh.h"
@ -268,8 +268,13 @@ hd64461pcmcia_attach(struct device *parent, struct device *self, void *aux)
SIMPLEQ_INIT (&sc->sc_event_head);
kthread_create(hd64461pcmcia_create_event_thread, sc);
#if !defined(HD64461PCMCIA_REORDER_ATTACH)
hd64461pcmcia_attach_channel(sc, CHANNEL_0);
hd64461pcmcia_attach_channel(sc, CHANNEL_1);
#else
hd64461pcmcia_attach_channel(sc, CHANNEL_1);
hd64461pcmcia_attach_channel(sc, CHANNEL_0);
#endif
}
void