From 8dd212dad70d82a35e97092f5079533339fcb889 Mon Sep 17 00:00:00 2001 From: uwe Date: Sat, 27 Mar 2004 02:24:01 +0000 Subject: [PATCH] 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. --- sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c b/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c index d8c1cef98b98..6bc2e1162198 100644 --- a/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c +++ b/sys/arch/hpcsh/dev/hd64461/hd64461pcmcia.c @@ -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 -__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