Subject: Re: MD hooks in zsopen()/zsclose()
To: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 03/06/2000 12:00:20
On Sun, 5 Mar 2000, Julian Coleman wrote:
> > Looks like this is okay... but I think you want to have the "enabled" state
> > to be chanstate ... because there are some applications where there are
> > two chips, each with one tty and a mouse/kbd on the other channel of each
> > chip.
> OK. Better? Or should I change cs->enabled in zs_enable()/zs_disable()?
Better, but I think we can do better yet. :-)
I think twiddling the enabled state in zs_enable/zs_disable is better.
But why shove the function pointers in the zsc_softc? I think a better
place to shove them is in the zs_chanstate structure. While the zstty
driver only has the zsc softc at attach, it always has the zs_chanstate
Doing this would 1) simplify things in that you don't need the pointer in
both the zsc and zstty softc, 2) smooth things out conceptually in that
you would have a pointer to the routine to turn power on and off for this
Also, we're going to have to add functio pointers anyway to get the zs
driver working on certain alphas. :-)