Alan Cox wrote:
> > term, since I've in the past fixed bugs in serial.c that don't get fixed
> > in other drivers that have borrowed huge amounts of code from serial.c
> > --- in many cases, I have no idea they've borrowed code, so I couldn't
> > notify them even if I had the time to track all of the places that have
> > borrowed from serial.c
>
> A simple make modules for them would have told you the problem ones.
>
> > The other solution (for now) is to use the generic_serial.c by
> > R.E.Wolff@BitWizard.nl, but I don't personally like that approach since
> > it introduces yet another abstraction layer, when in fact most of this
> > functionality should be going into the tty layer.
First, Let me say that I think that the TTY layer doesn't help me as a
driver writer enough: There is too much "administration" that a driver
needs to do. For example, the whole "open" logic is now implemented
again and again in every serial driver. I think a driver should be
responsible for talking to the hardware, and the "driving layer"
should do the thinking.
I asked around, and was told that I should make a "library" like layer
that drivers could use to simplify stuff. A driver would then be able
to choose the "generic" (but maybe a bit slow) stuff, or implement
things by itself. For example a driver for a board that has a 4k
output buffer, may want to skip the 4k write buffer in the kernel.
It's not quite finished completely the way I want it, but it's a lot
better than before. (SX and RIO now share around 2k lines-of-code
through "generic-serial". That's good.) So far, generic-serial simply
has the stuff from serial.c that isn't talking to the hardware.
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* "I didn't say it was your fault. I said I was going to blame it on you."- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:14 EST