mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Correctly flush 8250 buffers, notify ldisc of line status changes.
Date: Tue, 09 Nov 2004 14:39:31 +0000	[thread overview]
Message-ID: <1100011170.4542.142.camel@hades.cambridge.redhat.com> (raw)
In-Reply-To: <1100006241.15742.6.camel@localhost.localdomain>

On Tue, 2004-11-09 at 13:17 +0000, Alan Cox wrote:
> What the callback does is provide a notification *before* the data
> arrives, and easily 2mS out which calls a line discipline function that
> cannot sleep and cannot viably interact with the data stream.

Actually I needed it to respond to CTS going away, and it provides a
notification *before* the data are *sent*. Which lets me know that the
first bytes of my packet were dropped by the automatic contention
detection circuitry and I need to flush the rest of the packet from the
FIFO rather than letting the hardware driver wait for CTS to come back
then then send a corrupt half-packet.

> Now when you add it to the flip buffer as another event like errors the
> line discipline knows the approximate time it occurred, has defined
> semantics for ordering and queuing and can respond by flipping its modem
> signals. You can actually *use* it to implement things like half-duplex 
> and multidrop.

That solves a different problem, and isn't quite as useful to me. I want
to be able to respond to CTS going low as quickly as possible, by
flushing the rest of the characters from the outgoing queue. I was happy
enough with using a tasklet to actually call the flush method, to avoid
the deadlock you pointed out without changing the locking of all the
hardware drivers). 

> Andrew - please reject the patch.

I'll submit the bit which makes the flush_buffer method work on its own.
Alan, would you care to offer a viable alternative which solves the
problem I'm interested in?

-- 
dwmw2


  reply	other threads:[~2004-11-09 14:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 13:06 David Woodhouse
2004-11-05 13:08 ` David Woodhouse
2004-11-09  9:22 ` Andrew Morton
2004-11-09 11:07   ` David Woodhouse
2004-11-09 11:15     ` Alan Cox
2004-11-09 13:28       ` Russell King
2004-11-09 13:17         ` Alan Cox
2004-11-09 14:39           ` David Woodhouse [this message]
2004-11-09 13:49             ` Alan Cox
2004-11-09 14:47           ` Russell King
2004-11-09 14:47             ` Alan Cox
2004-11-13 18:10               ` Russell King
2004-11-13 20:52                 ` Alan Cox
2004-11-13 22:40                   ` Nicolas Pitre
2004-11-09 14:39       ` David Woodhouse

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=1100011170.4542.142.camel@hades.cambridge.redhat.com \
    --to=dwmw2@infradead.org \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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®