Module Name: src
Committed By: msaitoh
Date: Mon Dec 16 02:50:54 UTC 2019
Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c ix_txrx.c ixgbe.h ixgbe_common.c
ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixv.c
Log Message:
No functional change:
- Remove unused code.
- Remove extra spaces.
- KNF.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/if_bypass.c \
src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.141 -r1.142 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/if_bypass.c
diff -u src/sys/dev/pci/ixgbe/if_bypass.c:1.4 src/sys/dev/pci/ixgbe/if_bypass.c:1.5
--- src/sys/dev/pci/ixgbe/if_bypass.c:1.4 Wed Apr 4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/if_bypass.c Mon Dec 16 02:50:54 2019
@@ -101,7 +101,7 @@ ixgbe_get_bypass_time(u32 *year, u32 *se
nanotime(¤t);
*sec = current.tv_sec;
- while(*sec > SEC_THIS_YEAR(*year)) {
+ while (*sec > SEC_THIS_YEAR(*year)) {
*sec -= SEC_THIS_YEAR(*year);
(*year)++;
}
Index: src/sys/dev/pci/ixgbe/ixgbe_osdep.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4 src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.5
--- src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4 Wed Apr 4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_osdep.c Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_osdep.c,v 1.4 2018/04/04 08:13:07 msaitoh Exp $ */
+/* $NetBSD: ixgbe_osdep.c,v 1.5 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
@@ -56,7 +56,7 @@ ixgbe_read_pci_cfg(struct ixgbe_hw *hw,
return __SHIFTOUT(pci_conf_read(pc, tag, reg - 2),
__BITS(31, 16));
default:
- panic("%s: invalid register (%" PRIx32, __func__, reg);
+ panic("%s: invalid register (%" PRIx32, __func__, reg);
break;
}
}
@@ -79,7 +79,7 @@ ixgbe_write_pci_cfg(struct ixgbe_hw *hw,
__SHIFTIN(value, __BITS(31, 16)) | old);
break;
default:
- panic("%s: invalid register (%" PRIx32, __func__, reg);
+ panic("%s: invalid register (%" PRIx32, __func__, reg);
break;
}
Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.57 src/sys/dev/pci/ixgbe/ix_txrx.c:1.58
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.57 Sun Nov 10 21:16:36 2019
+++ src/sys/dev/pci/ixgbe/ix_txrx.c Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.57 2019/11/10 21:16:36 chs Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.58 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
@@ -148,7 +148,7 @@ ixgbe_legacy_start_locked(struct ifnet *
return (ENETDOWN);
if (txr->txr_no_space)
return (ENETDOWN);
-
+
while (!IFQ_IS_EMPTY(&ifp->if_snd)) {
if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE)
break;
Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.59 src/sys/dev/pci/ixgbe/ixgbe.h:1.60
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.59 Wed Oct 30 07:27:51 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.h Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.59 2019/10/30 07:27:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.60 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -134,9 +134,9 @@
* RxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
* number of receive descriptors allocated for each RX queue. Increasing this
* value allows the driver to buffer more incoming packets. Each descriptor
- * is 16 bytes. A receive buffer is also allocated for each descriptor.
- *
- * Note: with 8 rings and a dual port card, it is possible to bump up
+ * is 16 bytes. A receive buffer is also allocated for each descriptor.
+ *
+ * Note: with 8 rings and a dual port card, it is possible to bump up
* against the system mbuf pool limit, you can tune nmbclusters
* to adjust for this.
*/
Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.26
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25 Thu Jul 25 09:01:56 2019
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.25 2019/07/25 09:01:56 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.26 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -5520,7 +5520,7 @@ s32 ixgbe_setup_mac_link_multispeed_fibe
goto out;
}
-
+
/* We didn't get link. Configure back to the highest speed we tried,
* (if there was more than one). We call ourselves back with just the
* single highest speed that the user requested.
Index: src/sys/dev/pci/ixgbe/ixgbe_osdep.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.23 src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.24
--- src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.23 Tue Jul 31 09:19:34 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_osdep.h Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_osdep.h,v 1.23 2018/07/31 09:19:34 msaitoh Exp $ */
+/* $NetBSD: ixgbe_osdep.h,v 1.24 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -54,7 +54,7 @@
#include <net/if.h>
#include <net/if_ether.h>
-#define ASSERT(x) if(!(x)) panic("IXGBE: x")
+#define ASSERT(x) if (!(x)) panic("IXGBE: x")
#define EWARN(H, W) printf(W)
enum {
@@ -152,7 +152,7 @@ typedef uint32_t u32;
typedef int32_t s32;
typedef uint64_t u64;
-#define le16_to_cpu
+#define le16_to_cpu
/* This device driver's max interrupt numbers. */
#define IXG_MAX_NINTR 64
Index: src/sys/dev/pci/ixgbe/ixgbe_phy.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.18 src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.19
--- src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.18 Thu Dec 6 13:25:02 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_phy.c Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_phy.c,v 1.18 2018/12/06 13:25:02 msaitoh Exp $ */
+/* $NetBSD: ixgbe_phy.c,v 1.19 2019/12/16 02:50:54 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -876,7 +876,7 @@ s32 ixgbe_setup_phy_link_generic(struct
hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);
- autoneg_reg &= ~AN_CTRL1_AUTOEN;
+ autoneg_reg &= ~AN_CTRL1_AUTOEN;
hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,
IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);
Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.141 src/sys/dev/pci/ixgbe/ixv.c:1.142
--- src/sys/dev/pci/ixgbe/ixv.c:1.141 Mon Nov 18 03:17:51 2019
+++ src/sys/dev/pci/ixgbe/ixv.c Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.141 2019/11/18 03:17:51 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.142 2019/12/16 02:50:54 msaitoh Exp $*/
/******************************************************************************
@@ -766,19 +766,6 @@ ixv_init_locked(struct adapter *adapter)
/* Configure RX settings */
ixv_initialize_receive_units(adapter);
-#if 0 /* XXX isn't it required? -- msaitoh */
- /* Set the various hardware offload abilities */
- ifp->if_hwassist = 0;
- if (ifp->if_capenable & IFCAP_TSO4)
- ifp->if_hwassist |= CSUM_TSO;
- if (ifp->if_capenable & IFCAP_TXCSUM) {
- ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
-#if __FreeBSD_version >= 800000
- ifp->if_hwassist |= CSUM_SCTP;
-#endif
- }
-#endif
-
/* Set up VLAN offload and filter */
ixv_setup_vlan_support(adapter);
@@ -2101,7 +2088,7 @@ ixv_setup_vlan_support(struct adapter *a
adapter->shadow_vfta[idx] |= (u32)1 << (vlanidp->vid % 32);
}
ETHER_UNLOCK(ec);
-
+
/*
* A soft reset zero's out the VFTA, so
* we need to repopulate it now.
@@ -2120,7 +2107,7 @@ ixv_setup_vlan_support(struct adapter *a
if ((vfta & ((u32)1 << j)) == 0)
continue;
vid = (i * 32) + j;
-
+
/* Call the shared code mailbox routine */
while ((rv = hw->mac.ops.set_vfta(hw, vid, 0, TRUE,
FALSE)) != 0) {
@@ -2209,7 +2196,7 @@ ixv_unregister_vlan(struct adapter *adap
{
struct ixgbe_hw *hw = &adapter->hw;
u16 index, bit;
- int error;
+ int error;
if ((vtag == 0) || (vtag > 4095)) /* Invalid */
return EINVAL;