mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Thomas Pfaff <tpfaff@pcs.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	"jslaby@suse.cz" <jslaby@suse.cz>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial_core: fix uart PORT_UNKNOWN handling
Date: Wed, 16 Apr 2014 13:25:54 -0700	[thread overview]
Message-ID: <20140416202554.GB25148@kroah.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1404091655140.29879@lxtpfaff.pcs.ditec.de>

On Wed, Apr 09, 2014 at 05:06:24PM +0200, Thomas Pfaff wrote:
> 
> On Wed, 9 Apr 2014, One Thousand Gnomes wrote:
> 
> > On Wed, 9 Apr 2014 13:22:14 +0200
> > Thomas Pfaff <tpfaff@pcs.com> wrote:
> > 
> > > 1. uart_change_pm ist called during uart_open and calls the uart pm function
> > >    without checking for PORT_UNKNOWN.
> > 
> > Removing this breaks other parts of the code assume that the port will be
> > powered up (notably setserial paths). So it makes sense that
> > uart_change_pm for a "none" port is a no-op but needs logic in the
> > setserial path to power up a port when we move none->known and power it
> > down on known->none
> > 
> 
> Then why not move uart_change_pm into uart_port_startup, where it will be called 
> when needed ?
> A reworked patch is below.
> 
> > > 2. uart_shutdown is called from uart_set_info and does not check it either.
> > 
> > I don't see why this one matters. We would have done
> > 
> > 	uart_startup
> > 		uart_port_startup
> > 			uport->type == PORT_UNKNOWN
> > 			return 1;
> > 		ASYNCB_INITIALIZED is not set
> > 
> > 	uart_shutdown
> > 		ASYNCB_INITIALISED is not set
> > 			Skip call to uart_port_shutdown
> > 
> > So that code looks correct to me.
> 
> I agree, i have overlooked this.
> 
> Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>

Can you resend this in a format that I can apply this in?

thanks,

greg k-h

      reply	other threads:[~2014-04-16 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 11:22 Thomas Pfaff
2014-04-09 12:39 ` One Thousand Gnomes
2014-04-09 15:06   ` Thomas Pfaff
2014-04-16 20:25     ` gregkh [this message]

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=20140416202554.GB25148@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpfaff@pcs.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®