linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1 1/1] serial: 8250_fintek: Fix finding base_port with activated SuperIO
@ 2017-10-17  6:23 Ji-Ze Hong (Peter Hong)
  2017-10-18 20:04 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Ji-Ze Hong (Peter Hong) @ 2017-10-17  6:23 UTC (permalink / raw)
  To: gregkh
  Cc: jslaby, rel+kernel, stable, linux-serial, linux-kernel,
	hpeter+linux_kernel, peter_hong

The SuperIO will be configured at boot time by BIOS, but some BIOS
will not deactivate the SuperIO when the end of configuration. It'll
lead to mismatch for pdata->base_port in probe_setup_port(). So we'll
deactivate all SuperIO before activate special base_port in
fintek_8250_enter_key().

Tested on iBASE MI802.

Cc: stable@vger.kernel.org
Tested-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
---
 drivers/tty/serial/8250/8250_fintek.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index 96cc45f25ee9..b34623914413 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -128,6 +128,9 @@ static int fintek_8250_enter_key(u16 base_port, u8 key)
 	if (!request_muxed_region(base_port, 2, "8250_fintek"))
 		return -EBUSY;
 
+	/* Force to deactive all SuperIO in this base_port */
+	outb(EXIT_KEY, base_port + ADDR_PORT);
+
 	outb(key, base_port + ADDR_PORT);
 	outb(key, base_port + ADDR_PORT);
 	return 0;
-- 
2.7.4

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

end of thread, other threads:[~2017-10-18 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17  6:23 [PATCH V1 1/1] serial: 8250_fintek: Fix finding base_port with activated SuperIO Ji-Ze Hong (Peter Hong)
2017-10-18 20:04 ` Alan Cox

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