Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Don't allocate MSI-X interrupt on 82583. 82583 c...



details:   https://anonhg.NetBSD.org/src/rev/d2b5a1506ad4
branches:  trunk
changeset: 828151:d2b5a1506ad4
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Nov 30 03:53:24 2017 +0000

description:
Don't allocate MSI-X interrupt on 82583. 82583 chip has a MSI-X capability in
the PCI configuration space but it doesn't support it. At least the document
doesn't say anything about MSI-X. Fixes PR#52767 reported by
Shinichi Doyashiki.

XXX pullup-8.

diffstat:

 sys/dev/pci/if_wm.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 4c211cbfd9bf -r d2b5a1506ad4 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Nov 30 03:31:08 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Nov 30 03:53:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.544 2017/11/22 02:36:52 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.545 2017/11/30 03:53:24 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.544 2017/11/22 02:36:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.545 2017/11/30 03:53:24 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1853,7 +1853,13 @@
 
        /* Allocation settings */
        max_type = PCI_INTR_TYPE_MSIX;
-       counts[PCI_INTR_TYPE_MSIX] = sc->sc_nqueues + 1;
+       /*
+        * 82583 has a MSI-X capability in the PCI configuration space but
+        * it doesn't support it. At least the document doesn't say anything
+        * about MSI-X.
+        */
+       counts[PCI_INTR_TYPE_MSIX]
+           = (sc->sc_type == WM_T_82583) ? 0 : sc->sc_nqueues + 1;
        counts[PCI_INTR_TYPE_MSI] = 1;
        counts[PCI_INTR_TYPE_INTX] = 1;
        /* overridden by disable flags */



Home | Main Index | Thread Index | Old Index