From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB5C4C433EF for ; Mon, 11 Apr 2022 10:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345592AbiDKKfz (ORCPT ); Mon, 11 Apr 2022 06:35:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242812AbiDKKfu (ORCPT ); Mon, 11 Apr 2022 06:35:50 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4CBB6434B6; Mon, 11 Apr 2022 03:33:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id EA2B0809F; Mon, 11 Apr 2022 10:31:04 +0000 (UTC) Date: Mon, 11 Apr 2022 13:33:34 +0300 From: Tony Lindgren To: Johan Hovold Cc: Greg Kroah-Hartman , Andy Shevchenko , Jiri Slaby , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Trumtrar , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , "Matwey V. Kornilov" Subject: Re: [PATCH 2/2] serial: 8250: Fix runtime PM for start_tx() for empty buffer Message-ID: References: <20220411094805.45696-1-tony@atomide.com> <20220411094805.45696-2-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Johan Hovold [220411 10:10]: > On Mon, Apr 11, 2022 at 12:48:05PM +0300, Tony Lindgren wrote: > > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > > --- a/drivers/tty/serial/8250/8250_port.c > > +++ b/drivers/tty/serial/8250/8250_port.c > > @@ -1677,8 +1677,10 @@ static void serial8250_start_tx(struct uart_port *port) > > > > serial8250_rpm_get_tx(up); > > > > - if (!port->x_char && uart_circ_empty(&port->state->xmit)) > > + if (!port->x_char && uart_circ_empty(&port->state->xmit)) { > > + serial8250_rpm_put_tx(up); > > return; > > + } > > Move this before the runtime pm get instead? Yup good idea. Tony