Module Name:    src
Committed By:   jdolecek
Date:           Fri Jul 17 21:04:14 UTC 2020

Modified Files:
        src/sys/dev/pci: cmdide.c

Log Message:
remove explicit irqack() call for unexpected interrupt; this happens
normally during boot when running identify for the drive as polled
command, and fixes hard hang caused by the irqack() on a sun machine

the unexpected interrupt happens because cmdide doesn't respect
WDCTL_IDS bit and triggers interrupt also for polled commands

also reclassify the "bogus intr" as aprint_verbose() to avoid noise
on boot

discussed and tested by Martin Husemann


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/cmdide.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/dev/pci/cmdide.c
diff -u src/sys/dev/pci/cmdide.c:1.45 src/sys/dev/pci/cmdide.c:1.46
--- src/sys/dev/pci/cmdide.c:1.45	Wed Jul  1 17:57:14 2020
+++ src/sys/dev/pci/cmdide.c	Fri Jul 17 21:04:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cmdide.c,v 1.45 2020/07/01 17:57:14 jdolecek Exp $	*/
+/*	$NetBSD: cmdide.c,v 1.46 2020/07/17 21:04:14 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.45 2020/07/01 17:57:14 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.46 2020/07/17 21:04:14 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -245,10 +245,9 @@ cmd_pci_intr(void *arg)
 		    (i == 1 && (secirq & CMD_ARTTIM23_IRQ))) {
 			crv = wdcintr(wdc_cp);
 			if (crv == 0) {
-				aprint_error("%s:%d: bogus intr\n",
+				aprint_verbose("%s:%d: bogus intr\n",
 				    device_xname(
 				      sc->sc_wdcdev.sc_atac.atac_dev), i);
-				sc->sc_wdcdev.irqack(wdc_cp);
 			} else
 				rv = 1;
 		}

Reply via email to