tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New line discipline flag to prevent userland open/close of the device



On Sun, Oct 29, 2017 at 10:49:57AM -0400, Thor Lancelot Simon wrote:
> On Sun, Oct 29, 2017 at 12:47:26PM +0100, Martin Husemann wrote:
> > While analyzing PR port-sparc64/52622 I ran into the following issue.
> > 
> > On some sun hardware, the com0 device is used to connect an old style keyboard,
> > and com1 is used for mouse. On other sparc64 machines, com0/com1 are regular
> > serial ports and keyboard/mouse is USB attached.
> 
> pmax does something similar (though it's a different serial controller,
> basically a DZ11 on a chip) -- look at what it does?

Basically the same, but with a lot tighter coupling between the fewer
hardware variants and abstraction violations, hard coded into the dz
softc:

        /* if some other device is using the line, it's busy */
        if (sc->sc_dz[line].dz_catch)
                return EBUSY;

Martin


Home | Main Index | Thread Index | Old Index