NetBSD Problem Report #54197

From www@netbsd.org  Sat May 11 19:37:36 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 31C797A158
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 11 May 2019 19:37:36 +0000 (UTC)
Message-Id: <20190511193735.3685A7A186@mollari.NetBSD.org>
Date: Sat, 11 May 2019 19:37:35 +0000 (UTC)
From: janprunk@gmail.com
Reply-To: janprunk@gmail.com
To: gnats-bugs@NetBSD.org
Subject: respawning boot message when booting up Lemote Yeeloong 8089
X-Send-Pr-Version: www-1.0

>Number:         54197
>Category:       port-evbmips
>Synopsis:       respawning boot message when booting up Lemote Yeeloong 8089
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-evbmips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 11 19:40:00 +0000 2019
>Last-Modified:  Wed Nov 10 21:25:01 +0000 2021
>Originator:     Jan Prunk
>Release:        8.0
>Organization:
>Environment:
>Description:
Hello, 

I tried to boot up Lemote Yeeloong 8089 by using ungzipped netbsd-INSTALL_LOONGSON from 8.0 release and also from current build (20190511). I followed the description on https://wiki.netbsd.org/ports/evbmips/loongson/ and changed boot.cfg line from "kernel  (wd0,0)/netbsd" to "kernel  (usb0,0)/netbsd" then in PMON booted with "boot -k (usb0,0)/netbsd-LOONGSON". I also renamed the file netbsd-INSTALL_LOONGSON to netbsd-LOONGSON and placed it to ext2 USB key root partition. I tried to boot from all 3 USB slots. It starts the bootup screen and gets to NetBSD installer menu, but it keeps respawning message "spurious isa interrupt 14" in green letters, which makes it impossible to read the installer. It starts respawning at 2 second after bootup starts. I do not have any console output, since I am unable (don't know how) to connect to the Lemote screen.
>How-To-Repeat:
Test it with Lemote Yeeloong 8089.
>Fix:

>Audit-Trail:
From: Jan Prunk <janprunk@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbmips/54197
Date: Sun, 12 May 2019 12:46:26 +0200

 --0000000000009e1d580588ae83f0
 Content-Type: text/plain; charset="UTF-8"

 The boot procedure was tested on a Lemote Yeeloong 8089 with a missing /
 disconnected hard drive. Maybe the ISA interrupt error is related to
 unplugged HDD cable? I didn't open the laptop to check it's interior.

 Kind regards,
 Jan

 --0000000000009e1d580588ae83f0
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>The boot procedure was tested on a Lemote Yeeloong 80=
 89 with a missing / disconnected hard drive. Maybe the ISA interrupt error =
 is related to unplugged HDD cable? I didn&#39;t open the laptop to check it=
 &#39;s interior.</div><div><br></div><div>Kind regards,=C2=A0</div><div>Jan=
 </div></div>

 --0000000000009e1d580588ae83f0--

From: Jan Prunk <janprunk@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbmips/54197: respawning boot message when booting up
 Lemote Yeeloong 8089
Date: Sun, 12 May 2019 11:08:49 +0200

 --0000000000008701640588ad26b7
 Content-Type: text/plain; charset="UTF-8"

 The boot procedure was tested on a Lemote Yeeloong 8089 with a missing /
 disconnected hard drive. Maybe the ISA interrupt error is related to
 unplugged HDD cable? I didn't open the laptop to check it's interior.

 Kind regards,
 Jan

 --0000000000008701640588ad26b7
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div>The boot procedure was tested on a Lemote Yeeloong 80=
 89 with a missing / disconnected hard drive. Maybe the ISA interrupt error =
 is related to unplugged HDD cable? I didn&#39;t open the laptop to check it=
 &#39;s interior.</div><div><br></div><div>Kind regards,=C2=A0</div><div>Jan=
 </div></div>

 --0000000000008701640588ad26b7--

From: Jan Prunk <janprunk@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbmips/54197
Date: Mon, 13 May 2019 09:37:57 +0200

 --0000000000006584d50588bfff05
 Content-Type: text/plain; charset="UTF-8"

 Maybe this is the bugfix for the spurious isa interrupts on Yeeloong's?

 https://v4.freshbsd.org/commit/openbsd/src/r4FZmeZEE978i9aM

 Kind regards,
 Jan

 --0000000000006584d50588bfff05
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div dir=3D"ltr">Maybe this is the bugfix for the spurious=
  isa interrupts on Yeeloong&#39;s?<br><div><br></div><div><a href=3D"https:=
 //v4.freshbsd.org/commit/openbsd/src/r4FZmeZEE978i9aM">https://v4.freshbsd.=
 org/commit/openbsd/src/r4FZmeZEE978i9aM</a><br></div><div><br></div><div>Ki=
 nd regards,=C2=A0</div><div>Jan</div></div></div>

 --0000000000006584d50588bfff05--

From: Jan Prunk <janprunk@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-evbmips/54197
Date: Wed, 10 Nov 2021 22:23:15 +0100

 --ilu64zt2TiONFKQ9
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 A solution for this issue might be the following change in code,
 =66rom OpenBSD.

 1 -
 https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
 759
 2 -
 https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
 759.patch
 3 -
 https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
 759.diff
 4 -
 http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/loongson/loongson/yee=
 loong_machdep.c.diff?r1=3D1.25&r2=3D1.26

 ---

 =46rom 5114a369c866e511a0af801150b6c3cf09e97759 Mon Sep 17 00:00:00 2001
 =46rom: visa <visa@openbsd.org>
 Date: Tue, 23 May 2017 16:53:15 +0000
 Subject: [PATCH] Rate limit messages about spurious ISA interrupts on yeelo=
 ong
  systems. On suspend, the USB driver is put to polling mode and it no longer
  claims interrupt requests. If the USB controller keeps raising new requests
  faster than spurious interrupt messages can be printed, interrupt processi=
 ng
  hogs all CPU time and the suspend code gets stuck. The rate limiting should
  prevent this from happening.

 Suspend issue with USB Wi-Fi reported by fcambus@
 Fix tested by and OK fcambus@
 ---
  sys/arch/loongson/loongson/yeeloong_machdep.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

 diff --git a/sys/arch/loongson/loongson/yeeloong_machdep.c b/sys/arch/loong=
 son/loongson/yeeloong_machdep.c
 index 2b48b92dcf82..5dab0e02181f 100644
 --- a/sys/arch/loongson/loongson/yeeloong_machdep.c
 +++ b/sys/arch/loongson/loongson/yeeloong_machdep.c
 @@ -1,4 +1,4 @@
 -/*	$OpenBSD: yeeloong_machdep.c,v 1.25 2016/03/06 19:42:27 mpi Exp $	*/
 +/*	$OpenBSD: yeeloong_machdep.c,v 1.26 2017/05/23 16:53:15 visa Exp $	*/
 =20
  /*
   * Copyright (c) 2009, 2010 Miodrag Vallat.
 @@ -341,6 +341,8 @@ lemote_isa_intr_disestablish(void *v, void *ih)
  uint32_t
  lemote_isa_intr(uint32_t hwpend, struct trapframe *frame)
  {
 +	static const struct timeval ierr_interval =3D { 0, 500000 };
 +	static struct timeval ierr_last;
  	uint64_t imr, isr, mask;
  	int bit;
  	struct intrhand *ih;
 @@ -414,7 +416,8 @@ lemote_isa_intr(uint32_t hwpend, struct trapframe *fram=
 e)
  					if (ret =3D=3D 1)
  						break;
  				}
 -				if (rc =3D=3D 0)
 +				if (rc =3D=3D 0 &&
 +				    ratecheck(&ierr_last, &ierr_interval))
  					printf("spurious isa interrupt %d\n",
  					    bitno);
 =20

 --ilu64zt2TiONFKQ9
 Content-Type: application/pgp-signature; name="signature.asc"

 -----BEGIN PGP SIGNATURE-----

 iQIzBAABCgAdFiEEVxs8bLWVyN7faNljGsBCVe0Hhh8FAmGMODcACgkQGsBCVe0H
 hh/dmA//d/hAOSE+Xm/16Qe7PgLElualHyuGhmuUntkPQ8BlrUyBNCWKXDB2BSrt
 cib34/6ALjG1WyG1QeQm0nfFRVJQe+U4/t49dxkPKfPxruhTi0Ciwd0cyDV5shQ5
 vWyiA66ITj8Uqdgo/jwQZnUobwnW93hwScEUBoVkSkPbjQi3Az/VRiXb2/f47oo/
 pT3Z6kR2qbyEtLvwnuYpyaR5ULTUE20tojkwVqsoZWm1FUvisbJ/j0Faa8vjRCM/
 U9zdMerx3peH1dFJSyqluO/Q/QV1/MpQFU6ezjOKVZpX0W9aUv5N2RKI4lr81ZdI
 8FVxFEH8kdM1ypVJV1tVNUnxXzK2dYxdXK21S2QgpAORuE4sgaw/MW0aj7kqwEPp
 S5T2ndB5jGtqPPKS/gsmpChMqhX0aKlHIoGxEsa1kRCDVrm7dpEfKaCqjJzeLBj0
 dqCNYYTiOGMsLPeHyjdBitz+WWoF/JFCOCpYgK+sAin6QsJbRexxH3C+tQM5Om3a
 aVPA94uuYVf/9yNj5X5i6QWKwIZQIFvdSSk4vIty4iPEuyIHV4OHUXnOWF0DXEeO
 cibQJq+B+6y7gTmDuq2Sv5nWZHWTj2yF8YdCzk2KyfiUNXpd3Y1g44eDwN9np6jx
 QMWICWMteqNETCxggLf1fzwUnASduRRvI3vfr0F2J22v/gl7/Kk=
 =Cvlr
 -----END PGP SIGNATURE-----

 --ilu64zt2TiONFKQ9--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.