Subject: autoconfiguration question
To: None <tech-kern@NetBSD.ORG>
From: Bill Studenmund <>
List: tech-kern
Date: 05/20/1997 11:31:48

I'm having some problems getting the autoconfig code to attach a device
I'm trying to write. I've asked around some (Allen, Gordon & Scott),
and managed to stump them too.

I'm finally starting to code the LocalTalk stuff I've babbled about for
a while (I'm in a component-related lull at work). After thinking about
it, the bit-synchronous uses of the 8530SCC should really be involked
by a seperate driver from the zstty async tty driver (rather than being
some hacked in line discipline). I've got code which will let the
two of them co-exist, if I can get the bit-sync. part to autoconfig.

I'm calling the new stuff a zshdlc device, and right now I'm playing with
a zshdlc_stub device. The stub is basically the autoconfig glue, and will
permit an lkm to come in and latch on to a side of the serial chip
(or both, if it desires). Thus I can load and unload drivers during

Right now, I'm having problems w/ autoconfig. It's doing exactly what
it should do, but not what I want.

What I want to do is have both zstty0 and zshdlc_stub0 attach to
zsc0 channel 0.

What I tried:

(in sys/arch/mac68k/files.mac68k)
device  zstty: tty
attach  zstty at zsc
#file   arch/mac68k/dev/z8530tty.c      zstty needs-flag
file    dev/ic/z8530tty.c               zstty needs-flag

device  zshdlc_stub
attach  zshdlc_stub at zsc
file    dev/ic/z8530hdlc_stub.c         zshdlc_stub needs-flag

(in std.mac68k)
zsc0    at obio?
zstty*  at zsc? channel ?
zshdlc_stub* at zsc? channel ?


sd2: 234MB, 1818 cyl, 4 head, 65 sec, 512 bytes/sec
zsc0 at obio0 chip type 0
zsc0 channel 0: d_speed   9600 DCD clk 0 CTS clk 0
zstty0 at zsc0 channel 0
zsc0 channel 1: d_speed   9600 DCD clk 0 CTS clk 0 (raw defaults)
zstty1 at zsc0 channel 1
nubus0 at mainbus0

(unchnged config search in arch/mac68k/dev/zs.c)

                if (!config_found(self, (void *)&zsc_args, zsc_print)) {
                        /* No sub-driver.  Just reset it. */

(the zstty and zshdlc_stub match functions are the same, returning
1 for a wild card, 2 for an exact match).

Thoughts on how I can get BOTH a zstty and zshdlc on the same zsc