Subject: Swapping the order hd64461pcmcia channels are attached
To: None <email@example.com>
From: Valeriy E. Ushakov <firstname.lastname@example.org>
Date: 10/23/2003 03:06:42
I'd like to commit a trivial patch that makes the order in which
hd64461pcmcia attaches its channels controlled with an option. The
ordering make a difference when you boot with two CF cards in both
PCMCIA and CF slots.
I usually keep the NetBSD CF card in the CF slot, so that the PCMCIA
slot is free for ethernet/modem/wifi/cf cards. It also helps to avoid
the stress on the CF slot door (I've almost lost one of the latches,
fortunately, i noticed it, and before the latch got lost, glued it
back). I can get new kernels/programs via network and install them on
the NetBSD CF card, while running NetBSD on the device.
Occasionally, when I do "dangerous" hacking that make the system
unstable and often unbootable to multiuser, I install things onto
NetBSD CF on my laptop and shuttle the CF card (in the PCMCIA adaptor)
between the laptop and the PCMCIA slot of the Jornada.
In both cases the single CF attaches as wd0, as when the NetBSD CF is
in the PCMCIA slot (i.e. I'm in the hacking/experimental mode), the CF
slot is empty.
However if in "normal use" mode (NetBSD CF is in the CF slot) I want
to boot with another CF card in the PCMCIA slot - there's a problem.
Since PCMCIA slot is channel 0 (that is attached first, the CF in this
slot will be attached as wd0 (unless you use fixed unit numbers in
config file, but that's not convenient, see the usage pattern
described above) and the NetBSD CF in the CF slot - as wd1. And the
system will get confused, as fstab tells it to pick the root from wd0.
ISTM, the easiest solution is to make channel 1 (CF slot) attach
before channel 0 (PCMCIA slot), so that the CF card in the CF slot is
always probed first and attached as wd0 if present.
If there are no objections I'll commit the change at this weekend.
email@example.com | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen