PPP and console driver questions

Wendell Thompson wthompson at dsg-test.com
Thu Mar 20 21:39:34 UTC 2003


Just an update on this -

I found the problem was my console driver not accepting all the 
characters sent to the interrupt write callback function. The "len" 
parameter for rtems_termios_dequeue_characters should be the count of 
characters actually transmitted, not the count of characters the 
transmitter can buffer.

PPP is connecting properly now with the console driver corrected.

WT


Thomas Doerfler wrote:
> Hello,
> 
> this bug has been detected a year ago, a patch is 
> available... Have a look at
> 
> www.rtems.com/cgi-bin/gnatsweb.pl
> 
> login: guest
> password: guest
> 
> look at PR162
> 
> wkr,
> 	Thomas.
> 
> 
>>Questions about RTEMS PPP and the interrupt-driven console code for the 
>>Coldfire mcu in mcfuart.c:
>>
>>1. The pppstart() function in ppp_tty.c calls the termios write callback 
>>function, in the console driver, with a buffer pointer and string 
>>length. The write function in the driver copies the pointer and uses the 
>>queue in place. There appears to be no feedback to prevent pppstart from 
>>calling the write function again before the characters are dequeued, 
>>thus moving the pointers and skipping part of the queue. It also appears 
>>that pppstart could overwrite the data in the buffer before the 
>>interrupt dequeues the previous packet.
>>
>>Do I understand this correctly? If so, which part of this code needs to 
>>be corrected - the console driver?
>>
>>2. The console transmit interrupt calls rtems_termios_dequeue_characters 
>>with the buffer length that was passed into it by the previous write 
>>callback. That would mean the dequeue_characters function would 
>>eventually be limited to the smallest packet size previously 
>>transmitted, except that the function ignores the length parameter when 
>>it calls the PPP line discipline function.
>>
>>Does the console driver need to handle these conditions? It appears that 
>>it should copy the queued transmit characters into it's own buffer, and 
>>that buffer must be large enough to handle anything the pppstart 
>>function will throw at it. Or is it adequate, acceptable, or preferable 
>>to block in the console write function until the queue is empty?
>>
> 
> 
> --------------------------------------------
> IMD Ingenieurbuero fuer Microcomputertechnik
> Thomas Doerfler           Herbststrasse 8
> D-82178 Puchheim          Germany
> email:    Thomas.Doerfler at imd-systems.de
> PGP public key available at: http://www.imd-
> systems.de/pgp_keys.htm
> 
> 






More information about the users mailing list