Wed Jul 22 08:22:56 2015 UTC ()
Sorry, if_wm turns MSI/MSI-X default off by my mistake.


(knakahara)
diff -r1.340 -r1.341 src/sys/dev/pci/if_wm.c

cvs diff -r1.340 -r1.341 src/sys/dev/pci/if_wm.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_wm.c 2015/07/21 03:15:50 1.340
+++ src/sys/dev/pci/if_wm.c 2015/07/22 08:22:55 1.341
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_wm.c,v 1.340 2015/07/21 03:15:50 knakahara Exp $ */ 1/* $NetBSD: if_wm.c,v 1.341 2015/07/22 08:22:55 knakahara Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -71,27 +71,27 @@ @@ -71,27 +71,27 @@
71 * Device driver for the Intel i8254x family of Gigabit Ethernet chips. 71 * Device driver for the Intel i8254x family of Gigabit Ethernet chips.
72 * 72 *
73 * TODO (in order of importance): 73 * TODO (in order of importance):
74 * 74 *
75 * - Check XXX'ed comments 75 * - Check XXX'ed comments
76 * - EEE (Energy Efficiency Ethernet) 76 * - EEE (Energy Efficiency Ethernet)
77 * - MSI/MSI-X 77 * - MSI/MSI-X
78 * - Virtual Function 78 * - Virtual Function
79 * - Set LED correctly (based on contents in EEPROM) 79 * - Set LED correctly (based on contents in EEPROM)
80 * - Rework how parameters are loaded from the EEPROM. 80 * - Rework how parameters are loaded from the EEPROM.
81 */ 81 */
82 82
83#include <sys/cdefs.h> 83#include <sys/cdefs.h>
84__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.340 2015/07/21 03:15:50 knakahara Exp $"); 84__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.341 2015/07/22 08:22:55 knakahara Exp $");
85 85
86#ifdef _KERNEL_OPT 86#ifdef _KERNEL_OPT
87#include "opt_net_mpsafe.h" 87#include "opt_net_mpsafe.h"
88#endif 88#endif
89 89
90#include <sys/param.h> 90#include <sys/param.h>
91#include <sys/systm.h> 91#include <sys/systm.h>
92#include <sys/callout.h> 92#include <sys/callout.h>
93#include <sys/mbuf.h> 93#include <sys/mbuf.h>
94#include <sys/malloc.h> 94#include <sys/malloc.h>
95#include <sys/kernel.h> 95#include <sys/kernel.h>
96#include <sys/socket.h> 96#include <sys/socket.h>
97#include <sys/ioctl.h> 97#include <sys/ioctl.h>
@@ -145,29 +145,27 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. @@ -145,29 +145,27 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.
145int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII 145int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII
146 | WM_DEBUG_MANAGE | WM_DEBUG_NVM; 146 | WM_DEBUG_MANAGE | WM_DEBUG_NVM;
147 147
148#define DPRINTF(x, y) if (wm_debug & (x)) printf y 148#define DPRINTF(x, y) if (wm_debug & (x)) printf y
149#else 149#else
150#define DPRINTF(x, y) /* nothing */ 150#define DPRINTF(x, y) /* nothing */
151#endif /* WM_DEBUG */ 151#endif /* WM_DEBUG */
152 152
153#ifdef NET_MPSAFE 153#ifdef NET_MPSAFE
154#define WM_MPSAFE 1 154#define WM_MPSAFE 1
155#endif 155#endif
156 156
157#ifdef __HAVE_PCI_MSI_MSIX 157#ifdef __HAVE_PCI_MSI_MSIX
158#if 0 /* off by default */ 158#define WM_MSI_MSIX 1 /* Enable by default */
159#define WM_MSI_MSIX 1 
160#endif 
161#endif 159#endif
162 160
163/* 161/*
164 * This device driver divides interrupt to TX, RX and link state. 162 * This device driver divides interrupt to TX, RX and link state.
165 * Each MSI-X vector indexes are below. 163 * Each MSI-X vector indexes are below.
166 */ 164 */
167#define WM_MSIX_NINTR 3 165#define WM_MSIX_NINTR 3
168#define WM_MSIX_TXINTR_IDX 0 166#define WM_MSIX_TXINTR_IDX 0
169#define WM_MSIX_RXINTR_IDX 1 167#define WM_MSIX_RXINTR_IDX 1
170#define WM_MSIX_LINKINTR_IDX 2 168#define WM_MSIX_LINKINTR_IDX 2
171#define WM_MAX_NINTR WM_MSIX_NINTR 169#define WM_MAX_NINTR WM_MSIX_NINTR
172 170
173/* 171/*