On the transfer of data from the uart.c driver to the tty layer...

Dan Malek dan at embeddedalley.com
Wed Sep 6 12:28:15 EST 2006

On Sep 5, 2006, at 10:56 AM, Alejandro C wrote:

> I'm working on a the uart.c driver to add support for SCCs in HDLC  
> mode.

Write a driver that does HDLC, please don't "update"
(complicate) the existing uart.c driver by adding
these features.  The uart.c is a UART driver, not
an SCC driver to be modified to your wishes.
Add another, configurable driver to do this.

> I've come across is that the receive buffer in the struct  
> tty_struct, where
> the tty layer collects the data from the driver
> (tty_struct.tty_flip_buffer.char_buf), is only 1024 bytes

Write a driver specific to your requirements that
has the proper sized buffers and management.

> (2*TTY_FLIPBUF_SIZE). The easiest at this stage would be to make those
> buffers larger, but I don't know what sort of impact this might  
> have... Any
> tips?

Yes, don't do this.  Those buffers are allocated from
a fairly small pool specific to the needs of the uart
driver.  Making these larger may quickly cause the
CPM drivers to run out of space.

> Any ideas on how to solve it in another fashion?

Write a driver specific to your requirements with the
proper buffer management for these sizes.


	-- Dan

More information about the Linuxppc-dev mailing list