serial driver

hii all
my driver is working but is becoming slow & slow as time
increases.while it is reading any data it is resetting the context
dispatch everytime.there it is consuming more time.can anybody give
me any suggestions how to rectify it.

thanks
anthony

What do you mean “resetting the context dispatch”?

There are at least two places within the ser8250 code where performance
can be radically improved.

Once is to rework the crappy ISR’s so that instead of doing all the UART
work within them, return an event and do all the UART servicing in the
context of the driver instead of the kernel. As it is supposed to be
done in QNX (but not in devc-ser8250!)

The other area that I had to dramatically alter was in the tto()
function when dealing with the TTO_DATA case. Basically there’s a loop
that processes every output character, one by one. When you are lucky
enough to have an xmit fifo, use it. In my case, the hardware I was
using (RocketPort) has a 250 char xmit fifo, so I was able to
dramatically improve output performance.

However (referring to your later post), when I first started playing
with it, performance sucked from the instant I started it. I have to
deal with up to 128 serial devices so I couldn’t live with it.
Performance didn’t slowly degrade as time went by.

There were other areas that required some attention, but these two
really stuck in my memory as they caused me considerable pain.

Overall, the char-io DDK is quite good but obviously geared towards use
with dumb UART’s. But as for the ser8250 example, well…

As Dean Douthat said in an earlier posting, you really need to provide a
bit more detail about what you are doing. I think I can help you if I
know a bit more about what you’re doing and where you are at with it.

You can email me at ger2atrttsdotcomdotau

Geoff Roberts

anthony wrote:

hii all
my driver is working but is becoming slow & slow as time
increases.while it is reading any data it is resetting the context
dispatch everytime.there it is consuming more time.can anybody give
me any suggestions how to rectify it.

thanks
anthony