mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
To: Greg KH <gregkh@suse.de>
Cc: Pete Zaitcev <zaitcev@redhat.com>,
	linux-kernel@vger.kernel.org, rmk@arm.linux.org.uk,
	linux-usb-devel@lists.sourceforge.net
Subject: Re: [PATCH 8/11] usbserial: pl2303: Ports tty functions.
Date: Tue, 6 Jun 2006 10:10:58 -0300	[thread overview]
Message-ID: <20060606101058.1e1d31bc@doriath.conectiva> (raw)
In-Reply-To: <20060606073441.GD17682@suse.de>

On Tue, 6 Jun 2006 00:34:41 -0700
Greg KH <gregkh@suse.de> wrote:

| On Sat, Jun 03, 2006 at 07:19:17PM -0300, Luiz Fernando N. Capitulino wrote:
| > On Fri, 2 Jun 2006 15:44:35 -0700
| > Greg KH <gregkh@suse.de> wrote:
| > 
| > | On Fri, Jun 02, 2006 at 03:41:21PM -0700, Pete Zaitcev wrote:
| > | > On Fri, 2 Jun 2006 13:50:14 -0700, Greg KH <gregkh@suse.de> wrote:
| > | > > On Fri, Jun 02, 2006 at 12:03:14AM -0300, Luiz Fernando N.Capitulino wrote:
| > | > 
| > | > > >   2. The new pl2303's set_termios() can (still) sleep. Serial Core's
| > | > > >      documentation says that that method must not sleep, but I couldn't find
| > | > > >      where in the Serial Core code it's called in atomic context. So, is this
| > | > > >      still true? Isn't the Serial Core's documentation out of date?
| > | > > 
| > | > > If this is true then we should just stop the port right now, as the USB
| > | > > devices can not handle this.  They need to be able to sleep to
| > | > > accomplish this functionality.
| > | > > 
| > | > > Russell, is this a requirement of the serial layer?  Why?
| > | > 
| > | > Shouldn't it be all right to schedule the change at the moment of
| > | > that call and have it happen later? Resisting a temptation to abuse
| > | > keventd and schedule_work and using a tasklet may help with latency
| > | > enough to make this tolerable.
| > | 
| > | Some devices require more than one usb message to set all of the proper
| > | termios bits in the device.  Creating a way to queue them up and fire
| > | them off later, and handle errors if something happened in the middle,
| > | after we told userspace the termios change succeeded, might get quite
| > | messy :(
| > 
| >  But set_termios() returns nothing, and look what termios
| > man page says about tcsetattr() return value:
| > 
| > """
| > Note that tcsetattr() returns success if any of the requested changes could
| > be successfully carried out. Therefore, when making multiple changes it may be
| > necessary to follow this call with a further call to tcgetattr() to check that
| > all changes have been performed successfully.
| > """
| 
| Good point, I forgot about that.
| 
| >  Also, why do they need to sleep? Did you note that my version of
| > set_mctrl() is atomic?
| 
| Yes, that looks "atomic" in a way, but when the function returns, the
| value is not really set.  It only happens some time in the future when
| the urb completes (and hopefully it works, no retry is allowed...)
| 
| So it might be a bit "racy" :)

 Oh, that's true.

 Is it acceptable? The hardware is capable to queue URBs, right?

-- 
Luiz Fernando N. Capitulino

  parent reply	other threads:[~2006-06-06 13:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1149217397133-git-send-email-lcapitulino@mandriva.com.br>
2006-06-02  6:48 ` [PATCH RFC 0/11] usbserial: Serial Core port Pete Zaitcev
2006-06-02 10:03   ` David Woodhouse
2006-06-02 13:45     ` Luiz Fernando N. Capitulino
2006-06-02 13:54       ` David Woodhouse
2006-06-02 14:07         ` Luiz Fernando N. Capitulino
2006-06-02 22:47     ` Pete Zaitcev
2006-06-04 23:12       ` Luiz Fernando N. Capitulino
2006-06-04 23:24         ` Pete Zaitcev
2006-06-05 12:14           ` Luiz Fernando N. Capitulino
2006-06-05 12:29             ` David Woodhouse
2006-06-02 13:39   ` Luiz Fernando N. Capitulino
2006-06-02 20:48 ` Greg KH
2006-06-03 22:03   ` Luiz Fernando N. Capitulino
2006-06-06  7:29     ` Greg KH
2006-06-06 13:03       ` Luiz Fernando N. Capitulino
     [not found] ` <1149217398434-git-send-email-lcapitulino@mandriva.com.br>
2006-06-02 20:50   ` [PATCH 8/11] usbserial: pl2303: Ports tty functions Greg KH
2006-06-02 22:41     ` Pete Zaitcev
2006-06-02 22:44       ` Greg KH
2006-06-03 22:19         ` Luiz Fernando N. Capitulino
2006-06-06  7:34           ` Greg KH
2006-06-06  9:23             ` Alan Cox
2006-06-06 16:15               ` Luiz Fernando N. Capitulino
2006-06-06 13:10             ` Luiz Fernando N. Capitulino [this message]
2006-06-06 16:38               ` Greg KH

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=20060606101058.1e1d31bc@doriath.conectiva \
    --to=lcapitulino@mandriva.com.br \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=rmk@arm.linux.org.uk \
    --cc=zaitcev@redhat.com \
    /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®