Module Name: src Committed By: tsutsui Date: Sat Sep 19 16:54:34 UTC 2020
Modified Files: src/sys/arch/alpha/jensenio: com_jensenio.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/jensenio/com_jensenio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/jensenio/com_jensenio.c diff -u src/sys/arch/alpha/jensenio/com_jensenio.c:1.15 src/sys/arch/alpha/jensenio/com_jensenio.c:1.16 --- src/sys/arch/alpha/jensenio/com_jensenio.c:1.15 Sat Dec 8 17:46:09 2018 +++ src/sys/arch/alpha/jensenio/com_jensenio.c Sat Sep 19 16:54:34 2020 @@ -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 @@ com_jensenio_attach(device_t parent, dev 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);