linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Stuge <peter-Y+HMSxxDrH8@public.gmane.org>
To: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
Cc: Laszlo Papp <lpapp-RoXCvvDuEio@public.gmane.org>,
	linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: g_serial hangs on write when the cable is disconnected
Date: Wed, 5 Aug 2015 19:09:27 +0200	[thread overview]
Message-ID: <20150805170927.20219.qmail@stuge.se> (raw)
In-Reply-To: <20150805162923.GC21870-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>

Greg KH wrote:
> > >>     int fd = open("/dev/ttyGS0", O_RDWR | O_NONBLOCK);
> > >
> > > This line discipline is very different from the "traditional" tty
> > > line discipline
..
> this is a character device, with a very specific line discipline
> that works in a very specific way and assumes you know exactly how
> to talk to it and communicate with it properly.

If the character device is called tty* then I think it is appropriate
to expect that it (by default) behaves like a "traditional" tty device.

How the kernel implements this device internally (ldisc or no)
shouldn't matter to the user, and if it does I'd consider that a bug.
(Sadly unfixable, because public API.)

=> Rather than defending unexpected behavior, why not admit that the
name was poorly chosen and point to the device-specific requirements?


Thanks

//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-08-05 17:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 10:05 g_serial hangs on write when the cable is disconnected Laszlo Papp
     [not found] ` <CAOMwXhNwVKCK1+-q+fAgMc0ebpremXd+S1kUvZ9Ank-5BTMLCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-05 14:56   ` Greg KH
     [not found]     ` <20150805145627.GA610-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-08-05 15:40       ` Laszlo Papp
     [not found]         ` <CAOMwXhM7TNZAGOUAC=gcwjqTz8y7FGs0FRbJb4SQO+VfbzYJJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-05 16:29           ` Greg KH
     [not found]             ` <20150805162923.GC21870-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-08-05 17:09               ` Peter Stuge [this message]
     [not found]                 ` <20150805170927.20219.qmail-Y+HMSxxDrH8@public.gmane.org>
2015-08-05 17:26                   ` Greg KH
     [not found]                     ` <20150805172640.GB25008-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-08-05 18:15                       ` Alan Stern
     [not found]                         ` <Pine.LNX.4.44L0.1508051411090.1713-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2015-08-06  6:05                           ` Laszlo Papp
     [not found]                             ` <CAOMwXhNPi-5iF7BDnb0FTCA885yYJd_UdZyU2RtUL13gw08Z4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-06 13:52                               ` Alan Stern
     [not found]                                 ` <Pine.LNX.4.44L0.1508060951250.1844-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2015-08-06 14:03                                   ` Laszlo Papp
     [not found]                                     ` <CAOMwXhPpqEPV+PqM6BgJNByGCKVT4-a3s49iGdrk37VCcX+jQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-06 14:15                                       ` Alan Stern
2015-08-06 15:16                                       ` Peter Hurley
     [not found]                                         ` <55C37A49.3020503-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2015-08-06 16:16                                           ` Laszlo Papp
2015-08-06  6:01                   ` Laszlo Papp
2015-08-06  5:59               ` Laszlo Papp

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=20150805170927.20219.qmail@stuge.se \
    --to=peter-y+hmsxxdrh8@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lpapp-RoXCvvDuEio@public.gmane.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).