| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ixgbe.c,v 1.199.2.23 2022/06/02 10:45:12 martin Exp $ */ | | 1 | /* $NetBSD: ixgbe.c,v 1.199.2.24 2022/06/03 04:00:49 snj Exp $ */ |
2 | | | 2 | |
3 | /****************************************************************************** | | 3 | /****************************************************************************** |
4 | | | 4 | |
5 | Copyright (c) 2001-2017, Intel Corporation | | 5 | Copyright (c) 2001-2017, Intel Corporation |
6 | All rights reserved. | | 6 | All rights reserved. |
7 | | | 7 | |
8 | Redistribution and use in source and binary forms, with or without | | 8 | Redistribution and use in source and binary forms, with or without |
9 | modification, are permitted provided that the following conditions are met: | | 9 | modification, are permitted provided that the following conditions are met: |
10 | | | 10 | |
11 | 1. Redistributions of source code must retain the above copyright notice, | | 11 | 1. Redistributions of source code must retain the above copyright notice, |
12 | this list of conditions and the following disclaimer. | | 12 | this list of conditions and the following disclaimer. |
13 | | | 13 | |
14 | 2. Redistributions in binary form must reproduce the above copyright | | 14 | 2. Redistributions in binary form must reproduce the above copyright |
| @@ -54,27 +54,27 @@ | | | @@ -54,27 +54,27 @@ |
54 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 54 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
55 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 55 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
56 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 56 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
57 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 57 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
58 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 58 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
59 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 59 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
60 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 60 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
61 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 61 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
62 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 62 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
63 | * POSSIBILITY OF SUCH DAMAGE. | | 63 | * POSSIBILITY OF SUCH DAMAGE. |
64 | */ | | 64 | */ |
65 | | | 65 | |
66 | #include <sys/cdefs.h> | | 66 | #include <sys/cdefs.h> |
67 | __KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.23 2022/06/02 10:45:12 martin Exp $"); | | 67 | __KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.24 2022/06/03 04:00:49 snj Exp $"); |
68 | | | 68 | |
69 | #ifdef _KERNEL_OPT | | 69 | #ifdef _KERNEL_OPT |
70 | #include "opt_inet.h" | | 70 | #include "opt_inet.h" |
71 | #include "opt_inet6.h" | | 71 | #include "opt_inet6.h" |
72 | #include "opt_net_mpsafe.h" | | 72 | #include "opt_net_mpsafe.h" |
73 | #endif | | 73 | #endif |
74 | | | 74 | |
75 | #include "ixgbe.h" | | 75 | #include "ixgbe.h" |
76 | #include "ixgbe_sriov.h" | | 76 | #include "ixgbe_sriov.h" |
77 | #include "vlan.h" | | 77 | #include "vlan.h" |
78 | | | 78 | |
79 | #include <sys/cprng.h> | | 79 | #include <sys/cprng.h> |
80 | #include <dev/mii/mii.h> | | 80 | #include <dev/mii/mii.h> |
| @@ -6532,27 +6532,27 @@ ixgbe_handle_que(void *context) | | | @@ -6532,27 +6532,27 @@ ixgbe_handle_que(void *context) |
6532 | && (!ixgbe_legacy_ring_empty(ifp, NULL))) | | 6532 | && (!ixgbe_legacy_ring_empty(ifp, NULL))) |
6533 | ixgbe_legacy_start_locked(ifp, txr); | | 6533 | ixgbe_legacy_start_locked(ifp, txr); |
6534 | IXGBE_TX_UNLOCK(txr); | | 6534 | IXGBE_TX_UNLOCK(txr); |
6535 | } | | 6535 | } |
6536 | | | 6536 | |
6537 | if (more) { | | 6537 | if (more) { |
6538 | IXGBE_EVC_ADD(&que->req, 1); | | 6538 | IXGBE_EVC_ADD(&que->req, 1); |
6539 | ixgbe_sched_handle_que(adapter, que); | | 6539 | ixgbe_sched_handle_que(adapter, que); |
6540 | } else if (que->res != NULL) { | | 6540 | } else if (que->res != NULL) { |
6541 | /* MSIX: Re-enable this interrupt */ | | 6541 | /* MSIX: Re-enable this interrupt */ |
6542 | ixgbe_enable_queue(adapter, que->msix); | | 6542 | ixgbe_enable_queue(adapter, que->msix); |
6543 | } else { | | 6543 | } else { |
6544 | /* INTx or MSI */ | | 6544 | /* INTx or MSI */ |
6545 | ixgbe_enable_intr(adapter); | | 6545 | ixgbe_enable_queue(adapter, 0); |
6546 | } | | 6546 | } |
6547 | | | 6547 | |
6548 | return; | | 6548 | return; |
6549 | } /* ixgbe_handle_que */ | | 6549 | } /* ixgbe_handle_que */ |
6550 | | | 6550 | |
6551 | /************************************************************************ | | 6551 | /************************************************************************ |
6552 | * ixgbe_handle_que_work | | 6552 | * ixgbe_handle_que_work |
6553 | ************************************************************************/ | | 6553 | ************************************************************************/ |
6554 | static void | | 6554 | static void |
6555 | ixgbe_handle_que_work(struct work *wk, void *context) | | 6555 | ixgbe_handle_que_work(struct work *wk, void *context) |
6556 | { | | 6556 | { |
6557 | struct ix_queue *que = container_of(wk, struct ix_queue, wq_cookie); | | 6557 | struct ix_queue *que = container_of(wk, struct ix_queue, wq_cookie); |
6558 | | | 6558 | |