Module Name:    src
Committed By:   msaitoh
Date:           Fri Mar 15 02:38:20 UTC 2019

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.177 src/sys/dev/pci/ixgbe/ixgbe.c:1.178
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.177	Wed Mar 13 10:02:13 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Mar 15 02:38:20 2019
@@ -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 @@ ixgbe_setup_vlan_hw_support(struct adapt
 	 * 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)

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.110 src/sys/dev/pci/ixgbe/ixv.c:1.111
--- src/sys/dev/pci/ixgbe/ixv.c:1.110	Wed Mar 13 10:08:02 2019
+++ src/sys/dev/pci/ixgbe/ixv.c	Fri Mar 15 02:38:20 2019
@@ -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 @@ ixv_setup_vlan_support(struct adapter *a
 	 * 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++) {

Reply via email to