Subject: Re: multi-port serial on NetBSD PPC
To: Donald Lee <donlee@icompute.com>
From: Allen Briggs <briggs@wasabisystems.com>
List: port-macppc
Date: 12/05/2000 00:14:33
> >        error = (*tp->t_linesw->l_ioctl) (tp, cmd, data, flag, p);
> >
> >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);

As Bill said, in 1.5 (and earlier -current), it was as you say.  A
couple of weeks ago, the interface was changed somewhat to look
more like
	err = (*tp->t_linesw->func)(params);

sys/dev/ic/cy.c was updated to the "new line discipline scheme" on
2000/11/01 at about 23:55 GMT.  If your sources are prior to that,
you'll have something like (revision 1.15 of cy.c):
      error = (*linesw[tp->t_line].l_ioctl) (tp, cmd, data, flag, p);

If you have sources from after that (revision 1.16 of cy.c):
      error = (*tp->t_linesw->l_ioctl) (tp, cmd, data, flag, p);

That's sort of the sticky thing about -current--it gets this sort of
"new look" every now and then.  The best way to determine which version
of -current you have is to specify the date on which you grabbed it.

Cheers,
-allen

-- 
   Allen Briggs                                     briggs@wasabisystems.com
   http://www.wasabisystems.com/      Quality NetBSD Sales, Support, Service