linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] serdev: ttyport: do not used keyed wakeup in write_wakeup
@ 2017-12-18 11:00 Johan Hovold
  2017-12-18 11:28 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2017-12-18 11:00 UTC (permalink / raw)
  To: Rob Herring, Greg Kroah-Hartman
  Cc: Jiri Slaby, linux-serial, linux-kernel, Johan Hovold

Serdev does not use the file abstraction and specifically there will
never be anyone polling a file descriptor for POLLOUT events.

Just use plain wake_up_interruptible() in the write_wakeup callback and
document why it's there.

Signed-off-by: Johan Hovold <johan@kernel.org>
---

Here's a resend of the final patch from the series "[PATCH 0/8] serdev:
receive_buf and locking fixes", which did not apply after the series was
split over 4.15-rc and -next.

Johan


 drivers/tty/serdev/serdev-ttyport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index c2629ab1bbcf..a5abb05be67d 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -59,7 +59,8 @@ static void ttyport_write_wakeup(struct tty_port *port)
 	    test_bit(SERPORT_ACTIVE, &serport->flags))
 		serdev_controller_write_wakeup(ctrl);
 
-	wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
+	/* Wake up any tty_wait_until_sent() */
+	wake_up_interruptible(&tty->write_wait);
 
 	tty_kref_put(tty);
 }
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] serdev: ttyport: do not used keyed wakeup in write_wakeup
  2017-12-18 11:00 [PATCH RESEND] serdev: ttyport: do not used keyed wakeup in write_wakeup Johan Hovold
@ 2017-12-18 11:28 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2017-12-18 11:28 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

Hi,

On Mon, Dec 18, 2017 at 12:00:19PM +0100, Johan Hovold wrote:
> Serdev does not use the file abstraction and specifically there will
> never be anyone polling a file descriptor for POLLOUT events.
> 
> Just use plain wake_up_interruptible() in the write_wakeup callback and
> document why it's there.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> ---
> 
> Here's a resend of the final patch from the series "[PATCH 0/8] serdev:
> receive_buf and locking fixes", which did not apply after the series was
> split over 4.15-rc and -next.
> 
> Johan
> 
> 
>  drivers/tty/serdev/serdev-ttyport.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
> index c2629ab1bbcf..a5abb05be67d 100644
> --- a/drivers/tty/serdev/serdev-ttyport.c
> +++ b/drivers/tty/serdev/serdev-ttyport.c
> @@ -59,7 +59,8 @@ static void ttyport_write_wakeup(struct tty_port *port)
>  	    test_bit(SERPORT_ACTIVE, &serport->flags))
>  		serdev_controller_write_wakeup(ctrl);
>  
> -	wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
> +	/* Wake up any tty_wait_until_sent() */
> +	wake_up_interruptible(&tty->write_wait);
>  
>  	tty_kref_put(tty);
>  }
> -- 
> 2.15.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-18 11:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 11:00 [PATCH RESEND] serdev: ttyport: do not used keyed wakeup in write_wakeup Johan Hovold
2017-12-18 11:28 ` Sebastian Reichel

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).