From: Mark Underwood <basicmark@yahoo.com>
To: Rogier Wolff <R.E.Wolff@BitWizard.nl>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux tty layer hackery: Heads up and RFC
Date: Tue, 26 Jul 2005 10:55:35 +0100 (BST) [thread overview]
Message-ID: <20050726095535.95521.qmail@web30308.mail.mud.yahoo.com> (raw)
In-Reply-To: <20050722145716.GA3332@bitwizard.nl>
Hi Rogier,
Having just written a DMA UART driver I can say this
is good news :-). Here are some things to think about:
What my driver would like to do is to handle its own
input buffers. It would pass the buffer to the tty
layer when it is full and the tty layer would pass the
buffer back once it has drained the data from it.
The problem is that I don't always receive a block
worth of characters so I also need to pass the tty
layer a buffer (which I'm still DMAing into) with a
count of how many chars there are in the buffer and a
offset of where to start from. If I can't do this then
I have to stop the DMA transfer, pass you a mostly
empty buffer with a char count, and setup DMA transfer
into another buffer. If during this I get a burst of
data I could well lose it :-(.
Best Regards,
Mark
--- Rogier Wolff <R.E.Wolff@BitWizard.nl> wrote:
> On Thu, Jul 21, 2005 at 06:46:32PM +0100, Alan Cox
> wrote:
> > int tty_prepare_flip_string(tty, strptr, len)
> >
> > Adjust the buffer to allow len characters to be
> added. Returns a buffer
> > pointer in strptr and the length available. This
> allows for hardware
> > that needs to use functions like insl or
> mencpy_fromio.
>
> Ok, So then I start copying characters into the
> flipstring, but how do
> I say I'm done?
>
> Or is there a race between that I call
> tty_prepare_flip_string, and
> other processes start pulling my not-yet-filled
> string from the
> buffer? (Surely not!)
>
> Roger.
>
> --
> ** R.E.Wolff@BitWizard.nl **
> http://www.BitWizard.nl/ ** +31-15-2600998 **
> *-- BitWizard writes Linux device drivers for any
> device you may have! --*
> Q: It doesn't work. A: Look buddy, doesn't work is
> an ambiguous statement.
> Does it sit on the couch all day? Is it unemployed?
> Please be specific!
> Define 'it' and what it isn't doing. ---------
> Adapted from lxrbot FAQ
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
next prev parent reply other threads:[~2005-07-26 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-21 17:46 Alan Cox
2005-07-21 17:47 ` Sergei Organov
2005-07-22 14:57 ` Rogier Wolff
2005-07-22 16:16 ` Alan Cox
2005-07-26 9:55 ` Mark Underwood [this message]
2005-07-26 11:11 ` Alan Cox
2005-07-26 12:38 ` Mark Underwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050726095535.95521.qmail@web30308.mail.mud.yahoo.com \
--to=basicmark@yahoo.com \
--cc=R.E.Wolff@BitWizard.nl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®