Skip to contentSkip to conversation

serdev: ttyport: do not used keyed wakeup in write_wakeup

PATCH RESEND In review Johan Hovold 2 participants 2 messages Dec 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 serdev: ttyport: do not used keyed wakeup in write_wakeup

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.

---

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(-)
drivers/tty/serdev/serdev-ttyport.c +2 -1
index c2629ab1bbcf..a5abb05be67d 100644
@@ -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);
 }
Signature · 1 line
2.15.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 7 lines · 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.

-- Sebastian

Quoted 29 lines

---

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(-)
drivers/tty/serdev/serdev-ttyport.c +2 -1
index c2629ab1bbcf..a5abb05be67d 100644
@@ -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);
 }
Signature · 1 line
2.15.1