summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2019-12-16 02:50:54 +0000
committermsaitoh <msaitoh@NetBSD.org>2019-12-16 02:50:54 +0000
commit1d58295bb9738351982e9ee27d0bd1425441e075 (patch)
tree6b2c409a5f439bf18e39a3fe4e2e3f5b6e1f4de2 /sys/dev
parent3d4f988b8de1626b5af6ab1f8501d2cfd0f456e0 (diff)
No functional change:
- Remove unused code. - Remove extra spaces. - KNF.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/ixgbe/if_bypass.c2
-rw-r--r--sys/dev/pci/ixgbe/ix_txrx.c4
-rw-r--r--sys/dev/pci/ixgbe/ixgbe.h8
-rw-r--r--sys/dev/pci/ixgbe/ixgbe_common.c4
-rw-r--r--sys/dev/pci/ixgbe/ixgbe_osdep.c6
-rw-r--r--sys/dev/pci/ixgbe/ixgbe_osdep.h6
-rw-r--r--sys/dev/pci/ixgbe/ixgbe_phy.c4
-rw-r--r--sys/dev/pci/ixgbe/ixv.c21
8 files changed, 21 insertions, 34 deletions
diff --git a/sys/dev/pci/ixgbe/if_bypass.c b/sys/dev/pci/ixgbe/if_bypass.c
index 46fd19b20d8..51bec47c248 100644
--- a/sys/dev/pci/ixgbe/if_bypass.c
+++ b/sys/dev/pci/ixgbe/if_bypass.c
@@ -101,7 +101,7 @@ ixgbe_get_bypass_time(u32 *year, u32 *sec)
nanotime(&current);
*sec = current.tv_sec;
- while(*sec > SEC_THIS_YEAR(*year)) {
+ while (*sec > SEC_THIS_YEAR(*year)) {
*sec -= SEC_THIS_YEAR(*year);
(*year)++;
}
diff --git a/sys/dev/pci/ixgbe/ix_txrx.c b/sys/dev/pci/ixgbe/ix_txrx.c
index 01e507ffc19..914237a3d26 100644
--- a/sys/dev/pci/ixgbe/ix_txrx.c
+++ b/sys/dev/pci/ixgbe/ix_txrx.c
@@ -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 *ifp, struct tx_ring *txr)
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;
diff --git a/sys/dev/pci/ixgbe/ixgbe.h b/sys/dev/pci/ixgbe/ixgbe.h
index 47363f09b68..98984c5ae58 100644
--- a/sys/dev/pci/ixgbe/ixgbe.h
+++ b/sys/dev/pci/ixgbe/ixgbe.h
@@ -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.
*/
diff --git a/sys/dev/pci/ixgbe/ixgbe_common.c b/sys/dev/pci/ixgbe/ixgbe_common.c
index e8cf4a7060f..27a04063cb4 100644
--- a/sys/dev/pci/ixgbe/ixgbe_common.c
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c
@@ -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_fiber(struct ixgbe_hw *hw,
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.
diff --git a/sys/dev/pci/ixgbe/ixgbe_osdep.c b/sys/dev/pci/ixgbe/ixgbe_osdep.c
index f58be3c3d82..5e0ab77bbbc 100644
--- a/sys/dev/pci/ixgbe/ixgbe_osdep.c
+++ b/sys/dev/pci/ixgbe/ixgbe_osdep.c
@@ -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, u32 reg)
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, u32 reg, u16 value)
__SHIFTIN(value, __BITS(31, 16)) | old);
break;
default:
- panic("%s: invalid register (%" PRIx32, __func__, reg);
+ panic("%s: invalid register (%" PRIx32, __func__, reg);
break;
}
diff --git a/sys/dev/pci/ixgbe/ixgbe_osdep.h b/sys/dev/pci/ixgbe/ixgbe_osdep.h
index 4de69f7937a..5f77f2d1276 100644
--- a/sys/dev/pci/ixgbe/ixgbe_osdep.h
+++ b/sys/dev/pci/ixgbe/ixgbe_osdep.h
@@ -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
diff --git a/sys/dev/pci/ixgbe/ixgbe_phy.c b/sys/dev/pci/ixgbe/ixgbe_phy.c
index c2c240306ae..b6826dc50c2 100644
--- a/sys/dev/pci/ixgbe/ixgbe_phy.c
+++ b/sys/dev/pci/ixgbe/ixgbe_phy.c
@@ -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 ixgbe_hw *hw)
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);
diff --git a/sys/dev/pci/ixgbe/ixv.c b/sys/dev/pci/ixgbe/ixv.c
index 04a17b0c25d..165870562be 100644
--- a/sys/dev/pci/ixgbe/ixv.c
+++ b/sys/dev/pci/ixgbe/ixv.c
@@ -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 *adapter)
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 *adapter)
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 *adapter, u16 vtag)
{
struct ixgbe_hw *hw = &adapter->hw;
u16 index, bit;
- int error;
+ int error;
if ((vtag == 0) || (vtag > 4095)) /* Invalid */
return EINVAL;