> > What stops a parallel open or close changing ASYNC_INITIALIZED after you
> > test and before you lock ?
>
> Yeah, I should do the whole thing under the mutex.
Can you use test_bit() as well. I'm trying to gradually push all the code
that way so people habitually use set_bit() and we don't get
On Mon, Sep 10, 2012 at 12:13:20PM +0100, Alan Cox wrote:
> > + tport = &state->port;
> > + if (!(tport->flags & ASYNC_INITIALIZED) && port->ops->poll_init) {
> > + mutex_lock(&tport->mutex);
> > + ret = port->ops->poll_init(port);
> > + /*
> > +* We do
> + tport = &state->port;
> + if (!(tport->flags & ASYNC_INITIALIZED) && port->ops->poll_init) {
> + mutex_lock(&tport->mutex);
> + ret = port->ops->poll_init(port);
> + /*
> + * We don't set ASYNCB_INITIALIZED as we only initialized the
> +
It was noticed that polling drivers (like KGDB) are not able to use
serial ports if the ports were not previously initialized via console.
I.e. when booting with console=ttyAMA0 kgdboc=ttyAMA0, everything works
fine, but with console=ttyFOO kgdboc=ttyAMA0, the kgdboc doesn't work.
This is because
4 matches
Mail list logo