Subject: Re: multi-port serial on NetBSD PPC
To: Donald Lee <donlee_ppc@icompute.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 12/04/2000 14:54:29
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, ..."

> (If anyone out there could give me a nutshell explanation of how this works...)
> 
> I can use it to do a getty at 57600, and it seems to work fine, but
> pppd does not work.  As far as I can tell, this is an inadequacy of
> the driver/tty machinery.  Again, as far as I can tell, the tty
> "device" has to be taught to talk to the "cy" device, and speak
> PPP line discipline, and that has not been done.  When you use it in
> serial apps, it is just a character device, not a "tty".
> 
> Looks to me like it would be a non-trivial amount of code to get it
> working the way I would like.

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.

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

Take care,

Bill