linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Momchil Velikov <velco@fadata.bg>
To: Benjamin Herrenschmidt <bh40@calva.net>
Cc: Chris Ridd <Chris.Ridd@messagingdirect.com>,
	linuxppc-dev@lists.linuxppc.org
Subject: Re: serial on lombard
Date: Thu, 14 Oct 1999 16:43:26 +0300	[thread overview]
Message-ID: <3805DDFE.AEF8F5CE@fadata.bg> (raw)
In-Reply-To: 19991014150653.007845@mailhost.mipsys.com


Benjamin Herrenschmidt wrote:
> 
> On Thu, Oct 14, 1999, Chris Ridd <Chris.Ridd@messagingdirect.com> wrote:
> 
> >> Note that this is the/a way to set CLOCAL -- open the device with
> O_NONBLOCK
> >> and then tcsetattr() or whatever.
> >
> >The open on /dev/ttyS0 returns a valid fd, so it is succeeding. As BenH
> >pointed out, the problem is the SIGALRM ringing which causes Minicom to
> >erroneously think it couldn't open the device.
> 
> I just checked and yes, the driver doesn't check the O_NONBLOCK flag, it

This is not necessarily wrong, if the driver's routine doesn't block,
there is no need to check O_NONBLOCK, no matter how slow the routine is.

> always block for 2.5s (since, I think, there's no DCD, it's a hackish
> workaround). Now, we could eventually check more closely, it's possible
> that there's actually a DTR on this internal modem. I heard from Apple
> sources that the wiring of this modem to the SCC was a little bit weird,
> it's possible that the DTR is indeed available either on the flow control
> input pin (but I don't think so) or on the GPio pin. In this case, we
> should check this instead of waiting for an arbitrary amount of time.
> 
> Note that this error should not happen with other serial ports, this
> tempo is only used with the powerbook's internal modem (triggered by the
> "cobalt" compatible propery in the device tree).

I guess, Chris is right. Minicom should use the alarm only as a mean to
cause open() to return -1 and EINTR. And it has to account for such
devices by setting larger timeout.

Regards,
-velco

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~1999-10-14 13:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-14 19:12 serial on lombard Mario Scarpa
1999-10-14 11:06 ` Benjamin Herrenschmidt
1999-10-14 11:19 ` Michael Schmitz
1999-10-14 11:31   ` Momchil Velikov
1999-10-14 12:35     ` Chris Ridd
1999-10-14 13:06       ` Benjamin Herrenschmidt
1999-10-14 13:43         ` Momchil Velikov [this message]
1999-10-14 14:21         ` Michael Schmitz
1999-10-14 14:34           ` Benjamin Herrenschmidt
1999-10-14 14:53             ` Momchil Velikov
1999-10-14 16:10               ` Michael Schmitz
1999-10-15  7:26                 ` Momchil Velikov
1999-10-14 16:00             ` Michael Schmitz
1999-10-14 16:10               ` Benjamin Herrenschmidt
1999-10-14 17:41                 ` Michael Schmitz
1999-10-15  4:12                   ` Mario Scarpa
1999-10-15  8:33                     ` Benjamin Herrenschmidt
1999-10-15 20:17                       ` Mario Scarpa
1999-10-15  8:42                     ` Michael Schmitz

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=3805DDFE.AEF8F5CE@fadata.bg \
    --to=velco@fadata.bg \
    --cc=Chris.Ridd@messagingdirect.com \
    --cc=bh40@calva.net \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).