Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/jensenio Possible fix for hangup on Jensen me...



details:   https://anonhg.NetBSD.org/src/rev/d7efbcfb6018
branches:  trunk
changeset: 938911:d7efbcfb6018
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 19 16:54:34 2020 +0000

description:
Possible fix for hangup on Jensen mentioned in PR/36628.

According to comments in Linux drivers/tty/serial/8250/8250.h,
 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/8250.h?h=v5.8#n242
the driver has to set OUT1 and OUT2 lines for "some ALPHA"
otherwise "the machine locks up with endless interrupts."
Note OUT2 (MCR_IENABLE) is set in MI com_attach_subr()
so we have to set OUT1 (MCR_DSR) in the MD attachment.

The information was notified from Miod Vallat.

diffstat:

 sys/arch/alpha/jensenio/com_jensenio.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r f43dda156c6c -r d7efbcfb6018 sys/arch/alpha/jensenio/com_jensenio.c
--- a/sys/arch/alpha/jensenio/com_jensenio.c    Sat Sep 19 16:31:40 2020 +0000
+++ b/sys/arch/alpha/jensenio/com_jensenio.c    Sat Sep 19 16:54:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com_jensenio.c,v 1.15 2018/12/08 17:46:09 thorpej Exp $ */
+/* $NetBSD: com_jensenio.c,v 1.16 2020/09/19 16:54:34 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.15 2018/12/08 17:46:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.16 2020/09/19 16:54:34 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -106,6 +106,16 @@
 
        sc->sc_frequency = COM_FREQ;
 
+       /*
+        * According to comments in Linux drivers/tty/serial/8250/8250.h,
+        * the driver has to set OUT1 and OUT2 lines for "some ALPHA"
+        * otherwise "the machine locks up with endless interrupts."
+        * Note OUT2 (MCR_IENABLE) is set in MI com_attach_subr()
+        * so we have to set OUT1 (MCR_DSR) in the MD attachment.
+        * See also PR/36628.
+        */
+       SET(sc->sc_mcr, MCR_DRS);
+
        com_attach_subr(sc);
 
        scb_set(ja->ja_irq[0], com_jensenio_intr, jsc, IPL_VM);



Home | Main Index | Thread Index | Old Index