| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: if_wm.c,v 1.368 2015/10/13 10:21:21 knakahara Exp $ */ | | 1 | /* $NetBSD: if_wm.c,v 1.369 2015/10/13 10:26:21 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 |
| @@ -73,27 +73,27 @@ | | | @@ -73,27 +73,27 @@ |
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 | * - Multi queue | | 77 | * - Multi queue |
78 | * - Image Unique ID | | 78 | * - Image Unique ID |
79 | * - LPLU other than PCH* | | 79 | * - LPLU other than PCH* |
80 | * - Virtual Function | | 80 | * - Virtual Function |
81 | * - Set LED correctly (based on contents in EEPROM) | | 81 | * - Set LED correctly (based on contents in EEPROM) |
82 | * - Rework how parameters are loaded from the EEPROM. | | 82 | * - Rework how parameters are loaded from the EEPROM. |
83 | */ | | 83 | */ |
84 | | | 84 | |
85 | #include <sys/cdefs.h> | | 85 | #include <sys/cdefs.h> |
86 | __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.368 2015/10/13 10:21:21 knakahara Exp $"); | | 86 | __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.369 2015/10/13 10:26:21 knakahara Exp $"); |
87 | | | 87 | |
88 | #ifdef _KERNEL_OPT | | 88 | #ifdef _KERNEL_OPT |
89 | #include "opt_net_mpsafe.h" | | 89 | #include "opt_net_mpsafe.h" |
90 | #endif | | 90 | #endif |
91 | | | 91 | |
92 | #include <sys/param.h> | | 92 | #include <sys/param.h> |
93 | #include <sys/systm.h> | | 93 | #include <sys/systm.h> |
94 | #include <sys/callout.h> | | 94 | #include <sys/callout.h> |
95 | #include <sys/mbuf.h> | | 95 | #include <sys/mbuf.h> |
96 | #include <sys/malloc.h> | | 96 | #include <sys/malloc.h> |
97 | #include <sys/kmem.h> | | 97 | #include <sys/kmem.h> |
98 | #include <sys/kernel.h> | | 98 | #include <sys/kernel.h> |
99 | #include <sys/socket.h> | | 99 | #include <sys/socket.h> |
| @@ -7506,27 +7506,27 @@ out: | | | @@ -7506,27 +7506,27 @@ out: |
7506 | } | | 7506 | } |
7507 | | | 7507 | |
7508 | /* | | 7508 | /* |
7509 | * wm_linkintr_msix: | | 7509 | * wm_linkintr_msix: |
7510 | * | | 7510 | * |
7511 | * Interrupt service routine for link status change for MSI-X. | | 7511 | * Interrupt service routine for link status change for MSI-X. |
7512 | */ | | 7512 | */ |
7513 | static int | | 7513 | static int |
7514 | wm_linkintr_msix(void *arg) | | 7514 | wm_linkintr_msix(void *arg) |
7515 | { | | 7515 | { |
7516 | struct wm_softc *sc = arg; | | 7516 | struct wm_softc *sc = arg; |
7517 | uint32_t reg; | | 7517 | uint32_t reg; |
7518 | | | 7518 | |
7519 | DPRINTF(WM_DEBUG_TX, | | 7519 | DPRINTF(WM_DEBUG_LINK, |
7520 | ("%s: LINK: got link intr\n", device_xname(sc->sc_dev))); | | 7520 | ("%s: LINK: got link intr\n", device_xname(sc->sc_dev))); |
7521 | | | 7521 | |
7522 | reg = CSR_READ(sc, WMREG_ICR); | | 7522 | reg = CSR_READ(sc, WMREG_ICR); |
7523 | WM_CORE_LOCK(sc); | | 7523 | WM_CORE_LOCK(sc); |
7524 | if ((sc->sc_stopping) || ((reg & ICR_LSC) == 0)) | | 7524 | if ((sc->sc_stopping) || ((reg & ICR_LSC) == 0)) |
7525 | goto out; | | 7525 | goto out; |
7526 | | | 7526 | |
7527 | WM_EVCNT_INCR(&sc->sc_ev_linkintr); | | 7527 | WM_EVCNT_INCR(&sc->sc_ev_linkintr); |
7528 | wm_linkintr(sc, ICR_LSC); | | 7528 | wm_linkintr(sc, ICR_LSC); |
7529 | | | 7529 | |
7530 | out: | | 7530 | out: |
7531 | WM_CORE_UNLOCK(sc); | | 7531 | WM_CORE_UNLOCK(sc); |
7532 | | | 7532 | |