linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is tty->receive_room no longer usable w/ SMP?
@ 2014-02-12 22:43 Grant Edwards
  2014-02-13  1:04 ` Peter Hurley
  0 siblings, 1 reply; 12+ messages in thread
From: Grant Edwards @ 2014-02-12 22:43 UTC (permalink / raw)
  To: linux-serial

A couple serial drivers I maintain check the value of tty->receive_room
to decide the max number of bytes to pull out of the UART's receive
FIFO and shove into a flip buffer.

After checking tty->receive room to decide how many bytes to read, one
of the drivers uses this sequence:

 tty_prepare_flip_string_flags(...)
 <fill up char buffer and flag buffer>
 tty_flip_buffer_push(...)

The other uses

 for (i=0; i<count; ++i)
   uart_insert_char(...);
 tty_flip_buffer_push(...);   
 
But, starting with kernel 3.12.0, whenSMP is enabled, tty->receive_room
is always 0 and never changes.  With SMP disabled, it seems to work the
way it always has.

Is use of tty->receive room no longer supported for SMP kernels?

How _should_ a serial driver decide how many rx characters there are
room for?

-- 
Grant Edwards               grant.b.edwards        Yow! What I need is a
                                  at               MATURE RELATIONSHIP with a
                              gmail.com            FLOPPY DISK ...


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-02-14 22:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-12 22:43 Is tty->receive_room no longer usable w/ SMP? Grant Edwards
2014-02-13  1:04 ` Peter Hurley
2014-02-13  2:27   ` Grant Edwards
2014-02-13  3:56     ` Peter Hurley
2014-02-13  5:38       ` Grant Edwards
2014-02-13 15:30         ` Peter Hurley
2014-02-13 17:52           ` Grant Edwards
2014-02-13 18:20             ` Peter Hurley
2014-02-13 18:50               ` Grant Edwards
2014-02-13 19:09                 ` Peter Hurley
2014-02-13 19:46                   ` Grant Edwards
2014-02-14 22:31             ` Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).