Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/ixgbe - Simplily. Suggested by knakahara.



details:   https://anonhg.NetBSD.org/src/rev/c449ea3fdb58
branches:  trunk
changeset: 449655:c449ea3fdb58
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Mar 15 02:38:20 2019 +0000

description:
- Simplily. Suggested by knakahara.
- Modify comment. Per queue VLAN enable flags is on 82599 and later.
- Fix typo in comment.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  10 ++++++----
 sys/dev/pci/ixgbe/ixv.c   |   6 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r aa2cdc28a204 -r c449ea3fdb58 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Mar 14 23:49:38 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Mar 15 02:38:20 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.177 2019/03/13 10:02:13 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.178 2019/03/15 02:38:20 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -2376,14 +2376,16 @@
         * on NetBSD.
         */
 
-       /* Enalble HW tagging only if any vlan is attached */
+       /* Enable HW tagging only if any vlan is attached */
        hwtagging = (ec->ec_capenable & ETHERCAP_VLAN_HWTAGGING)
-           && VLAN_ATTACHED(&adapter->osdep.ec);
+           && VLAN_ATTACHED(ec);
 
        /* Setup the queues for vlans */
        for (i = 0; i < adapter->num_queues; i++) {
                rxr = &adapter->rx_rings[i];
-               /* On 82599 the VLAN enable is per/queue in RXDCTL */
+               /*
+                * On 82599 and later, the VLAN enable is per/queue in RXDCTL.
+                */
                if (hw->mac.type != ixgbe_mac_82598EB) {
                        ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxr->me));
                        if (hwtagging)
diff -r aa2cdc28a204 -r c449ea3fdb58 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Thu Mar 14 23:49:38 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Fri Mar 15 02:38:20 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.110 2019/03/13 10:08:02 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.111 2019/03/15 02:38:20 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -1979,9 +1979,9 @@
         * on NetBSD.
         */
 
-       /* Enalble HW tagging only if any vlan is attached */
+       /* Enable HW tagging only if any vlan is attached */
        hwtagging = (ec->ec_capenable & ETHERCAP_VLAN_HWTAGGING)
-           && VLAN_ATTACHED(&adapter->osdep.ec);
+           && VLAN_ATTACHED(ec);
 
        /* Enable the queues */
        for (int i = 0; i < adapter->num_queues; i++) {



Home | Main Index | Thread Index | Old Index