lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519324923-196857-3-git-send-email-john.garry@huawei.com>
Date:   Fri, 23 Feb 2018 02:42:03 +0800
From:   John Garry <john.garry@...wei.com>
To:     <andriy.shevchenko@...ux.intel.com>, <gregkh@...uxfoundation.org>,
        <slaby@...e.com>, <p.zabel@...gutronix.de>, <heiko@...ech.de>,
        <ed.blake@...drel.com>, <jhogan@...nel.org>
CC:     <linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>
Subject: [RFC PATCH 2/2] serial: 8250_dw: support polling mode

It would be useful to make this driver support some
8250-compatible devices which have no interrupt line.

For these, we allow for no interrupt, and will fallback on
polling mode.

Note: the 8250 dt bindings state that "interrupts"
is a required property:
"interrupts : should contain uart interrupt."

But the 8250_of.c driver can live without it. So
this patch is going this way also.

Signed-off-by: John Garry <john.garry@...wei.com>
---
 drivers/tty/serial/8250/8250_dw.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 28fbc8f..3154988 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -422,9 +422,10 @@ static int dw8250_probe(struct platform_device *pdev)
 	}
 
 	if (irq < 0) {
-		if (irq != -EPROBE_DEFER)
-			dev_err(dev, "cannot get irq\n");
-		return irq;
+		if (irq == -EPROBE_DEFER)
+			return irq;
+		dev_warn(dev, "cannot get irq, using polling mode\n");
+		irq = 0;
 	}
 
 	spin_lock_init(&p->lock);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ