21285 serial driver deadlock(?) fix

Simon Kagstrom simon.kagstrom at netinsight.net
Mon Jan 11 04:57:24 EST 2010


(Added the list to To: as well)

On Tue, 5 Jan 2010 21:37:42 +0300
Steve M <stevenm86 at gmail.com> wrote:

> I know little of the serial layer, but I am not certain that it is a good
> idea to put _nosync directly into the stop_tx function, since this is a
> function whose pointer is given out to the upper layer. We may only want the
> nosync behavior from within the ISR, but waiting for the ISR to complete in
> other cases may be more appropriate.

Well, I think serial21285_stop_tx also needs _nosync since it too is
called from an interrupt handler:

  static irqreturn_t serial21285_tx_chars(int irq, void *dev_id)
  {
	[...]
	if (uart_circ_empty(xmit))
		serial21285_stop_tx(port);
  } 

Of course, we could make an unsynced version of the stop_tx/stop_rx
which is called from the local interrupt handlers, and a synchronous
one which gets called from the structure.


I don't know if the function pointers in uart_ops would run into some
problem with the _nosync versions? I haven't seen any problems during
my tests here with them at least.

// Simon



More information about the linux-arm-kernel mailing list