Module Name:    src
Committed By:   ryo
Date:           Thu Apr 23 06:27:21 UTC 2020

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

Log Message:
On FIBRE devices, there are times when linkstat interrupt doesn't occur?
reported from Andrius V. thanks.

- use polling instead of linkstat interrupt when FIBRE
- add AQ_FORCE_POLL_LINKSTAT options (not by default)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_aq.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/if_aq.c
diff -u src/sys/dev/pci/if_aq.c:1.12 src/sys/dev/pci/if_aq.c:1.13
--- src/sys/dev/pci/if_aq.c:1.12	Wed Apr 22 22:54:43 2020
+++ src/sys/dev/pci/if_aq.c	Thu Apr 23 06:27:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_aq.c,v 1.12 2020/04/22 22:54:43 christos Exp $	*/
+/*	$NetBSD: if_aq.c,v 1.13 2020/04/23 06:27:21 ryo Exp $	*/
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.12 2020/04/22 22:54:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.13 2020/04/23 06:27:21 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -1310,6 +1310,14 @@ aq_attach(device_t parent, device_t self
 		sc->sc_msix = false;
 	}
 
+	/* XXX: on FIBRE, linkstat interrupt does not occur on boot? */
+	if (aqp->aq_media_type == AQ_MEDIA_TYPE_FIBRE)
+		sc->sc_poll_linkstat = true;
+
+#ifdef AQ_FORCE_POLL_LINKSTAT
+	sc->sc_poll_linkstat = true;
+#endif
+
 	aprint_debug_dev(sc->sc_dev,
 	    "ncpu=%d, pci_msix_count=%d."
 	    " allocate %d interrupts for %d%s queues%s\n",

Reply via email to