public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] tty->flip.count  >= TTY_FLIPBUF_SIZE
@ 2005-07-19  6:37 Durai
  0 siblings, 0 replies; only message in thread
From: Durai @ 2005-07-19  6:37 UTC (permalink / raw)
  To: bluez-devel

Hi all
    Platform - linux-2.4.18 , big endian Mips CPU running on 100MHz
    Bluetooth dongle - UART based CSR device

We are using a non-standard UART device, which receives the bytes and 
put it in a buffer. We are using a timer interrupt
to periodically poll the for the received data. When data is received, 
it will be passed to the TTY layer using the following code.

 /*
     * Make sure that we do not overflow the buffer
     */
    if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
        printk
            ("\n tty->flip.count %d  >= TTY_FLIPBUF_SIZE %d and dataLen %d",
             tty->flip.count, TTY_FLIPBUF_SIZE, dataLen);

        queue_task(&tty->flip.tqueue, &tq_timer);
       //the incoming bytes are dropped :(
        return;
    }

 while (i < dataLen) {
        tty->flip.count++;
        *tty->flip.char_buf_ptr++ = pClusPtr[i++];
        //printk("< %c  >", pClusPtr[i-1]);
    }
    queue_task(&tty->flip.tqueue, &tq_timer);

Everything goes fine and we are able to setup a PAN network and we are 
able to transmit & receive files over FTP.
But when we increase the UART baud rate to 115200 or beyond that, the 
tty->flip.count exceeds to  TTY_FLIPBUF_SIZE.
and  we are getting errors in the console (I have changed the 
TTY_FLIPBUF_SIZE from 512 to 1024, but it doesnt help)

tty->flip.count 1030  >= TTY_FLIPBUF_SIZE 1024 and dataLen 77
h4_check_data_len: Data length is too large
h4_recv: Unknown HCI packet type 75
h4_recv: Unknown HCI packet type a2
h4_recv: Unknown HCI packet type 22

This is because, the TTY layer is unable to process the received data 
before the next chunk of data arrives.
So my question is, how to speed up the botton half processing in the TTY 
layer. I know that this has got nothing
to do with the bluez layer, but i dont know where to find more 
information about debugging this issue. Anyone had
faced such issues?

regards
durai


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-19  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-19  6:37 [Bluez-devel] tty->flip.count >= TTY_FLIPBUF_SIZE Durai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox