Subject: Re: multi-port serial on NetBSD PPC
To: Bill Studenmund <wrstuden@zembu.com>
From: Donald Lee <donlee@icompute.com>
List: port-macppc
Date: 12/04/2000 23:02:54
Indeed, it looks like the machinery to do the various ioctl stuff
is in the kernel in the dev/ic/cy.c file.

At 4:54 PM -0600 12/4/00, Bill Studenmund wrote:
>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, ..."

Hmmm.....

Judging from all the other code in similar places in the kernel,
this looks wrong.  The pattern of reference everywhere else is

	err = (*linesw[line].func)(params);


I was starting to build a kernel with this change, just to try it,
but then after looking at the other code, I thought I'd better not.

Am I missing something?

Is there anything obvious I should try?  Something in -current that makes
this better?

-dgl-