All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Jiri Slaby <jslaby@suse.com>, Sebastian Reichel <sre@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	"Dr . H . Nikolaus Schaller" <hns@goldelico.com>,
	Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: Loic Poulain <loic.poulain@intel.com>,
	Pavel Machek <pavel@ucw.cz>,
	Peter Hurley <peter@hurleysoftware.com>,
	NeilBrown <neil@brown.name>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 2/6] serio: serport: hacks to get DT probe to work
Date: Wed, 24 Aug 2016 18:24:33 -0500	[thread overview]
Message-ID: <20160824232437.9446-4-robh@kernel.org> (raw)
In-Reply-To: <20160824232437.9446-1-robh@kernel.org>

For DT matching, the serio->dev.parent is expected to be the UART device
which is the tty's parent device. Not sure if this change has any side
effects, but this is all just for testing.

The spinlock causes deadlocks if serio_write is called from interrupt
handler as write_wakeup gets called. This could be fixed by clearing
TTY_DO_WRITE_WAKEUP if the spinlock is locked, but just doing quick hack
for now.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/input/serio/serport.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 9c927d3..a938c2b 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -183,7 +183,7 @@ static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file, u
 	serio->open = serport_serio_open;
 	serio->close = serport_serio_close;
 	serio->port_data = serport;
-	serio->dev.parent = tty->dev;
+	serio->dev.parent = tty->dev->parent;
 
 	serio_register_port(serport->serio);
 	printk(KERN_INFO "serio: Serial port %s\n", tty_name(tty));
@@ -253,10 +253,10 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty)
 	struct serport *serport = (struct serport *) tty->disc_data;
 	unsigned long flags;
 
-	spin_lock_irqsave(&serport->lock, flags);
+//	spin_lock_irqsave(&serport->lock, flags);
 	if (test_bit(SERPORT_ACTIVE, &serport->flags))
 		serio_drv_write_wakeup(serport->serio);
-	spin_unlock_irqrestore(&serport->lock, flags);
+//	spin_unlock_irqrestore(&serport->lock, flags);
 }
 
 /*
-- 
2.9.3

  parent reply	other threads:[~2016-08-24 23:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 23:24 [RFC PATCH 0/6] UART slave devices using serio Rob Herring
2016-08-24 23:24 ` Rob Herring
2016-08-24 23:24 ` [RFC PATCH 1/6] serio: add DT driver binding Rob Herring
2016-08-29  9:57   ` Pavel Machek
2016-08-24 23:24 ` [RFC PATCH 1/6] serio: add OF " Rob Herring
2016-08-24 23:24 ` Rob Herring [this message]
2016-08-24 23:24 ` [RFC PATCH 3/6] serio: add buffer receive and write functions Rob Herring
2016-08-24 23:24 ` [RFC PATCH 4/6] serio: serport: add support for buffered write and receive Rob Herring
2016-08-24 23:24   ` Rob Herring
2016-08-26 20:12   ` Pavel Machek
2016-08-26 20:12     ` Pavel Machek
2016-08-26 21:27     ` Rob Herring
2016-08-26 21:27       ` Rob Herring
2016-08-26 22:24       ` Pavel Machek
2016-08-24 23:24 ` [RFC PATCH 5/6] serio: add serial configuration functions Rob Herring
2016-08-24 23:24 ` [RFC PATCH 6/6] bluetooth: hack up ldisc to use serio Rob Herring
2016-08-24 23:24   ` Rob Herring
2016-08-26 20:05 ` [RFC PATCH 0/6] UART slave devices using serio Pavel Machek
2016-08-26 20:05   ` Pavel Machek
2016-08-26 21:29   ` Rob Herring
2016-10-25 21:55 ` Sebastian Reichel
2016-10-25 22:02   ` Rob Herring
2016-10-25 22:02     ` Rob Herring
2016-10-26  2:51     ` Sebastian Reichel
2016-10-31 20:00     ` Peter Hurley
2016-10-31 20:08       ` Peter Hurley
2016-10-31 20:08         ` Peter Hurley
2016-11-01  3:40       ` Rob Herring
2016-11-01  3:40         ` Rob Herring
2016-11-02  3:49         ` Rob Herring

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=20160824232437.9446-4-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=arnd@arndb.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hns@goldelico.com \
    --cc=jslaby@suse.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=loic.poulain@intel.com \
    --cc=marcel@holtmann.org \
    --cc=neil@brown.name \
    --cc=pavel@ucw.cz \
    --cc=peter@hurleysoftware.com \
    --cc=sre@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.