Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci On FIBRE devices, there are times when linkstat ...



details:   https://anonhg.NetBSD.org/src/rev/63fde3be5910
branches:  trunk
changeset: 1009434:63fde3be5910
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Apr 23 06:27:21 2020 +0000

description:
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)

diffstat:

 sys/dev/pci/if_aq.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 5449c86b82cd -r 63fde3be5910 sys/dev/pci/if_aq.c
--- a/sys/dev/pci/if_aq.c       Thu Apr 23 04:21:13 2020 +0000
+++ b/sys/dev/pci/if_aq.c       Thu Apr 23 06:27:21 2020 +0000
@@ -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 @@
                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",



Home | Main Index | Thread Index | Old Index