Subject: Re: multi-port serial on NetBSD PPC (long)
To: Bill Studenmund <wrstuden@zembu.com>
From: Donald Lee <donlee_ppc@icompute.com>
List: port-macppc
Date: 12/04/2000 22:28:48
Thank you, thank you....

In response to Havard's comments, I'm pretty sure that it's the CY
device, and that it's device major 47.  I tested this empirically.
I tried it, and it works, at least as a simple serial device.
I can run getty on the serial, and it works fine.  It even works,
partly with pppd.  I duplicated/hacked the portion of the MAKEDEV that creates
the CZ devices and created similar CY devices, and they seem to do
the right thing.

The CZ series is a different product, It's more expensive, and is listed
as "intelligent".  Docs indicate higher performance and flashable
firmware on the card.

Both Y and Z are available in PCI and ISA versions.

At 4:54 PM -0600 12/4/00, Bill Studenmund wrote:
>On Sun, 3 Dec 2000, Donald Lee wrote:
>
>> As far as I can determine from the source (I'm not really all that familiar
>> with the internels) the Cyclades Y simply does not have the appropriate
>> driver machinery to support the ppp device.  In particular, it does not
>> support a number of the ioctl/tcsetattr calls that are needed to make
>> the card useful for ppp.  It also lacks the stuff that gets invoked on
>> setting the "Line Discipline".
>
>It actually does. These ioctl's are not coded in the driver itself, but in
>the line discipline.
>
>In the source I have, the cy driver calles the line discipline around line
>487 of sys/dev/ic/cy.c, in the cyioctl() routine. The code looks like:
>
>        error = (*tp->t_linesw->l_ioctl) (tp, cmd, data, flag, p);
>        if (error >= 0)
>                return error;
>
>For 1.5, it was "error = (*linesw[tp->t_line].l_ioctl) (tp, cmd, data, ..."

Is what you have -current?  Should I try that?  I'd _really_ like
to get this working.

>>[snip]
>I suspect the problem is elsewhere. This is the second serial driver which
>has given you problms with ppp on macppc. I haven't heard of any problems
>that other folks have had w/ ppp on the internal serial ports. I just
>checked the macppc driver for them, and it does not significanly differ
>from the one mac68k uses. Certainly not in how ppp works.
>
>One place to check is to make sure that you didn't change the ppp setup of
>your kernel.

I have tried many times, and failed, to get ppp to work on any macppc
box.  I've tried 1.4.1, 1.4.2, and 1.5 beta.  All failed.  I've not
tried 1.4.3 or 1.5 (latest).  I'm using the same modems, cables, and setups that
work quite well on my 68K boxes.  Most of my kernels are straight from the
distributions.  I've also tried buildig my own.

>Another is, which ioctl's are failing? If you have a list, that will help
>figure out what the problem is.

some output from the log file, w/ debug and kdebug set in pppd options.

Dec  3 14:57:53 pm7600 pppd[495]: pppd 2.4.0 started by donlee, uid 1001
Dec  3 14:57:55 pm7600 pppd[495]: Serial connection established.
Dec  3 14:57:55 pm7600 pppd[495]: Using interface ppp1
Dec  3 14:57:55 pm7600 pppd[495]: Connect: ppp1 <--> /dev/tty03
Dec  3 14:57:58 pm7600 /netbsd: ppp1: got 24 bytes
Dec  3 14:57:58 pm7600 /netbsd: ff03c021012500140206000000000506fd42626307020802

Dec  3 14:57:58 pm7600 /netbsd: ppp1 output: ff03c021010100180206000000000304c02
30506dc190ded07020802
Dec  3 14:57:58 pm7600 /netbsd: ppp1 output: ff03c021022500140206000000000506fd4
2626307020802
Dec  3 14:57:59 pm7600 /netbsd: ppp1: got 28 bytes
Dec  3 14:57:59 pm7600 /netbsd: ff03c021020100180206000000000304c0230506dc190ded
07020802
Dec  3 14:57:59 pm7600 /netbsd: ppp1: bad fcs fc44
Dec  3 14:58:03 pm7600 /netbsd: ppp1: got 12 bytes
Dec  3 14:58:03 pm7600 /netbsd: ff03c02109250008fd426263
Dec  3 14:58:03 pm7600 /netbsd: ppp1 output: ff03c0210a250008dc190ded
Dec  3 14:58:08 pm7600 /netbsd: ppp1: got 24 bytes
Dec  3 14:58:08 pm7600 /netbsd: ff03c0230102001406646f6e6c6565085b7365637265745d

Dec  3 14:58:08 pm7600 /netbsd: ppp1 output: ff03c0230202000d084c6f67696e206f6b
Dec  3 14:58:08 pm7600 /netbsd: ppp1 output: ff038021010100100306000000000206002
d0f01
Dec  3 14:58:08 pm7600 pppd[495]: user donlee logged in
Dec  3 14:58:08 pm7600 /netbsd: ppp1 output: ff0380fd0101000f1a04780018047800150
32f
Dec  3 14:58:08 pm7600 /netbsd: ppp1: got 32 bytes
Dec  3 14:58:08 pm7600 /netbsd: ff0380210125001c0206002d0f0003060000000081060000
0000830600000000
Dec  3 14:58:08 pm7600 /netbsd: ppp1 output: ff038021042500160306000000008106000
00000830600000000
Dec  3 14:58:08 pm7600 /netbsd: ppp1: got 21 bytes
Dec  3 14:58:08 pm7600 /netbsd: ff0380290125001101060000000002040000030301
Dec  3 14:58:08 pm7600 /netbsd: ppp1 output: ff03c021080200178029012500110106000
0000002040000030301
Dec  3 14:58:08 pm7600 pppd[495]: Unsupported protocol 'Appletalk Control Protoc
ol' (0x8029) received
Dec  3 14:58:09 pm7600 /netbsd: ppp1: got 25 bytes
Dec  3 14:58:09 pm7600 /netbsd: ff03c0210826001580fd0101000f1a047800180478001503
2f
Dec  3 14:58:09 pm7600 /netbsd: ppp1: got 14 bytes
Dec  3 14:58:09 pm7600 /netbsd: ff0380210301000a0206002d0f00
Dec  3 14:58:09 pm7600 /netbsd: ppp1: got 24 bytes
Dec  3 14:58:09 pm7600 /netbsd: ff03802101260014010a00000000000000000206002d0f00

Dec  3 14:58:09 pm7600 /netbsd: ppp1 output: ff038021010200100306000000000206002
d0f00
Dec  3 14:58:09 pm7600 /netbsd: ppp1 output: ff0380210426000e010a000000000000000
0
Dec  3 14:58:09 pm7600 /netbsd: ppp1: got 20 bytes
Dec  3 14:58:09 pm7600 /netbsd: ff038021020200100306000000000206002d0f00
Dec  3 14:58:09 pm7600 /netbsd: ppp1: got 14 bytes
Dec  3 14:58:09 pm7600 /netbsd: ff0380210127000a0206002d0f00
Dec  3 14:58:09 pm7600 /netbsd: ppp1 output: ff0380210227000a0206002d0f00
Dec  3 14:58:09 pm7600 /netbsd: ppp1 output: ff03802105030028436f756c64206e6f742
064657465726d696e65206c6f63616c2049502061646472657373
Dec  3 14:58:09 pm7600 pppd[495]: Could not determine local IP address
Dec  3 14:58:10 pm7600 /netbsd: ppp1: got 8 bytes
Dec  3 14:58:10 pm7600 /netbsd: ff03802106030004
Dec  3 14:58:10 pm7600 /netbsd: ppp1 output: ff03c021050300204e6f206e6574776f726
b2070726f746f636f6c732072756e6e696e67
Dec  3 14:58:10 pm7600 /netbsd: ppp1: got 8 bytes
Dec  3 14:58:10 pm7600 /netbsd: ff03c02106030004
Dec  3 14:58:10 pm7600 pppd[495]: Connection terminated.
Dec  3 14:58:10 pm7600 pppd[495]: Connect time 0.3 minutes.
Dec  3 14:58:10 pm7600 pppd[495]: Sent 337 bytes, received 341 bytes.
Dec  3 14:58:10 pm7600 pppd[495]: Serial link disconnected.
Dec  3 14:58:14 pm7600 pppd[495]: Hangup (SIGHUP)
Dec  3 14:58:15 pm7600 pppd[495]: Serial connection established.
Dec  3 14:58:15 pm7600 pppd[495]: Using interface ppp1
Dec  3 14:58:15 pm7600 pppd[495]: Connect: ppp1 <--> /dev/tty03
Dec  3 14:58:15 pm7600 pppd[495]: Hangup (SIGHUP)
Dec  3 14:58:15 pm7600 pppd[495]: Modem hangup
Dec  3 14:58:15 pm7600 pppd[495]: Connection terminated.
Dec  3 14:58:16 pm7600 pppd[495]: Couldn't restore device fd flags: Inappropriat
e ioctl for device
Dec  3 14:58:16 pm7600 pppd[495]: ioctl(TIOCSETD): Inappropriate ioctl for devic
e
Dec  3 14:58:16 pm7600 pppd[495]: tcsetattr: Inappropriate ioctl for device
Dec  3 14:58:41 pm7600 pppd[495]: Connect script failed
Dec  3 14:59:16 pm7600 last message repeated 3 times
Dec  3 15:00:00 pm7600 newsyslog[537]: logfile turned over
Dec  3 14:59:46 pm7600 last message repeated 2 times


I tried a number of variations of options to set up the IP addresses, with
both explicit and implicit setting in ppp's options files.

In the log files on the Mac that was trying to connect, it always reported
that the IP address being offered by NetBSD was 0.0.0.0 on both ends of
the wire.

Many thanks,

-dgl-