Netdev List
 help / color / mirror / Atom feed
* [net 5/6] net/mlx5e: IPoIB, Only support regular RQ for now
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

IPoIB doesn't support striding RQ at the moment, for this
we need to explicitly choose non striding RQ in IPoIB init,
even if the HW supports it.

Fixes: 8f493ffd88ea ("net/mlx5e: IPoIB, RX steering RSS RQTs and TIRs")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/ipoib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
index 019c230da498..56bff3540954 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
@@ -66,6 +66,10 @@ static void mlx5i_init(struct mlx5_core_dev *mdev,
 
 	mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev));
 
+	/* Override RQ params as IPoIB supports only LINKED LIST RQ for now */
+	mlx5e_set_rq_type_params(mdev, &priv->channels.params, MLX5_WQ_TYPE_LINKED_LIST);
+	priv->channels.params.lro_en = false;
+
 	mutex_init(&priv->state_lock);
 
 	netdev->hw_features    |= NETIF_F_SG;
-- 
2.11.0

^ permalink raw reply related

* [net 4/6] net/mlx5e: Fix setup TC ndo
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

Fail-safe support patches introduced a trivial bug,
setup tc callback is doing a wrong check of the netdevice state,
the fix is simply to invert the condition.

Fixes: 6f9485af4020 ("net/mlx5e: Fail safe tc setup")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 7ac6bcc0e227..c416155115c5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2997,7 +2997,7 @@ static int mlx5e_setup_tc(struct net_device *netdev, u8 tc)
 	new_channels.params = priv->channels.params;
 	new_channels.params.num_tc = tc ? tc : 1;
 
-	if (test_bit(MLX5E_STATE_OPENED, &priv->state)) {
+	if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
 		priv->channels.params = new_channels.params;
 		goto out;
 	}
-- 
2.11.0

^ permalink raw reply related

* [net 3/6] net/mlx5e: Fix ethtool pause support and advertise reporting
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Gal Pressman, kernel-team, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

From: Gal Pressman <galp@mellanox.com>

Pause bit should set when RX pause is on, not TX pause.
Also, setting Asym_Pause is incorrect, and should be turned off.

Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 87a7a66363de..e235ff9a00c8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -800,7 +800,6 @@ static void get_supported(u32 eth_proto_cap,
 	ptys2ethtool_supported_port(link_ksettings, eth_proto_cap);
 	ptys2ethtool_supported_link(supported, eth_proto_cap);
 	ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Pause);
-	ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Asym_Pause);
 }
 
 static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
@@ -810,7 +809,7 @@ static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
 	unsigned long *advertising = link_ksettings->link_modes.advertising;
 
 	ptys2ethtool_adver_link(advertising, eth_proto_cap);
-	if (tx_pause)
+	if (rx_pause)
 		ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Pause);
 	if (tx_pause ^ rx_pause)
 		ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Asym_Pause);
-- 
2.11.0

^ permalink raw reply related

* [pull request][net 0/6] Mellanox, mlx5 fixes 2017-05-12
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Saeed Mahameed

Hi Dave,

This series contains some mlx5 fixes for net.
Please pull and let me know if there's any problem.

For -stable:
("net/mlx5e: Fix ethtool pause support and advertise reporting") kernels >= 4.8
("net/mlx5e: Use the correct pause values for ethtool advertising") kernels >= 4.8

Thanks,
Saeed.

---

The following changes since commit df0c8d911abf6ba97b2c2fc3c5a12769e0b081a3:

  net: phy: Call bus->reset() after releasing PHYs from reset (2017-05-11 23:06:18 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2017-05-12

for you to fetch changes up to 5405a3d4687a3e2fad41a59c3cecbd33b7200fa1:

  net/mlx5: Use underlay QPN from the root name space (2017-05-12 14:18:41 +0300)

----------------------------------------------------------------
mlx5-fixes-2017-05-12

Misc mlx5 fixes

----------------------------------------------------------------
Gal Pressman (3):
      net/mlx5e: Use a spinlock to synchronize statistics
      net/mlx5e: Use the correct pause values for ethtool advertising
      net/mlx5e: Fix ethtool pause support and advertise reporting

Saeed Mahameed (2):
      net/mlx5e: Fix setup TC ndo
      net/mlx5e: IPoIB, Only support regular RQ for now

Yishai Hadas (1):
      net/mlx5: Use underlay QPN from the root name space

 drivers/net/ethernet/mellanox/mlx5/core/en.h       |  3 +-
 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 21 +++++++---
 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c    |  5 +--
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 47 ++++++++++++++++------
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c   |  9 ++---
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h   |  3 +-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c  | 25 ++++++++++--
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h  |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/ipoib.c    | 11 ++++-
 include/linux/mlx5/fs.h                            |  4 +-
 10 files changed, 93 insertions(+), 37 deletions(-)

^ permalink raw reply

* [net 6/6] net/mlx5: Use underlay QPN from the root name space
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Yishai Hadas, Erez Shitrit, Maor Gottlieb, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

From: Yishai Hadas <yishaih@mellanox.com>

Root flow table is dynamically changed by the underlying flow steering
layer, and IPoIB/ULPs have no idea what will be the root flow table in
the future, hence we need a dynamic infrastructure to move Underlay QPs
with the root flow table.

Fixes: b3ba51498bdd ("net/mlx5: Refactor create flow table method to accept underlay QP")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c   |  5 ++---
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c  |  9 +++-----
 drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h  |  3 ++-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 25 +++++++++++++++++++----
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.h |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/ipoib.c   |  7 +++++--
 include/linux/mlx5/fs.h                           |  4 +++-
 8 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index c41cf7e82795..34d3377a6147 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -1004,7 +1004,7 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv);
 void mlx5e_destroy_direct_tirs(struct mlx5e_priv *priv);
 void mlx5e_destroy_rqt(struct mlx5e_priv *priv, struct mlx5e_rqt *rqt);
 
-int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn);
+int mlx5e_create_ttc_table(struct mlx5e_priv *priv);
 void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv);
 
 int mlx5e_create_tis(struct mlx5_core_dev *mdev, int tc,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
index 576d6787b484..53ed58320a24 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
@@ -800,7 +800,7 @@ void mlx5e_destroy_ttc_table(struct mlx5e_priv *priv)
 	mlx5e_destroy_flow_table(&ttc->ft);
 }
 
-int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn)
+int mlx5e_create_ttc_table(struct mlx5e_priv *priv)
 {
 	struct mlx5e_ttc_table *ttc = &priv->fs.ttc;
 	struct mlx5_flow_table_attr ft_attr = {};
@@ -810,7 +810,6 @@ int mlx5e_create_ttc_table(struct mlx5e_priv *priv, u32 underlay_qpn)
 	ft_attr.max_fte = MLX5E_TTC_TABLE_SIZE;
 	ft_attr.level = MLX5E_TTC_FT_LEVEL;
 	ft_attr.prio = MLX5E_NIC_PRIO;
-	ft_attr.underlay_qpn = underlay_qpn;
 
 	ft->t = mlx5_create_flow_table(priv->fs.ns, &ft_attr);
 	if (IS_ERR(ft->t)) {
@@ -1147,7 +1146,7 @@ int mlx5e_create_flow_steering(struct mlx5e_priv *priv)
 		priv->netdev->hw_features &= ~NETIF_F_NTUPLE;
 	}
 
-	err = mlx5e_create_ttc_table(priv, 0);
+	err = mlx5e_create_ttc_table(priv);
 	if (err) {
 		netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n",
 			   err);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
index 19e3d2fc2099..fcec7bedd3cd 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
@@ -40,28 +40,25 @@
 #include "eswitch.h"
 
 int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev,
-			    struct mlx5_flow_table *ft)
+			    struct mlx5_flow_table *ft, u32 underlay_qpn)
 {
 	u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)]   = {0};
 	u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {0};
 
 	if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
-	    ft->underlay_qpn == 0)
+	    underlay_qpn == 0)
 		return 0;
 
 	MLX5_SET(set_flow_table_root_in, in, opcode,
 		 MLX5_CMD_OP_SET_FLOW_TABLE_ROOT);
 	MLX5_SET(set_flow_table_root_in, in, table_type, ft->type);
 	MLX5_SET(set_flow_table_root_in, in, table_id, ft->id);
+	MLX5_SET(set_flow_table_root_in, in, underlay_qpn, underlay_qpn);
 	if (ft->vport) {
 		MLX5_SET(set_flow_table_root_in, in, vport_number, ft->vport);
 		MLX5_SET(set_flow_table_root_in, in, other_vport, 1);
 	}
 
-	if ((MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_IB) &&
-	    ft->underlay_qpn != 0)
-		MLX5_SET(set_flow_table_root_in, in, underlay_qpn, ft->underlay_qpn);
-
 	return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
 }
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h
index 8fad80688536..0f98a7cf4877 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h
@@ -71,7 +71,8 @@ int mlx5_cmd_delete_fte(struct mlx5_core_dev *dev,
 			unsigned int index);
 
 int mlx5_cmd_update_root_ft(struct mlx5_core_dev *dev,
-			    struct mlx5_flow_table *ft);
+			    struct mlx5_flow_table *ft,
+			    u32 underlay_qpn);
 
 int mlx5_cmd_fc_alloc(struct mlx5_core_dev *dev, u16 *id);
 int mlx5_cmd_fc_free(struct mlx5_core_dev *dev, u16 id);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index b8a176503d38..0e487e8ca634 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -650,7 +650,7 @@ static int update_root_ft_create(struct mlx5_flow_table *ft, struct fs_prio
 	if (ft->level >= min_level)
 		return 0;
 
-	err = mlx5_cmd_update_root_ft(root->dev, ft);
+	err = mlx5_cmd_update_root_ft(root->dev, ft, root->underlay_qpn);
 	if (err)
 		mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n",
 			       ft->id);
@@ -818,8 +818,6 @@ static struct mlx5_flow_table *__mlx5_create_flow_table(struct mlx5_flow_namespa
 		goto unlock_root;
 	}
 
-	ft->underlay_qpn = ft_attr->underlay_qpn;
-
 	tree_init_node(&ft->node, 1, del_flow_table);
 	log_table_sz = ft->max_fte ? ilog2(ft->max_fte) : 0;
 	next_ft = find_next_chained_ft(fs_prio);
@@ -1489,7 +1487,8 @@ static int update_root_ft_destroy(struct mlx5_flow_table *ft)
 
 	new_root_ft = find_next_ft(ft);
 	if (new_root_ft) {
-		int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft);
+		int err = mlx5_cmd_update_root_ft(root->dev, new_root_ft,
+						  root->underlay_qpn);
 
 		if (err) {
 			mlx5_core_warn(root->dev, "Update root flow table of id=%u failed\n",
@@ -2062,3 +2061,21 @@ int mlx5_init_fs(struct mlx5_core_dev *dev)
 	mlx5_cleanup_fs(dev);
 	return err;
 }
+
+int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn)
+{
+	struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns;
+
+	root->underlay_qpn = underlay_qpn;
+	return 0;
+}
+EXPORT_SYMBOL(mlx5_fs_add_rx_underlay_qpn);
+
+int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn)
+{
+	struct mlx5_flow_root_namespace *root = dev->priv.steering->root_ns;
+
+	root->underlay_qpn = 0;
+	return 0;
+}
+EXPORT_SYMBOL(mlx5_fs_remove_rx_underlay_qpn);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
index 81eafc7b9dd9..990acee6fb09 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
@@ -118,7 +118,6 @@ struct mlx5_flow_table {
 	/* FWD rules that point on this flow table */
 	struct list_head		fwd_rules;
 	u32				flags;
-	u32				underlay_qpn;
 };
 
 struct mlx5_fc_cache {
@@ -195,6 +194,7 @@ struct mlx5_flow_root_namespace {
 	struct mlx5_flow_table		*root_ft;
 	/* Should be held when chaining flow tables */
 	struct mutex			chain_lock;
+	u32				underlay_qpn;
 };
 
 int mlx5_init_fc_stats(struct mlx5_core_dev *dev);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
index 56bff3540954..cc1858752e70 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib.c
@@ -160,6 +160,8 @@ static int mlx5i_create_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core
 
 static void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp)
 {
+	mlx5_fs_remove_rx_underlay_qpn(mdev, qp->qpn);
+
 	mlx5_core_destroy_qp(mdev, qp);
 }
 
@@ -174,6 +176,8 @@ static int mlx5i_init_tx(struct mlx5e_priv *priv)
 		return err;
 	}
 
+	mlx5_fs_add_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn);
+
 	err = mlx5e_create_tis(priv->mdev, 0 /* tc */, ipriv->qp.qpn, &priv->tisn[0]);
 	if (err) {
 		mlx5_core_warn(priv->mdev, "create tis failed, %d\n", err);
@@ -193,7 +197,6 @@ static void mlx5i_cleanup_tx(struct mlx5e_priv *priv)
 
 static int mlx5i_create_flow_steering(struct mlx5e_priv *priv)
 {
-	struct mlx5i_priv *ipriv = priv->ppriv;
 	int err;
 
 	priv->fs.ns = mlx5_get_flow_namespace(priv->mdev,
@@ -209,7 +212,7 @@ static int mlx5i_create_flow_steering(struct mlx5e_priv *priv)
 		priv->netdev->hw_features &= ~NETIF_F_NTUPLE;
 	}
 
-	err = mlx5e_create_ttc_table(priv, ipriv->qp.qpn);
+	err = mlx5e_create_ttc_table(priv);
 	if (err) {
 		netdev_err(priv->netdev, "Failed to create ttc table, err=%d\n",
 			   err);
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 1b166d2e19c5..b25e7baa273e 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -109,7 +109,6 @@ struct mlx5_flow_table_attr {
 	int max_fte;
 	u32 level;
 	u32 flags;
-	u32 underlay_qpn;
 };
 
 struct mlx5_flow_table *
@@ -167,4 +166,7 @@ struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging);
 void mlx5_fc_destroy(struct mlx5_core_dev *dev, struct mlx5_fc *counter);
 void mlx5_fc_query_cached(struct mlx5_fc *counter,
 			  u64 *bytes, u64 *packets, u64 *lastuse);
+int mlx5_fs_add_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
+int mlx5_fs_remove_rx_underlay_qpn(struct mlx5_core_dev *dev, u32 underlay_qpn);
+
 #endif
-- 
2.11.0

^ permalink raw reply related

* [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Gal Pressman, kernel-team, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

From: Gal Pressman <galp@mellanox.com>

Add a spinlock to prevent races when querying statistics, for example
querying counters in the middle of a non atomic memcpy() operation in
mlx5e_update_stats().

This RW lock should be held when accessing priv->stats, to prevent other
reads/writes.

Fixes: 9218b44dcc05 ("net/mlx5e: Statistics handling refactoring")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h       |  1 +
 .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 12 ++++--
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 45 ++++++++++++++++------
 3 files changed, 44 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 0099a3e397bc..c41cf7e82795 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -756,6 +756,7 @@ struct mlx5e_priv {
 	struct mlx5_core_dev      *mdev;
 	struct net_device         *netdev;
 	struct mlx5e_stats         stats;
+	rwlock_t                   stats_lock;
 	struct mlx5e_tstamp        tstamp;
 	u16 q_counter;
 #ifdef CONFIG_MLX5_CORE_EN_DCB
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index ce7b09d72ff6..0a7734761ece 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -305,6 +305,7 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 	struct mlx5_priv *mlx5_priv;
 	int i, j, tc, prio, idx = 0;
 	unsigned long pfc_combined;
+	bool global_pause;
 
 	if (!data)
 		return;
@@ -313,8 +314,11 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 	if (test_bit(MLX5E_STATE_OPENED, &priv->state))
 		mlx5e_update_stats(priv);
 	channels = &priv->channels;
+	pfc_combined = mlx5e_query_pfc_combined(priv);
+	global_pause = mlx5e_query_global_pause_combined(priv);
 	mutex_unlock(&priv->state_lock);
 
+	read_lock(&priv->stats_lock);
 	for (i = 0; i < NUM_SW_COUNTERS; i++)
 		data[idx++] = MLX5E_READ_CTR64_CPU(&priv->stats.sw,
 						   sw_stats_desc, i);
@@ -353,7 +357,6 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 						 pport_per_prio_traffic_stats_desc, i);
 	}
 
-	pfc_combined = mlx5e_query_pfc_combined(priv);
 	for_each_set_bit(prio, &pfc_combined, NUM_PPORT_PRIO) {
 		for (i = 0; i < NUM_PPORT_PER_PRIO_PFC_COUNTERS; i++) {
 			data[idx++] = MLX5E_READ_CTR64_BE(&priv->stats.pport.per_prio_counters[prio],
@@ -361,7 +364,7 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 		}
 	}
 
-	if (mlx5e_query_global_pause_combined(priv)) {
+	if (global_pause) {
 		for (i = 0; i < NUM_PPORT_PER_PRIO_PFC_COUNTERS; i++) {
 			data[idx++] = MLX5E_READ_CTR64_BE(&priv->stats.pport.per_prio_counters[0],
 							  pport_per_prio_pfc_stats_desc, i);
@@ -379,7 +382,7 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 						   mlx5e_pme_error_desc, i);
 
 	if (!test_bit(MLX5E_STATE_OPENED, &priv->state))
-		return;
+		goto out;
 
 	/* per channel counters */
 	for (i = 0; i < channels->num; i++)
@@ -393,6 +396,9 @@ static void mlx5e_get_ethtool_stats(struct net_device *dev,
 			for (j = 0; j < NUM_SQ_STATS; j++)
 				data[idx++] = MLX5E_READ_CTR64_CPU(&channels->c[i]->sq[tc].stats,
 								   sq_stats_desc, j);
+
+out:
+	read_unlock(&priv->stats_lock);
 }
 
 static u32 mlx5e_rx_wqes_to_packets(struct mlx5e_priv *priv, int rq_wq_type,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a61b71b6fff3..7ac6bcc0e227 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -166,6 +166,13 @@ static void mlx5e_tx_timeout_work(struct work_struct *work)
 	rtnl_unlock();
 }
 
+#define MLX5E_STATS_WRITE(priv, name, s)                            \
+	do {                                                        \
+		write_lock(&(priv)->stats_lock);                    \
+		memcpy(&(priv)->stats.name, (s), sizeof(*(s)));     \
+		write_unlock(&(priv)->stats_lock);                  \
+	} while (0)
+
 static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
 {
 	struct mlx5e_sw_stats temp, *s = &temp;
@@ -222,17 +229,21 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
 	s->tx_csum_partial = s->tx_packets - tx_offload_none - s->tx_csum_partial_inner;
 	s->rx_csum_unnecessary = s->rx_packets - s->rx_csum_none - s->rx_csum_complete;
 
+	read_lock(&priv->stats_lock);
 	s->link_down_events_phy = MLX5_GET(ppcnt_reg,
 				priv->stats.pport.phy_counters,
 				counter_set.phys_layer_cntrs.link_down_events);
-	memcpy(&priv->stats.sw, s, sizeof(*s));
+	read_unlock(&priv->stats_lock);
+
+	MLX5E_STATS_WRITE(priv, sw, s);
 }
 
 static void mlx5e_update_vport_counters(struct mlx5e_priv *priv)
 {
 	int outlen = MLX5_ST_SZ_BYTES(query_vport_counter_out);
-	u32 *out = (u32 *)priv->stats.vport.query_vport_out;
 	u32 in[MLX5_ST_SZ_DW(query_vport_counter_in)] = {0};
+	struct mlx5e_vport_stats          vstats;
+	u32 *out = (u32 *)vstats.query_vport_out;
 	struct mlx5_core_dev *mdev = priv->mdev;
 
 	MLX5_SET(query_vport_counter_in, in, opcode,
@@ -241,19 +252,22 @@ static void mlx5e_update_vport_counters(struct mlx5e_priv *priv)
 	MLX5_SET(query_vport_counter_in, in, other_vport, 0);
 
 	mlx5_cmd_exec(mdev, in, sizeof(in), out, outlen);
+
+	MLX5E_STATS_WRITE(priv, vport, &vstats);
 }
 
 static void mlx5e_update_pport_counters(struct mlx5e_priv *priv)
 {
-	struct mlx5e_pport_stats *pstats = &priv->stats.pport;
 	struct mlx5_core_dev *mdev = priv->mdev;
 	int sz = MLX5_ST_SZ_BYTES(ppcnt_reg);
-	int prio;
+	struct mlx5e_pport_stats *pstats;
 	void *out;
+	int prio;
 	u32 *in;
 
-	in = mlx5_vzalloc(sz);
-	if (!in)
+	in     = mlx5_vzalloc(sz);
+	pstats = mlx5_vzalloc(sizeof(*pstats));
+	if (!in || !pstats)
 		goto free_out;
 
 	MLX5_SET(ppcnt_reg, in, local_port, 1);
@@ -288,26 +302,31 @@ static void mlx5e_update_pport_counters(struct mlx5e_priv *priv)
 				     MLX5_REG_PPCNT, 0, 0);
 	}
 
+	MLX5E_STATS_WRITE(priv, pport, pstats);
+
 free_out:
 	kvfree(in);
+	kvfree(pstats);
 }
 
 static void mlx5e_update_q_counter(struct mlx5e_priv *priv)
 {
-	struct mlx5e_qcounter_stats *qcnt = &priv->stats.qcnt;
+	struct mlx5e_qcounter_stats qcnt;
 
 	if (!priv->q_counter)
 		return;
 
 	mlx5_core_query_out_of_buffer(priv->mdev, priv->q_counter,
-				      &qcnt->rx_out_of_buffer);
+				      &qcnt.rx_out_of_buffer);
+
+	MLX5E_STATS_WRITE(priv, qcnt, &qcnt);
 }
 
 static void mlx5e_update_pcie_counters(struct mlx5e_priv *priv)
 {
-	struct mlx5e_pcie_stats *pcie_stats = &priv->stats.pcie;
 	struct mlx5_core_dev *mdev = priv->mdev;
 	int sz = MLX5_ST_SZ_BYTES(mpcnt_reg);
+	struct mlx5e_pcie_stats pcie_stats;
 	void *out;
 	u32 *in;
 
@@ -318,10 +337,12 @@ static void mlx5e_update_pcie_counters(struct mlx5e_priv *priv)
 	if (!in)
 		return;
 
-	out = pcie_stats->pcie_perf_counters;
+	out = pcie_stats.pcie_perf_counters;
 	MLX5_SET(mpcnt_reg, in, grp, MLX5_PCIE_PERFORMANCE_COUNTERS_GROUP);
 	mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_MPCNT, 0, 0);
 
+	MLX5E_STATS_WRITE(priv, pcie, &pcie_stats);
+
 	kvfree(in);
 }
 
@@ -3030,6 +3051,7 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
 	struct mlx5e_vport_stats *vstats = &priv->stats.vport;
 	struct mlx5e_pport_stats *pstats = &priv->stats.pport;
 
+	read_lock(&priv->stats_lock);
 	if (mlx5e_is_uplink_rep(priv)) {
 		stats->rx_packets = PPORT_802_3_GET(pstats, a_frames_received_ok);
 		stats->rx_bytes   = PPORT_802_3_GET(pstats, a_octets_received_ok);
@@ -3064,7 +3086,7 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
 	 */
 	stats->multicast =
 		VPORT_COUNTER_GET(vstats, received_eth_multicast.packets);
-
+	read_unlock(&priv->stats_lock);
 }
 
 static void mlx5e_set_rx_mode(struct net_device *dev)
@@ -3901,6 +3923,7 @@ static void mlx5e_build_nic_netdev_priv(struct mlx5_core_dev *mdev,
 	mlx5e_build_nic_params(mdev, &priv->channels.params, profile->max_nch(mdev));
 
 	mutex_init(&priv->state_lock);
+	rwlock_init(&priv->stats_lock);
 
 	INIT_WORK(&priv->update_carrier_work, mlx5e_update_carrier_work);
 	INIT_WORK(&priv->set_rx_mode_work, mlx5e_set_rx_mode_work);
-- 
2.11.0

^ permalink raw reply related

* [net 2/6] net/mlx5e: Use the correct pause values for ethtool advertising
From: Saeed Mahameed @ 2017-05-12 11:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Gal Pressman, kernel-team, Saeed Mahameed
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>

From: Gal Pressman <galp@mellanox.com>

Query the operational pause from firmware (PFCC register) instead of
always passing zeros.

Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 0a7734761ece..87a7a66363de 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -855,6 +855,8 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
 	struct mlx5e_priv *priv    = netdev_priv(netdev);
 	struct mlx5_core_dev *mdev = priv->mdev;
 	u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0};
+	u32 rx_pause = 0;
+	u32 tx_pause = 0;
 	u32 eth_proto_cap;
 	u32 eth_proto_admin;
 	u32 eth_proto_lp;
@@ -877,11 +879,13 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
 	an_disable_admin = MLX5_GET(ptys_reg, out, an_disable_admin);
 	an_status        = MLX5_GET(ptys_reg, out, an_status);
 
+	mlx5_query_port_pause(mdev, &rx_pause, &tx_pause);
+
 	ethtool_link_ksettings_zero_link_mode(link_ksettings, supported);
 	ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising);
 
 	get_supported(eth_proto_cap, link_ksettings);
-	get_advertising(eth_proto_admin, 0, 0, link_ksettings);
+	get_advertising(eth_proto_admin, tx_pause, rx_pause, link_ksettings);
 	get_speed_duplex(netdev, eth_proto_oper, link_ksettings);
 
 	eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap;
-- 
2.11.0

^ permalink raw reply related

* [PATCH] net: ipv6: Truncate single route when it doesn't fit into dump buffer.
From: Jan Moskyto Matejka @ 2017-05-12 11:15 UTC (permalink / raw)
  To: netdev
  Cc: Jan Moskyto Matejka, linux-kernel, David Ahern, David S. Miller,
	Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
	Patrick McHardy

When rt6_fill_node() fails to fit the route into the buffer,
it drops the route, returns -EMSGSIZE and waits for buffer flush.
This condition is detected by non-null return value and non-empty
buffer; the buffer is flushed and rt6_fill_node() restarted.

However, when a single route generates such a long message that
it doesn't fit into the buffer itself, inet6_dump_fib() misinterprets
the non-null return value together with non-empty buffer as end of dump
and silently truncates the dump.

This patch fixes this by explicitly truncating the message and
inidicating it by NLM_F_TRUNC flag in its nlmsghdr.

Reproducer:
  # ip -6 route show
  ... it shows some routes
  # ip -6 route add fccc::/64 via fe80::ff:fe00:0 dev testdev table 2
  # for a in $(seq 1 1000); do
      ip -6 route append fccc::/64 via fe80::ff:fe00:$a dev testdev table 2
    done
  # ip -6 route show
  ... the output is truncated

This came to light by David Ahern's
commit beb1afac518dec5a15dc ("net: ipv6: Add support to dump multipath
routes via RTA_MULTIPATH attribute")
but obviously existed before, just hidden.

Signed-off-by: Jan Moskyto Matejka <mq@ucw.cz>
---
 include/net/ip6_route.h      |  2 +-
 include/uapi/linux/netlink.h |  1 +
 net/ipv6/ip6_fib.c           | 17 ++++++++++++++---
 net/ipv6/route.c             |  9 +++++++--
 net/netlink/af_netlink.c     |  7 ++++++-
 5 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 9dc2c182a263..9b035b6bdf8c 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -156,7 +156,7 @@ struct rt6_rtnl_dump_arg {
 	struct net *net;
 };
 
-int rt6_dump_route(struct rt6_info *rt, void *p_arg);
+int rt6_dump_route(struct rt6_info *rt, void *p_arg, int truncate);
 void rt6_ifdown(struct net *net, struct net_device *dev);
 void rt6_mtu_change(struct net_device *dev, unsigned int mtu);
 void rt6_remove_prefsrc(struct inet6_ifaddr *ifp);
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index f3946a27bd07..1d463dbf89db 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -56,6 +56,7 @@ struct nlmsghdr {
 #define NLM_F_ECHO		8	/* Echo this request 		*/
 #define NLM_F_DUMP_INTR		16	/* Dump was inconsistent due to sequence change */
 #define NLM_F_DUMP_FILTERED	32	/* Dump was filtered as requested */
+#define NLM_F_TRUNC		64	/* Message truncated */
 
 /* Modifiers to GET request */
 #define NLM_F_ROOT	0x100	/* specify tree	root	*/
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index d4bf2c68a545..4a962a61e559 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -310,13 +310,20 @@ static int fib6_dump_node(struct fib6_walker *w)
 {
 	int res;
 	struct rt6_info *rt;
+	struct rt6_rtnl_dump_arg *arg = (struct rt6_rtnl_dump_arg *)w->args;
 
 	for (rt = w->leaf; rt; rt = rt->dst.rt6_next) {
-		res = rt6_dump_route(rt, w->args);
+		res = rt6_dump_route(rt, w->args, 0);
+		if (res < 0 && arg->skb->len == 0)
+			/* One single route is too long for buffer.
+			 * Will truncate it.
+			 */
+			res = rt6_dump_route(rt, w->args, 1);
+
 		if (res < 0) {
 			/* Frame is full, suspend walking */
 			w->leaf = rt;
-			return 1;
+			return res;
 		}
 
 		/* Multipath routes are dumped in one route with the
@@ -456,9 +463,14 @@ static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
 	cb->args[1] = e;
 	cb->args[0] = h;
 
-	res = res < 0 ? res : skb->len;
 	if (res <= 0)
 		fib6_dump_end(cb);
+
+	if (res == -EMSGSIZE && skb->len)
+		res = skb->len;
+	else
+		res = res < 0 ? res : skb->len;
+
 	return res;
 }
 
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fb174b590fd3..0adcbdba87a1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3539,11 +3539,16 @@ static int rt6_fill_node(struct net *net,
 	return 0;
 
 nla_put_failure:
+	if (flags & NLM_F_TRUNC) {
+		nlmsg_end(skb, nlh);
+		return 0;
+	}
+
 	nlmsg_cancel(skb, nlh);
 	return -EMSGSIZE;
 }
 
-int rt6_dump_route(struct rt6_info *rt, void *p_arg)
+int rt6_dump_route(struct rt6_info *rt, void *p_arg, int truncate)
 {
 	struct rt6_rtnl_dump_arg *arg = (struct rt6_rtnl_dump_arg *) p_arg;
 	struct net *net = arg->net;
@@ -3565,7 +3570,7 @@ int rt6_dump_route(struct rt6_info *rt, void *p_arg)
 	return rt6_fill_node(net,
 		     arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE,
 		     NETLINK_CB(arg->cb->skb).portid, arg->cb->nlh->nlmsg_seq,
-		     NLM_F_MULTI);
+		     NLM_F_MULTI | (truncate ? NLM_F_TRUNC : 0));
 }
 
 static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 596eaff66649..f8102f976cad 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2177,7 +2177,12 @@ static int netlink_dump(struct sock *sk)
 		return 0;
 	}
 
-	nlh = nlmsg_put_answer(skb, cb, NLMSG_DONE, sizeof(len), NLM_F_MULTI);
+	if (len < 0)
+		nlh = nlmsg_put_answer(skb, cb, NLMSG_ERROR, sizeof(len), 0);
+	else
+		nlh = nlmsg_put_answer(skb, cb, NLMSG_DONE, sizeof(len),
+				       NLM_F_MULTI);
+
 	if (!nlh)
 		goto errout_skb;
 
-- 
2.11.0

^ permalink raw reply related

* [PATCH] wireless: mwifiex: add missing USB-descriptor endianness conversion
From: Johan Hovold @ 2017-05-12 10:15 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam, Ganapathi Bhat, Xinming Hu
  Cc: Kalle Valo, linux-wireless, netdev, Johan Hovold

Add the missing endianness conversions to a debug statement printing
the USB device-descriptor bcdUSB field during probe.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/wireless/marvell/mwifiex/usb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index 2f7705c50161..debd6216366a 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -424,7 +424,8 @@ static int mwifiex_usb_probe(struct usb_interface *intf,
 	card->intf = intf;
 
 	pr_debug("info: bcdUSB=%#x Device Class=%#x SubClass=%#x Protocol=%#x\n",
-		 udev->descriptor.bcdUSB, udev->descriptor.bDeviceClass,
+		 le16_to_cpu(udev->descriptor.bcdUSB),
+		 udev->descriptor.bDeviceClass,
 		 udev->descriptor.bDeviceSubClass,
 		 udev->descriptor.bDeviceProtocol);
 
-- 
2.13.0

^ permalink raw reply related

* [PATCH] net: ch9200: add missing USB-descriptor endianness conversions
From: Johan Hovold @ 2017-05-12 10:13 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-usb, netdev, Johan Hovold

Add the missing endianness conversions to a debug statement printing
the USB device-descriptor idVendor and idProduct fields during probe.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/usb/ch9200.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c
index c4f1c363e24b..9df3c1ffff35 100644
--- a/drivers/net/usb/ch9200.c
+++ b/drivers/net/usb/ch9200.c
@@ -310,8 +310,8 @@ static int get_mac_address(struct usbnet *dev, unsigned char *data)
 	int rd_mac_len = 0;
 
 	netdev_dbg(dev->net, "get_mac_address:\n\tusbnet VID:%0x PID:%0x\n",
-		   dev->udev->descriptor.idVendor,
-		   dev->udev->descriptor.idProduct);
+		   le16_to_cpu(dev->udev->descriptor.idVendor),
+		   le16_to_cpu(dev->udev->descriptor.idProduct));
 
 	memset(mac_addr, 0, sizeof(mac_addr));
 	rd_mac_len = control_read(dev, REQUEST_READ, 0,
-- 
2.13.0

^ permalink raw reply related

* [PATCH] net: irda: irda-usb: fix firmware name on big-endian hosts
From: Johan Hovold @ 2017-05-12 10:11 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: netdev, Johan Hovold, stable, Nick Fedchik

Add missing endianness conversion when using the USB device-descriptor
bcdDevice field to construct a firmware file name.

Fixes: 8ef80aef118e ("[IRDA]: irda-usb.c: STIR421x cleanups")
Cc: stable <stable@vger.kernel.org>     # 2.6.18
Cc: Nick Fedchik <nfedchik@atlantic-link.com.ua>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/irda/irda-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 8716b8c07feb..6f3c805f7211 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1077,7 +1077,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
          * are "42101001.sb" or "42101002.sb"
          */
         sprintf(stir421x_fw_name, "4210%4X.sb",
-                self->usbdev->descriptor.bcdDevice);
+		le16_to_cpu(self->usbdev->descriptor.bcdDevice));
         ret = request_firmware(&fw, stir421x_fw_name, &self->usbdev->dev);
         if (ret < 0)
                 return ret;
-- 
2.13.0

^ permalink raw reply related

* [PATCH] net: can: peak: fix product-id endianness in error message
From: Johan Hovold @ 2017-05-12 10:09 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde; +Cc: linux-can, netdev, Johan Hovold

Make sure to use the USB device product-id stored in host-byte order in
a probe error message.

Also remove a redundant reassignment of the local usb_dev variable which
had already been used to retrieve the product id.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 57913dbbae0a..1ca76e03e965 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -908,8 +908,6 @@ static int peak_usb_probe(struct usb_interface *intf,
 	const struct peak_usb_adapter *peak_usb_adapter = NULL;
 	int i, err = -ENOMEM;
 
-	usb_dev = interface_to_usbdev(intf);
-
 	/* get corresponding PCAN-USB adapter */
 	for (i = 0; i < ARRAY_SIZE(peak_usb_adapters_list); i++)
 		if (peak_usb_adapters_list[i]->device_id == usb_id_product) {
@@ -920,7 +918,7 @@ static int peak_usb_probe(struct usb_interface *intf,
 	if (!peak_usb_adapter) {
 		/* should never come except device_id bad usage in this file */
 		pr_err("%s: didn't find device id. 0x%x in devices list\n",
-			PCAN_USB_DRIVER_NAME, usb_dev->descriptor.idProduct);
+			PCAN_USB_DRIVER_NAME, usb_id_product);
 		return -ENODEV;
 	}
 
-- 
2.13.0


^ permalink raw reply related

* [PATCH v4] brcmfmac: btcoex: replace init_timer with setup_timer
From: Xie Qirong @ 2017-05-12  9:32 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel,
	Xie Qirong

setup_timer.cocci suggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
setup_timer function for function on line 384.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
---

 The combination of init_timer and setting up the data and function field
 manually is equivalent to calling setup_timer(). This is an api
 consolidation only and improves readability.

 Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
 CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
 CONFIG_BRCMDBG=y

 Kernel version: 4.11.0 (localversion-next is next-20170512)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
index 14a70d4b4e86..3559fb5b8fb0 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
@@ -380,9 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg)
 	/* Set up timer for BT  */
 	btci->timer_on = false;
 	btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME;
-	init_timer(&btci->timer);
-	btci->timer.data = (ulong)btci;
-	btci->timer.function = brcmf_btcoex_timerfunc;
+	setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci);
 	btci->cfg = cfg;
 	btci->saved_regs_part1 = false;
 	btci->saved_regs_part2 = false;
-- 
2.12.2

^ permalink raw reply related

* Re: net: ath: tx99: fixed a spelling issue
From: Kalle Valo @ 2017-05-12  9:21 UTC (permalink / raw)
  To: ammly
  Cc: ath9k-devel, kvalo, linux-wireless, netdev, linux-kernel,
	Ammly Fredrick
In-Reply-To: <1493310697-18610-1-git-send-email-ammly@gmail.com>

ammly <ammlyf@gmail.com> wrote:
> Fixed a spelling issue.
> 
> Signed-off-by: Ammly Fredrick <ammlyf@gmail.com>

I changed the commit log. Also check your From header in the email headers,
it's missing your last name.

Author: Ammly Fredrick <ammlyf@gmail.com>
Date:   Thu Apr 27 19:31:37 2017 +0300

    ath9k: fix spelling in ath9k_tx99_init()
    
    It's spelled hardware, not harware.
    
    Signed-off-by: Ammly Fredrick <ammlyf@gmail.com>
    [kvalo@qca.qualcomm.com: improve commit log]
    Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

-- 
https://patchwork.kernel.org/patch/9703211/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Kalle Valo @ 2017-05-12  9:16 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel
In-Reply-To: <036761ff-85a9-6042-57ed-ca3968550737@broadcom.com>

Arend van Spriel <arend.vanspriel@broadcom.com> writes:

>>> This third version is the same as v1 on which I commented to put the
>>> coccinelle output in the commit message. So I would still keep v2 if
>>> nothing else changed in v3 apart from my Acked-by: tag.
>>
>> Ok, but I can easily take v3 (ie. this one) so that you get credit ;)
>
> If you add the coccinelle output in the commit message, ie. above the
> '---' that would be great. So for both you have to do additional stuff
> provided you find it useful to have the coccinelle output. :-p

Sure, I can add that. Thanks to my patchwork script it's actually pretty
easy to edit commit logs before it commits them. If only I had time to
implement a proper GTK interface for the script...

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Arend van Spriel @ 2017-05-12  9:10 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel
In-Reply-To: <87d1beqwtc.fsf@kamboji.qca.qualcomm.com>

On 5/12/2017 10:54 AM, Kalle Valo wrote:
> Arend van Spriel <arend.vanspriel@broadcom.com> writes:
> 
>> On 5/12/2017 10:19 AM, Kalle Valo wrote:
>>> Xie Qirong <cheerx1994@gmail.com> writes:
>>>
>>>> The combination of init_timer and setting up the data and function field
>>>> manually is equivalent to calling setup_timer(). This is an api
>>>> consolidation only and improves readability.
>>>>
>>>> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
>>>> ---
>>>>
>>>>    setup_timer.cocci suggested the following improvement:
>>>>    drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
>>>>    setup_timer function for function on line 384.
>>>>
>>>>    Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
>>>>    CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
>>>>    CONFIG_BRCMDBG=y
>>>>
>>>>    Kernel version: 4.11.0 (localversion-next is next-20170512)
>>>
>>> How is this different from the first version?
>>>
>>> https://patchwork.kernel.org/patch/9709467/
>>
>> Hi Kalle,
>>
>> This is actually the third version. You are referring to the
>> not-specifically-named "v2" here, but how are you to know ;-)
> 
> Exactly :)
> 
>> This third version is the same as v1 on which I commented to put the
>> coccinelle output in the commit message. So I would still keep v2 if
>> nothing else changed in v3 apart from my Acked-by: tag.
> 
> Ok, but I can easily take v3 (ie. this one) so that you get credit ;)

If you add the coccinelle output in the commit message, ie. above the 
'---' that would be great. So for both you have to do additional stuff 
provided you find it useful to have the coccinelle output. :-p

Regards,
Arend

^ permalink raw reply

* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Kalle Valo @ 2017-05-12  8:54 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Xie Qirong, Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel
In-Reply-To: <c5e21126-23e6-8cef-d01b-dc225dab1982@broadcom.com>

Arend van Spriel <arend.vanspriel@broadcom.com> writes:

> On 5/12/2017 10:19 AM, Kalle Valo wrote:
>> Xie Qirong <cheerx1994@gmail.com> writes:
>>
>>> The combination of init_timer and setting up the data and function field
>>> manually is equivalent to calling setup_timer(). This is an api
>>> consolidation only and improves readability.
>>>
>>> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
>>> ---
>>>
>>>   setup_timer.cocci suggested the following improvement:
>>>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
>>>   setup_timer function for function on line 384.
>>>
>>>   Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
>>>   CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
>>>   CONFIG_BRCMDBG=y
>>>
>>>   Kernel version: 4.11.0 (localversion-next is next-20170512)
>>
>> How is this different from the first version?
>>
>> https://patchwork.kernel.org/patch/9709467/
>
> Hi Kalle,
>
> This is actually the third version. You are referring to the
> not-specifically-named "v2" here, but how are you to know ;-) 

Exactly :)

> This third version is the same as v1 on which I commented to put the
> coccinelle output in the commit message. So I would still keep v2 if
> nothing else changed in v3 apart from my Acked-by: tag.

Ok, but I can easily take v3 (ie. this one) so that you get credit ;)

-- 
Kalle Valo

^ permalink raw reply

* Re: [Problem] Broadcom BCM5762 Ethernet tg3 times out with stack trace
From: Siva Reddy Kallam @ 2017-05-12  8:53 UTC (permalink / raw)
  To: Daniel Kim; +Cc: Prashant Sreedharan, Michael Chan, Linux Netdev List

On Fri, May 12, 2017 at 9:39 AM, Siva Reddy Kallam
<siva.kallam@broadcom.com> wrote:
> On Thu, May 11, 2017 at 8:55 PM, Daniel Kim <dkim@playmechanix.com> wrote:
>> Summary:
>> Broadcom BCM5762 Ethernet tg3 times out with stack trace
>>
>> Description:
>> The ethernet device will disconnect with dmesg reporting a stack trace
>> and a time out (visible in DMesg Output below). The ethernet device
>> will periodically reconnect and disconnect and the driver will output
>> a lot of hex values into logs.
>>
>> The computer doesn't have to have network activity in order to trigger
>> this to happen, but I believe it can trigger faster if there was. It
>> usually occurs as soon as a few minutes after bootup to upwards of a
>> few hours in my test cases.
>>
>> Kernel version:
>> Linux version 4.11.0-041100-generic (kernel@tangerine) (gcc version
>> 6.3.0 20170415 (Ubuntu 6.3.0-14ubuntu3) ) #201705041534 SMP Thu May 4
>> 19:36:05 UTC 2017
>>
>> Full DMesg Output:
>> https://launchpadlibrarian.net/319135862/error_dmesg.txt
>> Bug has been reported with additional information at:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1689383
>>
>> Please let me know if there is other data or logs that you may need.
>>
> Thank you for reporting this. We will look into the logs and contact
> you directly if we need any other data.
As a first impression, we are suspecting TSO packet is causing TX timeout.
Can you please disable TSO and check if TX timeout still happens or not?
Please let us know your findings.
We are trying to reproduce locally. If we couldn't, we will send a
debug patch to collect more data.
>>
>> Cut DMesg Output:
>> [ 6244.283996] ------------[ cut here ]------------
>> [ 6244.284051] WARNING: CPU: 0 PID: 0 at
>> /home/kernel/COD/linux/net/sched/sch_generic.c:316
>> dev_watchdog+0x22c/0x230
>> [ 6244.284058] NETDEV WATCHDOG: enp4s0 (tg3): transmit queue 0 timed out
>> [ 6244.284064] Modules linked in: snd_hda_codec_hdmi hp_wmi
>> snd_hda_codec_realtek snd_hda_codec_generic sparse_keymap
>> snd_hda_intel snd_hda_codec edac_mce_amd edac_core crct10dif_pclmul
>> crc32_pclmul snd_hda_core snd_hwdep ghash_clmulni_intel pcbc joydev
>> input_leds snd_pcm aesni_intel aes_x86_64 snd_seq_midi
>> snd_seq_midi_event snd_rawmidi crypto_simd snd_seq snd_seq_device
>> snd_timer glue_helper snd cryptd soundcore serio_raw k10temp shpchp
>> i2c_piix4 mac_hid tpm_infineon wmi parport_pc ppdev lp parport autofs4
>> hid_generic usbhid hid psmouse tg3 ptp pps_core ahci libahci video
>> [ 6244.284129] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
>> 4.11.0-041100-generic #201705041534
>> [ 6244.284131] Hardware name: Hewlett-Packard HP EliteDesk 705 G1
>> MT/2215, BIOS L06 v02.17 12/11/2014
>> [ 6244.284132] Call Trace:
>> [ 6244.284135]  <IRQ>
>> [ 6244.284141]  dump_stack+0x63/0x81
>> [ 6244.284143]  __warn+0xcb/0xf0
>> [ 6244.284146]  warn_slowpath_fmt+0x5a/0x80
>> [ 6244.284149]  ? cpu_load_update+0xdd/0x150
>> [ 6244.284155]  dev_watchdog+0x22c/0x230
>> [ 6244.284159]  ? qdisc_rcu_free+0x50/0x50
>> [ 6244.284162]  call_timer_fn+0x35/0x140
>> [ 6244.284165]  run_timer_softirq+0x1db/0x440
>> [ 6244.284168]  ? ktime_get+0x41/0xb0
>> [ 6244.284172]  ? lapic_next_event+0x1d/0x30
>> [ 6244.284175]  ? clockevents_program_event+0x7f/0x120
>> [ 6244.284179]  __do_softirq+0x104/0x2af
>> [ 6244.284183]  irq_exit+0xb6/0xc0
>> [ 6244.284187]  smp_apic_timer_interrupt+0x3d/0x50
>> [ 6244.284190]  apic_timer_interrupt+0x89/0x90
>> [ 6244.284193] RIP: 0010:cpuidle_enter_state+0x122/0x2c0
>> [ 6244.284195] RSP: 0018:ffffffff86203dc8 EFLAGS: 00000246 ORIG_RAX:
>> ffffffffffffff10
>> [ 6244.284198] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 000000000000001f
>> [ 6244.284200] RDX: 000005addc53de33 RSI: ffffa01a2ec189d8 RDI: 0000000000000000
>> [ 6244.284202] RBP: ffffffff86203e08 R08: 000000000000cd01 R09: 0000000000000018
>> [ 6244.284203] R10: ffffffff86203d98 R11: 0000000000000ef9 R12: ffffa01a1d6ab200
>> [ 6244.284205] R13: ffffffff862f92d8 R14: 0000000000000002 R15: ffffffff862f92c0
>> [ 6244.284207]  </IRQ>
>> [ 6244.284211]  ? cpuidle_enter_state+0x110/0x2c0
>> [ 6244.284213]  cpuidle_enter+0x17/0x20
>> [ 6244.284218]  call_cpuidle+0x23/0x40
>> [ 6244.284221]  do_idle+0x189/0x200
>> [ 6244.284224]  cpu_startup_entry+0x71/0x80
>> [ 6244.284227]  rest_init+0x77/0x80
>> [ 6244.284230]  start_kernel+0x455/0x476
>> [ 6244.284235]  ? early_idt_handler_array+0x120/0x120
>> [ 6244.284239]  x86_64_start_reservations+0x24/0x26
>> [ 6244.284243]  x86_64_start_kernel+0x14d/0x170
>> [ 6244.284246]  start_cpu+0x14/0x14
>> [ 6244.284251] ---[ end trace b14ec0a8b1e2a4e8 ]---
>> [ 6244.284259] tg3 0000:04:00.0 enp4s0: transmit timed out, resetting
>> [ 6244.398892] hrtimer: interrupt took 65509334 ns
>> [ 6247.090588] tg3 0000:04:00.0 enp4s0: 0x00000000: 0x168714e4,
>> 0x00100506, 0x02000010, 0x00000010
>> [ 6247.090601] tg3 0000:04:00.0 enp4s0: 0x00000010: 0xe212000c,
>> 0x00000000, 0xe211000c, 0x00000000
>> [ 6247.090607] tg3 0000:04:00.0 enp4s0: 0x00000020: 0xe210000c,
>> 0x00000000, 0x00000000, 0x2215103c
>> [ 6247.090610] tg3 0000:04:00.0 enp4s0: 0x00000030: 0x00000000,
>> 0x00000048, 0x00000000, 0x0000010a
>> [ 6247.090613] tg3 0000:04:00.0 enp4s0: 0x00000040: 0x00000000,
>> 0x39000000, 0xc8035001, 0x16002008
>> [ 6247.090617] tg3 0000:04:00.0 enp4s0: 0x00000050: 0x00005803,
>> 0x00000000, 0x0086a005, 0x00000000
>> [ 6247.090622] tg3 0000:04:00.0 enp4s0: 0x00000060: 0x00000000,
>> 0x00000000, 0xf1000298, 0x01f802d1
>> [ 6247.090625] tg3 0000:04:00.0 enp4s0: 0x00000070: 0x00071010,
>> 0xf6001500, 0x00000000, 0x00000000
>> [ 6247.090628] tg3 0000:04:00.0 enp4s0: 0x00000080: 0x168714e4,
>> 0x00000018, 0x00000000, 0x00000800
>> [ 6247.090632] tg3 0000:04:00.0 enp4s0: 0x00000090: 0x00000000,
>> 0x00000171, 0x00000000, 0x0000021d
>> [ 6247.090636] tg3 0000:04:00.0 enp4s0: 0x000000a0: 0x8005ac11,
>> 0x00000004, 0x00000122, 0x00020010
>> [ 6247.090639] tg3 0000:04:00.0 enp4s0: 0x000000b0: 0x10008d82,
>> 0x00115400, 0x00475c12, 0x10120043
>> [ 6247.090643] tg3 0000:04:00.0 enp4s0: 0x000000d0: 0x0008081f,
>> 0x00000000, 0x00000000, 0x00010001
>> [ 6247.090649] tg3 0000:04:00.0 enp4s0: 0x000000f0: 0x00000000,
>> 0x05762100, 0x00000000, 0xffffffff
>> [ 6247.090652] tg3 0000:04:00.0 enp4s0: 0x00000100: 0x13c10001,
>> 0x00000000, 0x00000000, 0x00062030
>> [ 6247.090654] tg3 0000:04:00.0 enp4s0: 0x00000110: 0x00001000,
>> 0x00002000, 0x000000a0, 0x00000000
>> [ 6247.090658] tg3 0000:04:00.0 enp4s0: 0x00000130: 0x00000000,
>> 0x00000000, 0x00000000, 0x15010003
>> [ 6247.090660] tg3 0000:04:00.0 enp4s0: 0x00000140: 0xd45792bf,
>> 0x00008cdc, 0x00000000, 0x00000000
>> [ 6247.090663] tg3 0000:04:00.0 enp4s0: 0x00000150: 0x16010004,
>> 0x00000000, 0x00078116, 0x00000001
>> [ 6247.090666] tg3 0000:04:00.0 enp4s0: 0x00000160: 0x1b010002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090669] tg3 0000:04:00.0 enp4s0: 0x00000170: 0x00000000,
>> 0x80000001, 0x00000000, 0x00000000
>> [ 6247.090672] tg3 0000:04:00.0 enp4s0: 0x000001b0: 0x23010018,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090676] tg3 0000:04:00.0 enp4s0: 0x00000200: 0x00000000,
>> 0x39000000, 0x00000000, 0xc3000000
>> [ 6247.090679] tg3 0000:04:00.0 enp4s0: 0x00000210: 0x00000000,
>> 0x51000000, 0x00000000, 0x00000001
>> [ 6247.090682] tg3 0000:04:00.0 enp4s0: 0x00000220: 0x00000000,
>> 0x00000001, 0x00000000, 0x00000000
>> [ 6247.090685] tg3 0000:04:00.0 enp4s0: 0x00000260: 0x00000000,
>> 0x00000000, 0x00000000, 0x0000021d
>> [ 6247.090689] tg3 0000:04:00.0 enp4s0: 0x00000280: 0x00000000,
>> 0x00000800, 0x00000000, 0x00000955
>> [ 6247.090692] tg3 0000:04:00.0 enp4s0: 0x00000300: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090695] tg3 0000:04:00.0 enp4s0: 0x00000310: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090698] tg3 0000:04:00.0 enp4s0: 0x00000320: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090701] tg3 0000:04:00.0 enp4s0: 0x00000330: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090704] tg3 0000:04:00.0 enp4s0: 0x00000340: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090707] tg3 0000:04:00.0 enp4s0: 0x00000350: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090710] tg3 0000:04:00.0 enp4s0: 0x00000360: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090713] tg3 0000:04:00.0 enp4s0: 0x00000370: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090716] tg3 0000:04:00.0 enp4s0: 0x00000380: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090718] tg3 0000:04:00.0 enp4s0: 0x00000390: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090721] tg3 0000:04:00.0 enp4s0: 0x000003a0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090724] tg3 0000:04:00.0 enp4s0: 0x000003b0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090727] tg3 0000:04:00.0 enp4s0: 0x000003c0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090730] tg3 0000:04:00.0 enp4s0: 0x000003d0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090733] tg3 0000:04:00.0 enp4s0: 0x000003e0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090736] tg3 0000:04:00.0 enp4s0: 0x000003f0: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000171
>> [ 6247.090738] tg3 0000:04:00.0 enp4s0: 0x00000400: 0x18e04808,
>> 0x00400000, 0x00001000, 0x00009b00
>> [ 6247.090741] tg3 0000:04:00.0 enp4s0: 0x00000410: 0x00008cdc,
>> 0xd45792bf, 0x00008cdc, 0xd45792bf
>> [ 6247.090744] tg3 0000:04:00.0 enp4s0: 0x00000420: 0x00008cdc,
>> 0xd45792bf, 0x00008cdc, 0xd45792bf
>> [ 6247.090747] tg3 0000:04:00.0 enp4s0: 0x00000430: 0x00000000,
>> 0x00000000, 0x00000008, 0x000005f2
>> [ 6247.090750] tg3 0000:04:00.0 enp4s0: 0x00000440: 0x00000000,
>> 0x00000000, 0x00000000, 0x082e0006
>> [ 6247.090753] tg3 0000:04:00.0 enp4s0: 0x00000450: 0x00000001,
>> 0x00008000, 0x00000000, 0x00000112
>> [ 6247.090756] tg3 0000:04:00.0 enp4s0: 0x00000460: 0x0000000b,
>> 0x00002620, 0x03ff0006, 0x00000000
>> [ 6247.090759] tg3 0000:04:00.0 enp4s0: 0x00000470: 0xa0000000,
>> 0x00000000, 0x00000000, 0x50000001
>> [ 6247.090762] tg3 0000:04:00.0 enp4s0: 0x00000480: 0x42000000,
>> 0x7fffffff, 0x06000004, 0x7fffffff
>> [ 6247.090765] tg3 0000:04:00.0 enp4s0: 0x00000500: 0x00000008,
>> 0x00000002, 0x00000000, 0x00000000
>> [ 6247.090768] tg3 0000:04:00.0 enp4s0: 0x00000590: 0x00901001,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090771] tg3 0000:04:00.0 enp4s0: 0x00000600: 0xffffffff,
>> 0x00f80011, 0x00000000, 0x40001f0c
>> [ 6247.090774] tg3 0000:04:00.0 enp4s0: 0x00000610: 0xffffffff,
>> 0x00000000, 0x00000044, 0x00000000
>> [ 6247.090777] tg3 0000:04:00.0 enp4s0: 0x00000620: 0x00000040,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090780] tg3 0000:04:00.0 enp4s0: 0x00000630: 0x01010101,
>> 0x01010101, 0x01010101, 0x01010101
>> [ 6247.090782] tg3 0000:04:00.0 enp4s0: 0x00000640: 0x01010101,
>> 0x01010101, 0x01010101, 0x01010101
>> [ 6247.090785] tg3 0000:04:00.0 enp4s0: 0x00000650: 0x01010101,
>> 0x01010101, 0x01010101, 0x01010101
>> [ 6247.090788] tg3 0000:04:00.0 enp4s0: 0x00000660: 0x01010101,
>> 0x01010101, 0x01010101, 0x01010101
>> [ 6247.090790] tg3 0000:04:00.0 enp4s0: 0x00000670: 0x43cb3b20,
>> 0x0defd9a3, 0x767fe840, 0x1442a189
>> [ 6247.090793] tg3 0000:04:00.0 enp4s0: 0x00000680: 0xf210c361,
>> 0xdb0f8709, 0xee76c0a3, 0x3753b863
>> [ 6247.090796] tg3 0000:04:00.0 enp4s0: 0x00000690: 0x8c5ffafc,
>> 0xba4254bd, 0x00000000, 0x00000000
>> [ 6247.090798] tg3 0000:04:00.0 enp4s0: 0x000006c0: 0x00000000,
>> 0x00000000, 0x04000000, 0x00000000
>> [ 6247.090801] tg3 0000:04:00.0 enp4s0: 0x00000800: 0x00000000,
>> 0xffffffff, 0x00000000, 0x00000000
>> [ 6247.090804] tg3 0000:04:00.0 enp4s0: 0x00000810: 0x00000000,
>> 0xffffffff, 0x00000000, 0x00000000
>> [ 6247.090806] tg3 0000:04:00.0 enp4s0: 0x00000820: 0x00000000,
>> 0x00000000, 0xffffffff, 0x00000000
>> [ 6247.090809] tg3 0000:04:00.0 enp4s0: 0x00000830: 0x00000000,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090812] tg3 0000:04:00.0 enp4s0: 0x00000840: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090815] tg3 0000:04:00.0 enp4s0: 0x00000850: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090817] tg3 0000:04:00.0 enp4s0: 0x00000860: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0x00000000
>> [ 6247.090820] tg3 0000:04:00.0 enp4s0: 0x00000880: 0x00000754,
>> 0x00001633, 0x00000000, 0x00000000
>> [ 6247.090822] tg3 0000:04:00.0 enp4s0: 0x00000890: 0x00000005,
>> 0x0000000c, 0x00000000, 0x00000000
>> [ 6247.090825] tg3 0000:04:00.0 enp4s0: 0x000008f0: 0x007c0001,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090828] tg3 0000:04:00.0 enp4s0: 0x00000900: 0x00095b83,
>> 0xffffffff, 0x00000000, 0x00000000
>> [ 6247.090831] tg3 0000:04:00.0 enp4s0: 0x00000910: 0x00000002,
>> 0xffffffff, 0x00000000, 0x00000000
>> [ 6247.090834] tg3 0000:04:00.0 enp4s0: 0x00000920: 0x00000000,
>> 0x00000000, 0xffffffff, 0x00000000
>> [ 6247.090837] tg3 0000:04:00.0 enp4s0: 0x00000930: 0x00000000,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090840] tg3 0000:04:00.0 enp4s0: 0x00000940: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090843] tg3 0000:04:00.0 enp4s0: 0x00000950: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0xffffffff
>> [ 6247.090846] tg3 0000:04:00.0 enp4s0: 0x00000960: 0xffffffff,
>> 0xffffffff, 0xffffffff, 0x000015d7
>> [ 6247.090849] tg3 0000:04:00.0 enp4s0: 0x00000970: 0x00000036,
>> 0x00000164, 0x00000000, 0x00000000
>> [ 6247.090852] tg3 0000:04:00.0 enp4s0: 0x00000980: 0x010a92c7,
>> 0x00001633, 0x00000000, 0x000015c8
>> [ 6247.090855] tg3 0000:04:00.0 enp4s0: 0x00000990: 0x0000a81a,
>> 0x00019e10, 0x00000000, 0x00000000
>> [ 6247.090858] tg3 0000:04:00.0 enp4s0: 0x00000c00: 0x0000000a,
>> 0x00000000, 0x00000003, 0x00000001
>> [ 6247.090861] tg3 0000:04:00.0 enp4s0: 0x00000c10: 0x00000000,
>> 0x00000000, 0x00000000, 0x00620000
>> [ 6247.090864] tg3 0000:04:00.0 enp4s0: 0x00000c80: 0x00001771,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090867] tg3 0000:04:00.0 enp4s0: 0x00000ce0: 0xffd07a02,
>> 0x00000000, 0x00000062, 0x00040028
>> [ 6247.090870] tg3 0000:04:00.0 enp4s0: 0x00000cf0: 0x00000000,
>> 0x50000071, 0x00000000, 0x00000000
>> [ 6247.090873] tg3 0000:04:00.0 enp4s0: 0x00001000: 0x00000002,
>> 0x00000000, 0xa000e5e6, 0x00000000
>> [ 6247.090876] tg3 0000:04:00.0 enp4s0: 0x00001010: 0x01711711,
>> 0x0000e5e6, 0x00000000, 0x00000000
>> [ 6247.090879] tg3 0000:04:00.0 enp4s0: 0x00001400: 0x00000006,
>> 0x00000000, 0x00000000, 0x00000001
>> [ 6247.090881] tg3 0000:04:00.0 enp4s0: 0x00001440: 0x00000171,
>> 0x00000171, 0x00000171, 0x00000171
>> [ 6247.090884] tg3 0000:04:00.0 enp4s0: 0x00001450: 0x00000171,
>> 0x00000171, 0x00000171, 0x00000171
>> [ 6247.090887] tg3 0000:04:00.0 enp4s0: 0x00001460: 0x00000171,
>> 0x00000171, 0x00000171, 0x00000171
>> [ 6247.090890] tg3 0000:04:00.0 enp4s0: 0x00001470: 0x00000171,
>> 0x00000171, 0x00000171, 0x00000171
>> [ 6247.090893] tg3 0000:04:00.0 enp4s0: 0x00001800: 0x00000016,
>> 0x00000000, 0x00000171, 0x00000000
>> [ 6247.090896] tg3 0000:04:00.0 enp4s0: 0x00001840: 0x00000000,
>> 0x00000000, 0x00000200, 0x00000010
>> [ 6247.090899] tg3 0000:04:00.0 enp4s0: 0x00001850: 0x0000001f,
>> 0x00000000, 0x00004300, 0x01710171
>> [ 6247.090902] tg3 0000:04:00.0 enp4s0: 0x00001860: 0x01000000,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090904] tg3 0000:04:00.0 enp4s0: 0x00001c00: 0x00000002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090907] tg3 0000:04:00.0 enp4s0: 0x00002000: 0x00000002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090910] tg3 0000:04:00.0 enp4s0: 0x00002010: 0x00000181,
>> 0x00000001, 0x007bfffd, 0x00000000
>> [ 6247.090913] tg3 0000:04:00.0 enp4s0: 0x00002100: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090916] tg3 0000:04:00.0 enp4s0: 0x00002110: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090918] tg3 0000:04:00.0 enp4s0: 0x00002120: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090921] tg3 0000:04:00.0 enp4s0: 0x00002130: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090924] tg3 0000:04:00.0 enp4s0: 0x00002140: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090928] tg3 0000:04:00.0 enp4s0: 0x00002150: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090931] tg3 0000:04:00.0 enp4s0: 0x00002160: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090934] tg3 0000:04:00.0 enp4s0: 0x00002170: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090937] tg3 0000:04:00.0 enp4s0: 0x00002180: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090940] tg3 0000:04:00.0 enp4s0: 0x00002190: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090942] tg3 0000:04:00.0 enp4s0: 0x000021a0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090945] tg3 0000:04:00.0 enp4s0: 0x000021b0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090948] tg3 0000:04:00.0 enp4s0: 0x000021c0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090951] tg3 0000:04:00.0 enp4s0: 0x000021d0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090953] tg3 0000:04:00.0 enp4s0: 0x000021e0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090956] tg3 0000:04:00.0 enp4s0: 0x000021f0: 0x000d62b3,
>> 0x0008dc6f, 0x0000009e, 0x00000000
>> [ 6247.090959] tg3 0000:04:00.0 enp4s0: 0x00002200: 0x00025b63,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090962] tg3 0000:04:00.0 enp4s0: 0x00002250: 0x00009a2d,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090965] tg3 0000:04:00.0 enp4s0: 0x00002400: 0x00010012,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090968] tg3 0000:04:00.0 enp4s0: 0x00002440: 0x00000000,
>> 0x00000000, 0x00000002, 0x00000000
>> [ 6247.090970] tg3 0000:04:00.0 enp4s0: 0x00002450: 0x00000000,
>> 0xfffe0000, 0x08001800, 0x00006000
>> [ 6247.090973] tg3 0000:04:00.0 enp4s0: 0x00002470: 0x00000000,
>> 0x0000015f, 0x00000000, 0x00000000
>> [ 6247.090976] tg3 0000:04:00.0 enp4s0: 0x000024c0: 0x02005101,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090979] tg3 0000:04:00.0 enp4s0: 0x00002800: 0x00000006,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090982] tg3 0000:04:00.0 enp4s0: 0x00002c00: 0x00000006,
>> 0x00000000, 0x00000000, 0x000001d5
>> [ 6247.090985] tg3 0000:04:00.0 enp4s0: 0x00002c10: 0x00000000,
>> 0x00000000, 0x00000019, 0x0000000c
>> [ 6247.090988] tg3 0000:04:00.0 enp4s0: 0x00002c20: 0x00020002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.090990] tg3 0000:04:00.0 enp4s0: 0x00002d00: 0x00000080,
>> 0x00000040, 0x00000000, 0x00000000
>> [ 6247.090993] tg3 0000:04:00.0 enp4s0: 0x00003000: 0x00000006,
>> 0x00000000, 0x00000000, 0x000001d5
>> [ 6247.090997] tg3 0000:04:00.0 enp4s0: 0x00003600: 0x00034400,
>> 0x00130000, 0x00110000, 0x00000000
>> [ 6247.090999] tg3 0000:04:00.0 enp4s0: 0x00003610: 0x00131100,
>> 0x00130000, 0x00130000, 0x00000000
>> [ 6247.091002] tg3 0000:04:00.0 enp4s0: 0x00003620: 0x80110011,
>> 0x00000000, 0x00000004, 0x3c822080
>> [ 6247.091005] tg3 0000:04:00.0 enp4s0: 0x00003630: 0x00000000,
>> 0x80008000, 0x00001080, 0x00000000
>> [ 6247.091008] tg3 0000:04:00.0 enp4s0: 0x00003640: 0x0000000a,
>> 0x33f00003, 0x00000020, 0x00000019
>> [ 6247.091010] tg3 0000:04:00.0 enp4s0: 0x00003650: 0x00000171,
>> 0x00000bff, 0x05762100, 0x00000000
>> [ 6247.091014] tg3 0000:04:00.0 enp4s0: 0x00003660: 0x00000000,
>> 0x00000000, 0x000400a3, 0x00000202
>> [ 6247.091017] tg3 0000:04:00.0 enp4s0: 0x00003670: 0x0000002a,
>> 0xfeffff63, 0x0000000a, 0x00000000
>> [ 6247.091020] tg3 0000:04:00.0 enp4s0: 0x000036b0: 0x001003cc,
>> 0x07ff07ff, 0x07ff07ff, 0x01000004
>> [ 6247.091022] tg3 0000:04:00.0 enp4s0: 0x000036c0: 0xffffffff,
>> 0x0000a441, 0x00c84caa, 0x0000a558
>> [ 6247.091025] tg3 0000:04:00.0 enp4s0: 0x000036d0: 0x0000019d,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091028] tg3 0000:04:00.0 enp4s0: 0x000036e0: 0x80000b19,
>> 0xa0800799, 0x00500799, 0x00000000
>> [ 6247.091031] tg3 0000:04:00.0 enp4s0: 0x000036f0: 0x19090900,
>> 0x13180600, 0x00000301, 0x00000001
>> [ 6247.091034] tg3 0000:04:00.0 enp4s0: 0x00003700: 0x00000000,
>> 0x00000000, 0x00000000, 0x00001388
>> [ 6247.091037] tg3 0000:04:00.0 enp4s0: 0x00003710: 0x87fffffd,
>> 0x00000000, 0x00000000, 0x000010dc
>> [ 6247.091039] tg3 0000:04:00.0 enp4s0: 0x00003720: 0x00000000,
>> 0x00002040, 0x88006000, 0xa0002000
>> [ 6247.091042] tg3 0000:04:00.0 enp4s0: 0x00003750: 0x00000000,
>> 0x00000000, 0x0000080b, 0x00000000
>> [ 6247.091045] tg3 0000:04:00.0 enp4s0: 0x00003780: 0x0000bff9,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091049] tg3 0000:04:00.0 enp4s0: 0x00003c00: 0x00000306,
>> 0x00000000, 0x00000000, 0x00000048
>> [ 6247.091052] tg3 0000:04:00.0 enp4s0: 0x00003c10: 0x00000000,
>> 0x00000035, 0x00000000, 0x00000000
>> [ 6247.091055] tg3 0000:04:00.0 enp4s0: 0x00003c20: 0x00000000,
>> 0x00000005, 0x00000000, 0x00000000
>> [ 6247.091058] tg3 0000:04:00.0 enp4s0: 0x00003c30: 0x00000000,
>> 0x00000000, 0x00000000, 0xffffc000
>> [ 6247.091061] tg3 0000:04:00.0 enp4s0: 0x00003c40: 0x00000000,
>> 0x00000b00, 0x00000000, 0x00000000
>> [ 6247.091064] tg3 0000:04:00.0 enp4s0: 0x00003c50: 0x00000000,
>> 0x00000155, 0x00000000, 0x00000000
>> [ 6247.091066] tg3 0000:04:00.0 enp4s0: 0x00003c80: 0x00000800,
>> 0x00000955, 0x00000000, 0x00000000
>> [ 6247.091069] tg3 0000:04:00.0 enp4s0: 0x00003cc0: 0x00000171,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091072] tg3 0000:04:00.0 enp4s0: 0x00003cd0: 0x00000000,
>> 0x0000000f, 0x00000000, 0x00000000
>> [ 6247.091075] tg3 0000:04:00.0 enp4s0: 0x00003d00: 0x00000000,
>> 0xffffb000, 0x00000000, 0xffffa000
>> [ 6247.091078] tg3 0000:04:00.0 enp4s0: 0x00003d80: 0x00000014,
>> 0x00000000, 0x00000005, 0x00000000
>> [ 6247.091080] tg3 0000:04:00.0 enp4s0: 0x00003d90: 0x00000005,
>> 0x00000000, 0x00000014, 0x00000000
>> [ 6247.091083] tg3 0000:04:00.0 enp4s0: 0x00003da0: 0x00000005,
>> 0x00000000, 0x00000005, 0x00000000
>> [ 6247.091086] tg3 0000:04:00.0 enp4s0: 0x00004000: 0x00000002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091088] tg3 0000:04:00.0 enp4s0: 0x00004010: 0x00000000,
>> 0x0026f012, 0x00800420, 0x01006222
>> [ 6247.091091] tg3 0000:04:00.0 enp4s0: 0x00004020: 0x00000000,
>> 0x00000010, 0x00000010, 0x00000050
>> [ 6247.091094] tg3 0000:04:00.0 enp4s0: 0x00004030: 0x00000000,
>> 0x01086020, 0x00296010, 0x00000002
>> [ 6247.091096] tg3 0000:04:00.0 enp4s0: 0x00004040: 0x00400000,
>> 0x00000000, 0x00000010, 0x004e5062
>> [ 6247.091100] tg3 0000:04:00.0 enp4s0: 0x00004400: 0x00000016,
>> 0x00000000, 0x00010000, 0x0000a000
>> [ 6247.091103] tg3 0000:04:00.0 enp4s0: 0x00004410: 0x00000000,
>> 0x0000002a, 0x000000a0, 0x00000000
>> [ 6247.091106] tg3 0000:04:00.0 enp4s0: 0x00004420: 0x000000fd,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091109] tg3 0000:04:00.0 enp4s0: 0x00004440: 0x00000000,
>> 0x00000000, 0x00000000, 0x0e5398e8
>> [ 6247.091112] tg3 0000:04:00.0 enp4s0: 0x00004450: 0x02340226,
>> 0x00970071, 0x00000000, 0x00000000
>> [ 6247.091116] tg3 0000:04:00.0 enp4s0: 0x00004700: 0x00030002,
>> 0x00100000, 0x00100010, 0xc1250000
>> [ 6247.091119] tg3 0000:04:00.0 enp4s0: 0x00004710: 0xfffff6e0,
>> 0x00060484, 0x00100010, 0x00000000
>> [ 6247.091121] tg3 0000:04:00.0 enp4s0: 0x00004720: 0x00000000,
>> 0x00000000, 0xf02c0000, 0xfffff710
>> [ 6247.091124] tg3 0000:04:00.0 enp4s0: 0x00004770: 0x000c0404,
>> 0x00000002, 0x00000010, 0x00000000
>> [ 6247.091127] tg3 0000:04:00.0 enp4s0: 0x00004800: 0x380303fe,
>> 0x00000000, 0x00000000, 0x00000100
>> [ 6247.091130] tg3 0000:04:00.0 enp4s0: 0x00004810: 0x00000000,
>> 0x00000008, 0x00429f80, 0x00008000
>> [ 6247.091133] tg3 0000:04:00.0 enp4s0: 0x00004820: 0x000000dd,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091136] tg3 0000:04:00.0 enp4s0: 0x00004860: 0x000000dd,
>> 0x11400062, 0x001ff800, 0x62000008
>> [ 6247.091139] tg3 0000:04:00.0 enp4s0: 0x00004870: 0x05ea0080,
>> 0x003e1820, 0x003e1820, 0x00000000
>> [ 6247.091141] tg3 0000:04:00.0 enp4s0: 0x00004890: 0x280c0c04,
>> 0x00305400, 0x00000000, 0x00000000
>> [ 6247.091144] tg3 0000:04:00.0 enp4s0: 0x000048a0: 0x000f0010,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091147] tg3 0000:04:00.0 enp4s0: 0x00004900: 0x18030002,
>> 0x00000003, 0x30000000, 0x00000120
>> [ 6247.091149] tg3 0000:04:00.0 enp4s0: 0x00004910: 0x00000040,
>> 0x00000003, 0x0000df94, 0x00000008
>> [ 6247.091152] tg3 0000:04:00.0 enp4s0: 0x00004920: 0x000000e7,
>> 0x02728000, 0xffd07a01, 0x0f000068
>> [ 6247.091155] tg3 0000:04:00.0 enp4s0: 0x00004930: 0xffd31201,
>> 0x0f000068, 0xffcdf401, 0x0f000068
>> [ 6247.091158] tg3 0000:04:00.0 enp4s0: 0x00004940: 0xffebcc01,
>> 0x0f000068, 0x4f4f1212, 0x3e3ea3a3
>> [ 6247.091161] tg3 0000:04:00.0 enp4s0: 0x00004950: 0xf0330000,
>> 0xffd07a68, 0xaf000000, 0xe7e500e6
>> [ 6247.091164] tg3 0000:04:00.0 enp4s0: 0x00004960: 0x00000000,
>> 0xffd31268, 0xaf000000, 0x40000171
>> [ 6247.091167] tg3 0000:04:00.0 enp4s0: 0x00004970: 0x00028202,
>> 0x00205400, 0x0000001c, 0x000000ff
>> [ 6247.091170] tg3 0000:04:00.0 enp4s0: 0x00004980: 0x000000e7,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091172] tg3 0000:04:00.0 enp4s0: 0x00004990: 0x00000000,
>> 0x00000000, 0xffcdf468, 0xaf000000
>> [ 6247.091175] tg3 0000:04:00.0 enp4s0: 0x000049a0: 0x00f00049,
>> 0x000000e7, 0x00000000, 0x00000000
>> [ 6247.091178] tg3 0000:04:00.0 enp4s0: 0x000049b0: 0xffd09601,
>> 0xffd2c401, 0xffce7e01, 0xffec7e01
>> [ 6247.091181] tg3 0000:04:00.0 enp4s0: 0x000049c0: 0xffd07a02,
>> 0xffd31202, 0xffcdf402, 0xffebcc02
>> [ 6247.091183] tg3 0000:04:00.0 enp4s0: 0x000049d0: 0xffd09602,
>> 0xffd2c402, 0xffce7e02, 0xffec7e02
>> [ 6247.091186] tg3 0000:04:00.0 enp4s0: 0x000049f0: 0xf0330000,
>> 0xffebcc68, 0xaf000000, 0x0000ffff
>> [ 6247.091190] tg3 0000:04:00.0 enp4s0: 0x00004c00: 0x200003fe,
>> 0x00000020, 0x00000000, 0x00000000
>> [ 6247.091193] tg3 0000:04:00.0 enp4s0: 0x00004c10: 0x0000003f,
>> 0x00000000, 0x00000006, 0x00000000
>> [ 6247.091196] tg3 0000:04:00.0 enp4s0: 0x00004c20: 0x00000000,
>> 0x00000000, 0x00000000, 0x00000006
>> [ 6247.091199] tg3 0000:04:00.0 enp4s0: 0x00004c30: 0x00000000,
>> 0x00200000, 0x0000007c, 0x0000007c
>> [ 6247.091201] tg3 0000:04:00.0 enp4s0: 0x00004c40: 0x00000000,
>> 0x09550000, 0x00000000, 0x095407ff
>> [ 6247.091204] tg3 0000:04:00.0 enp4s0: 0x00004c50: 0x0fff0fff,
>> 0x01550fff, 0x00000000, 0x00553939
>> [ 6247.091207] tg3 0000:04:00.0 enp4s0: 0x00004c60: 0x00000020,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091210] tg3 0000:04:00.0 enp4s0: 0x00005000: 0x00009800,
>> 0x80000000, 0x00000000, 0x00000000
>> [ 6247.091213] tg3 0000:04:00.0 enp4s0: 0x00005010: 0x00000000,
>> 0x00000000, 0x00000000, 0x08001028
>> [ 6247.091216] tg3 0000:04:00.0 enp4s0: 0x00005020: 0x30840fff,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091218] tg3 0000:04:00.0 enp4s0: 0x00005030: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091222] tg3 0000:04:00.0 enp4s0: 0x00005040: 0x00000000,
>> 0x00000000, 0x080011f4, 0x00000000
>> [ 6247.091225] tg3 0000:04:00.0 enp4s0: 0x00005080: 0x00009800,
>> 0x80004000, 0x00000000, 0x00000000
>> [ 6247.091227] tg3 0000:04:00.0 enp4s0: 0x00005090: 0x00000000,
>> 0x00000000, 0x00000000, 0x08001028
>> [ 6247.091230] tg3 0000:04:00.0 enp4s0: 0x000050a0: 0x30840fff,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091233] tg3 0000:04:00.0 enp4s0: 0x000050b0: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091236] tg3 0000:04:00.0 enp4s0: 0x000050c0: 0x00000000,
>> 0x00000000, 0x080011f4, 0x00000000
>> [ 6247.091238] tg3 0000:04:00.0 enp4s0: 0x00005100: 0x00009800,
>> 0x80000000, 0x00000000, 0x00000000
>> [ 6247.091241] tg3 0000:04:00.0 enp4s0: 0x00005110: 0x00000000,
>> 0x00000000, 0x00000000, 0x08001028
>> [ 6247.091244] tg3 0000:04:00.0 enp4s0: 0x00005120: 0x30840fff,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091247] tg3 0000:04:00.0 enp4s0: 0x00005130: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091250] tg3 0000:04:00.0 enp4s0: 0x00005140: 0x00000000,
>> 0x00000000, 0x080011f4, 0x00000000
>> [ 6247.091253] tg3 0000:04:00.0 enp4s0: 0x00005180: 0x00009800,
>> 0x80000000, 0x00000000, 0x00000000
>> [ 6247.091256] tg3 0000:04:00.0 enp4s0: 0x00005190: 0x00000000,
>> 0x00000000, 0x00000000, 0x08001028
>> [ 6247.091258] tg3 0000:04:00.0 enp4s0: 0x000051a0: 0x30840fff,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091261] tg3 0000:04:00.0 enp4s0: 0x000051b0: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091264] tg3 0000:04:00.0 enp4s0: 0x000051c0: 0x00000000,
>> 0x00000000, 0x080011f4, 0x00000000
>> [ 6247.091266] tg3 0000:04:00.0 enp4s0: 0x00005200: 0x05762100,
>> 0x00000000, 0x21100010, 0x00000000
>> [ 6247.091270] tg3 0000:04:00.0 enp4s0: 0x00005210: 0x00010000,
>> 0x00831824, 0xc0000000, 0x14400016
>> [ 6247.091273] tg3 0000:04:00.0 enp4s0: 0x00005220: 0xc0000000,
>> 0x21100010, 0x00000000, 0x00000000
>> [ 6247.091276] tg3 0000:04:00.0 enp4s0: 0x00005230: 0x080012bc,
>> 0x03608821, 0x14400016, 0x14830018
>> [ 6247.091279] tg3 0000:04:00.0 enp4s0: 0x00005240: 0x0800150c,
>> 0x00000000, 0x3c038000, 0x54000003
>> [ 6247.091282] tg3 0000:04:00.0 enp4s0: 0x00005250: 0x03608821,
>> 0x00010000, 0x14830018, 0x21100010
>> [ 6247.091285] tg3 0000:04:00.0 enp4s0: 0x00005260: 0x00000000,
>> 0x3c038000, 0x54000003, 0x03608821
>> [ 6247.091288] tg3 0000:04:00.0 enp4s0: 0x00005270: 0xc0010000,
>> 0x14830018, 0x21100010, 0x00000000
>> [ 6247.091291] tg3 0000:04:00.0 enp4s0: 0x00005280: 0x00009800,
>> 0x80004000, 0x00000000, 0x00000000
>> [ 6247.091294] tg3 0000:04:00.0 enp4s0: 0x00005290: 0x00000000,
>> 0x00000000, 0x00000000, 0x0800102c
>> [ 6247.091297] tg3 0000:04:00.0 enp4s0: 0x000052a0: 0x3c04ff00,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091300] tg3 0000:04:00.0 enp4s0: 0x000052b0: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091302] tg3 0000:04:00.0 enp4s0: 0x000052c0: 0x00000000,
>> 0x00000000, 0x08000110, 0x00000000
>> [ 6247.091305] tg3 0000:04:00.0 enp4s0: 0x00005300: 0x00009800,
>> 0x80004000, 0x00000000, 0x00000000
>> [ 6247.091308] tg3 0000:04:00.0 enp4s0: 0x00005310: 0x00000000,
>> 0x00000000, 0x00000000, 0x08000100
>> [ 6247.091311] tg3 0000:04:00.0 enp4s0: 0x00005320: 0x3c04ff00,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091314] tg3 0000:04:00.0 enp4s0: 0x00005330: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091317] tg3 0000:04:00.0 enp4s0: 0x00005340: 0x00000000,
>> 0x00000000, 0x08000110, 0x00000000
>> [ 6247.091320] tg3 0000:04:00.0 enp4s0: 0x00005380: 0x00009800,
>> 0x80004000, 0x00000000, 0x00000000
>> [ 6247.091323] tg3 0000:04:00.0 enp4s0: 0x00005390: 0x00000000,
>> 0x00000000, 0x00000000, 0x080000f8
>> [ 6247.091325] tg3 0000:04:00.0 enp4s0: 0x000053a0: 0x3c04ff00,
>> 0x00000000, 0x00000000, 0x40000020
>> [ 6247.091328] tg3 0000:04:00.0 enp4s0: 0x000053b0: 0x00000000,
>> 0x00000025, 0x00000000, 0x00000000
>> [ 6247.091331] tg3 0000:04:00.0 enp4s0: 0x000053c0: 0x00000000,
>> 0x00000000, 0x080011f4, 0x00000000
>> [ 6247.091334] tg3 0000:04:00.0 enp4s0: 0x00005800: 0x00000000,
>> 0x39000000, 0x00000000, 0xc3000000
>> [ 6247.091337] tg3 0000:04:00.0 enp4s0: 0x00005810: 0x00000000,
>> 0x51000000, 0x00000000, 0x00000001
>> [ 6247.091340] tg3 0000:04:00.0 enp4s0: 0x00005820: 0x00000000,
>> 0x00000001, 0x00000000, 0x00000000
>> [ 6247.091342] tg3 0000:04:00.0 enp4s0: 0x00005860: 0x00000000,
>> 0x00000000, 0x00000000, 0x0000021d
>> [ 6247.091345] tg3 0000:04:00.0 enp4s0: 0x00005880: 0x00000000,
>> 0x00000800, 0x00000000, 0x00000955
>> [ 6247.091348] tg3 0000:04:00.0 enp4s0: 0x00005900: 0x00000000,
>> 0x00000171, 0x00000000, 0x00000000
>> [ 6247.091350] tg3 0000:04:00.0 enp4s0: 0x00005980: 0x00000171,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091353] tg3 0000:04:00.0 enp4s0: 0x00005a00: 0x000f601f,
>> 0x00000000, 0x00010000, 0x00000000
>> [ 6247.091356] tg3 0000:04:00.0 enp4s0: 0x00006000: 0x20010082,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091359] tg3 0000:04:00.0 enp4s0: 0x00006400: 0x00000000,
>> 0x00000000, 0x00010091, 0xc0000000
>> [ 6247.091362] tg3 0000:04:00.0 enp4s0: 0x00006410: 0x05000016,
>> 0x05000016, 0x00000000, 0x00000000
>> [ 6247.091364] tg3 0000:04:00.0 enp4s0: 0x00006430: 0x00000000,
>> 0x14e41687, 0x2215103c, 0x10020000
>> [ 6247.091367] tg3 0000:04:00.0 enp4s0: 0x00006440: 0x0000304f,
>> 0x000002e4, 0x00000000, 0x00000080
>> [ 6247.091371] tg3 0000:04:00.0 enp4s0: 0x000064c0: 0x00000005,
>> 0x00000004, 0x00000122, 0x00000000
>> [ 6247.091374] tg3 0000:04:00.0 enp4s0: 0x000064d0: 0x00000040,
>> 0x10008d82, 0x00000000, 0x00d75e12
>> [ 6247.091377] tg3 0000:04:00.0 enp4s0: 0x000064e0: 0x00000031,
>> 0x0008001f, 0x00000000, 0x00000000
>> [ 6247.091379] tg3 0000:04:00.0 enp4s0: 0x000064f0: 0x00000002,
>> 0x00000031, 0x00000000, 0x00000000
>> [ 6247.091382] tg3 0000:04:00.0 enp4s0: 0x00006500: 0x03e10003,
>> 0xd45792bf, 0x00008cdc, 0x00000003
>> [ 6247.091385] tg3 0000:04:00.0 enp4s0: 0x00006510: 0x00078116,
>> 0x0005810b, 0x00046105, 0x00000000
>> [ 6247.091388] tg3 0000:04:00.0 enp4s0: 0x00006530: 0x00000001,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091390] tg3 0000:04:00.0 enp4s0: 0x00006540: 0x0028081f,
>> 0x0001001e, 0x00000000, 0x00000000
>> [ 6247.091393] tg3 0000:04:00.0 enp4s0: 0x00006550: 0x00000001,
>> 0x02800000, 0x0000000f, 0x00000000
>> [ 6247.091396] tg3 0000:04:00.0 enp4s0: 0x00006560: 0x0000000f,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091399] tg3 0000:04:00.0 enp4s0: 0x000065f0: 0x00000000,
>> 0x00000059, 0x00000000, 0x00000000
>> [ 6247.091402] tg3 0000:04:00.0 enp4s0: 0x00006800: 0x141b0034,
>> 0x20081082, 0x00029118, 0x730cfbb9
>> [ 6247.091405] tg3 0000:04:00.0 enp4s0: 0x00006810: 0x21100010,
>> 0xffffffff, 0x00000000, 0x000000f0
>> [ 6247.091408] tg3 0000:04:00.0 enp4s0: 0x00006880: 0x77fff020,
>> 0x00000040, 0x00801687, 0x00000000
>> [ 6247.091410] tg3 0000:04:00.0 enp4s0: 0x00006890: 0x00800000,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091413] tg3 0000:04:00.0 enp4s0: 0x000068a0: 0x00000000,
>> 0x00010001, 0x00000000, 0x00000000
>> [ 6247.091416] tg3 0000:04:00.0 enp4s0: 0x000068b0: 0x00040000,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091419] tg3 0000:04:00.0 enp4s0: 0x000068c0: 0x00000044,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091422] tg3 0000:04:00.0 enp4s0: 0x000068f0: 0x00000000,
>> 0x00000000, 0x00000000, 0x04444444
>> [ 6247.091424] tg3 0000:04:00.0 enp4s0: 0x00006900: 0x6f95a788,
>> 0x14bd0ec2, 0x00000000, 0x00000000
>> [ 6247.091427] tg3 0000:04:00.0 enp4s0: 0x00006920: 0x00000000,
>> 0x00000000, 0x00000001, 0x00000000
>> [ 6247.091430] tg3 0000:04:00.0 enp4s0: 0x00006c00: 0x168714e4,
>> 0x00100506, 0x02000010, 0x00000010
>> [ 6247.091433] tg3 0000:04:00.0 enp4s0: 0x00006c10: 0xe212000c,
>> 0x00000000, 0xe211000c, 0x00000000
>> [ 6247.091436] tg3 0000:04:00.0 enp4s0: 0x00006c20: 0xe210000c,
>> 0x00000000, 0x00000000, 0x2215103c
>> [ 6247.091438] tg3 0000:04:00.0 enp4s0: 0x00006c30: 0x00000000,
>> 0x00000048, 0x00000000, 0x0000010a
>> [ 6247.091441] tg3 0000:04:00.0 enp4s0: 0x00006c40: 0x00000000,
>> 0x00000000, 0xc8035001, 0x16002008
>> [ 6247.091444] tg3 0000:04:00.0 enp4s0: 0x00006c50: 0x00005803,
>> 0x00000000, 0x0086a005, 0x00000000
>> [ 6247.091447] tg3 0000:04:00.0 enp4s0: 0x00006c60: 0x00000000,
>> 0x00000000, 0xf1000298, 0x01f802d1
>> [ 6247.091450] tg3 0000:04:00.0 enp4s0: 0x00006c70: 0x00071010,
>> 0xf6001500, 0x00000000, 0x00000000
>> [ 6247.091453] tg3 0000:04:00.0 enp4s0: 0x00006ca0: 0x8005ac11,
>> 0x00000004, 0x00000122, 0x00020010
>> [ 6247.091456] tg3 0000:04:00.0 enp4s0: 0x00006cb0: 0x10008d82,
>> 0x00115400, 0x00475c12, 0x10120043
>> [ 6247.091459] tg3 0000:04:00.0 enp4s0: 0x00006cd0: 0x0008081f,
>> 0x00000000, 0x00000000, 0x00010001
>> [ 6247.091462] tg3 0000:04:00.0 enp4s0: 0x00006cf0: 0x00000000,
>> 0x05762100, 0x00000000, 0x00000000
>> [ 6247.091464] tg3 0000:04:00.0 enp4s0: 0x00006d00: 0x13c10001,
>> 0x00000000, 0x00000000, 0x00062030
>> [ 6247.091467] tg3 0000:04:00.0 enp4s0: 0x00006d10: 0x00001000,
>> 0x00002000, 0x000000a0, 0x00000000
>> [ 6247.091470] tg3 0000:04:00.0 enp4s0: 0x00006d30: 0x00000000,
>> 0x00000000, 0x00000000, 0x15010003
>> [ 6247.091473] tg3 0000:04:00.0 enp4s0: 0x00006d40: 0xd45792bf,
>> 0x00008cdc, 0x00000000, 0x00000000
>> [ 6247.091476] tg3 0000:04:00.0 enp4s0: 0x00006d50: 0x16010004,
>> 0x00000000, 0x00078116, 0x00000001
>> [ 6247.091479] tg3 0000:04:00.0 enp4s0: 0x00006d60: 0x1b010002,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091482] tg3 0000:04:00.0 enp4s0: 0x00006d70: 0x00000000,
>> 0x80000001, 0x00000000, 0x00000000
>> [ 6247.091484] tg3 0000:04:00.0 enp4s0: 0x00006db0: 0x23010018,
>> 0x00000000, 0x00000000, 0x00000000
>> [ 6247.091487] tg3 0000:04:00.0 enp4s0: 0x00006e30: 0x00010017,
>> 0x00050403, 0x00000000, 0x00000000
>> [ 6247.091490] tg3 0000:04:00.0 enp4s0: 0x00007000: 0x08000008,
>> 0x00000000, 0x00000000, 0x000038d4
>> [ 6247.091493] tg3 0000:04:00.0 enp4s0: 0x00007010: 0x9928504d,
>> 0x02808083, 0x800500db, 0x03000a00
>> [ 6247.091496] tg3 0000:04:00.0 enp4s0: 0x00007020: 0x00000000,
>> 0x00000008, 0x00000406, 0x10004000
>> [ 6247.091499] tg3 0000:04:00.0 enp4s0: 0x00007030: 0x000e0000,
>> 0x000038d8, 0x00230030, 0x80000000
>> [ 6247.091502] tg3 0000:04:00.0 enp4s0: 0x00007500: 0x00000000,
>> 0x00000000, 0x00000081, 0x00000000
>> [ 6247.091505] tg3 0000:04:00.0 enp4s0: 0x00007510: 0x00000000,
>> 0xffffdfff, 0x00000000, 0x00000000
>> [ 6247.091510] tg3 0000:04:00.0 enp4s0: 0: Host status block
>> [00000001:00000039:(0000:0145:0000):(0000:0167)]
>> [ 6247.091514] tg3 0000:04:00.0 enp4s0: 0: NAPI info
>> [00000039:00000039:(0171:0167:01ff):0000:(021d:0000:0000:0000)]
>> [ 6247.091518] tg3 0000:04:00.0 enp4s0: 1: Host status block
>> [00000001:000000c3:(0000:0000:0000):(0800:0000)]
>> [ 6247.091521] tg3 0000:04:00.0 enp4s0: 1: NAPI info
>> [000000c3:000000c3:(0000:0000:01ff):0800:(0000:0000:0000:0000)]
>> [ 6247.091524] tg3 0000:04:00.0 enp4s0: 2: Host status block
>> [00000001:00000051:(0955:0000:0000):(0000:0000)]
>> [ 6247.091528] tg3 0000:04:00.0 enp4s0: 2: NAPI info
>> [00000051:00000051:(0000:0000:01ff):0955:(0155:0155:0000:0000)]
>> [ 6247.135111] tg3 0000:04:00.0 enp4s0: Link is down
>> [ 6250.868825] tg3 0000:04:00.0 enp4s0: Link is up at 1000 Mbps, full duplex
>> [ 6250.868845] tg3 0000:04:00.0 enp4s0: Flow control is on for TX and on for RX
>> [ 6250.868849] tg3 0000:04:00.0 enp4s0: EEE is enabled
>
>
>
> --
> Thanks,
>
> Siva

^ permalink raw reply

* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Arend van Spriel @ 2017-05-12  8:36 UTC (permalink / raw)
  To: Kalle Valo, Xie Qirong
  Cc: Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel
In-Reply-To: <87tw4qqyh1.fsf@kamboji.qca.qualcomm.com>

On 5/12/2017 10:19 AM, Kalle Valo wrote:
> Xie Qirong <cheerx1994@gmail.com> writes:
> 
>> The combination of init_timer and setting up the data and function field
>> manually is equivalent to calling setup_timer(). This is an api
>> consolidation only and improves readability.
>>
>> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
>> ---
>>
>>   setup_timer.cocci suggested the following improvement:
>>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
>>   setup_timer function for function on line 384.
>>
>>   Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
>>   CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
>>   CONFIG_BRCMDBG=y
>>
>>   Kernel version: 4.11.0 (localversion-next is next-20170512)
> 
> How is this different from the first version?
> 
> https://patchwork.kernel.org/patch/9709467/

Hi Kalle,

This is actually the third version. You are referring to the 
not-specifically-named "v2" here, but how are you to know ;-) This third 
version is the same as v1 on which I commented to put the coccinelle 
output in the commit message. So I would still keep v2 if nothing else 
changed in v3 apart from my Acked-by: tag.

Regards,
Arend

> Always add patch version "[PATCH v2]" and a changelog. I added a section
> "Frequent problems" to the wiki to mention about these common problems:
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
> 

^ permalink raw reply

* Re: [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Kalle Valo @ 2017-05-12  8:19 UTC (permalink / raw)
  To: Xie Qirong
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel
In-Reply-To: <20170512073555.12333-1-cheerx1994@gmail.com>

Xie Qirong <cheerx1994@gmail.com> writes:

> The combination of init_timer and setting up the data and function field
> manually is equivalent to calling setup_timer(). This is an api
> consolidation only and improves readability.
>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
> ---
>
>  setup_timer.cocci suggested the following improvement:
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
>  setup_timer function for function on line 384.
>
>  Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
>  CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
>  CONFIG_BRCMDBG=y
>
>  Kernel version: 4.11.0 (localversion-next is next-20170512)

How is this different from the first version?

https://patchwork.kernel.org/patch/9709467/

Always add patch version "[PATCH v2]" and a changelog. I added a section
"Frequent problems" to the wiki to mention about these common problems:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing

-- 
Kalle Valo

^ permalink raw reply

* Re: [PATCH v2 1/2] net: Added mtu parameter to dev_forward_skb calls
From: Teco Boot @ 2017-05-12  8:05 UTC (permalink / raw)
  To: Fredrik Markström
  Cc: Eric Dumazet, Daniel Borkmann, netdev, bridge, linux-kernel,
	Alexei Starovoitov, David S. Miller
In-Reply-To: <CAKdL+dS_-UiHA5tr7zP-5LtwDd0aXpZq5tpMYf9kr7hu2SwdGQ@mail.gmail.com>

IP MTU and L2 MTU are different animals.

IMHO IP MTU is for fragmentation at sender of a link. There is no need dropping IP packets at receiver with size > configured IP MTU. IP packets with size > receiver L2 MTU will be dropped at sub-IP layer.

For this patch: if veth has some notion on L2 MTU (e.g. buffer size limits), there has to be checks for it. I don't know why configuring MRU helps, more config, more mistakes. If there is no need for dropping the packet: don't.

Teco


> Op 11 mei 2017, om 21:10 heeft Fredrik Markström <fredrik.markstrom@gmail.com> het volgende geschreven:
> 
> On Thu, May 11, 2017 at 6:01 PM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
>> On Thu, 11 May 2017 15:46:27 +0200
>> Fredrik Markstrom <fredrik.markstrom@gmail.com> wrote:
>> 
>>> From: Fredrik Markström <fredrik.markstrom@gmail.com>
>>> 
>>> is_skb_forwardable() currently checks if the packet size is <= mtu of
>>> the receiving interface. This is not consistent with most of the hardware
>>> ethernet drivers that happily receives packets larger then MTU.
>> 
>> Wrong.
> 
> What is "Wrong" ? I was initially skeptical to implement this patch,
> since it feels odd to have different MTU:s set on the two sides of a
> link. After consulting some IP people and the RFC:s I kind of changed
> my mind and thought I'd give it a shot. In the RFCs I couldn't find
> anything that defined when and when not a received packet should be
> dropped.
> 
>> 
>> Hardware interfaces are free to drop any packet greater than MTU (actually MTU + VLAN).
>> The actual limit is a function of the hardware. Some hardware can only limit by
>> power of 2; some can only limit frames larger than 1500; some have no limiting at all.
> 
> Agreed. The purpose of these patches is to be able to configure an
> veth interface to mimic these different behaviors. Non of the Ethernet
> interfaces I have access to drops packets due to them being larger
> then the configured MTU like veth does.
> 
> Being able to mimic real Ethernet hardware is useful when
> consolidating hardware using containers/namespaces.
> 
> In a reply to a comment from David Miller in my previous version of
> the patch I attached the example below to demonstrate the case in
> detail.
> 
> This works with all ethernet hardware setups I have access to:
> 
> ---- 8< ------
> # Host A eth2 and Host B eth0 is on the same network.
> 
> # On HOST A
> % ip address add 1.2.3.4/24 dev eth2
> % ip link set eth2 mtu 300 up
> 
> % # HOST B
> % ip address add 1.2.3.5/24 dev eth0
> % ip link set eth0 mtu 1000 up
> % ping -c 1 -W 1 -s 400 1.2.3.4
> PING 1.2.3.4 (1.2.3.4) 400(428) bytes of data.
> 408 bytes from 1.2.3.4: icmp_seq=1 ttl=64 time=1.57 ms
> 
> --- 1.2.3.4 ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 1.573/1.573/1.573/0.000 ms
> ---- 8< ------
> 
> 
> But it doesn't work with veth:
> 
> ---- 8< ------
> # veth0 and veth1 is a veth pair and veth1 has ben moved to a separate
> network namespace.
> % # NS A
> % ip address add 1.2.3.4/24 dev veth0
> % ip link set veth0 mtu 300 up
> 
> % # NS B
> % ip address add 1.2.3.5/24 dev veth1
> % ip link set veth1 mtu 1000 up
> % ping -c 1 -W 1 -s 400 1.2.3.4
> PING 1.2.3.4 (1.2.3.4) 400(428) bytes of data.
> 
> --- 1.2.3.4 ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
> ---- 8< ------
> 
> -- 
> /Fredrik

^ permalink raw reply

* [PATCH] brcmfmac: btcoex: replace init_timer with setup_timer
From: Xie Qirong @ 2017-05-12  7:35 UTC (permalink / raw)
  To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo
  Cc: linux-wireless, brcm80211-dev-list.pdl, netdev, linux-kernel,
	Xie Qirong

The combination of init_timer and setting up the data and function field
manually is equivalent to calling setup_timer(). This is an api
consolidation only and improves readability.

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Xie Qirong <cheerx1994@gmail.com>
---

 setup_timer.cocci suggested the following improvement:
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use
 setup_timer function for function on line 384.

 Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y +
 CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y +
 CONFIG_BRCMDBG=y

 Kernel version: 4.11.0 (localversion-next is next-20170512)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
index 14a70d4b4e86..3559fb5b8fb0 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c
@@ -380,9 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg)
 	/* Set up timer for BT  */
 	btci->timer_on = false;
 	btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME;
-	init_timer(&btci->timer);
-	btci->timer.data = (ulong)btci;
-	btci->timer.function = brcmf_btcoex_timerfunc;
+	setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci);
 	btci->cfg = cfg;
 	btci->saved_regs_part1 = false;
 	btci->saved_regs_part2 = false;
-- 
2.12.2

^ permalink raw reply related

* Re: [PATCH v5 15/17] dt-bindings: qca7000: append UART interface to binding
From: Jakub Kicinski @ 2017-05-12  6:43 UTC (permalink / raw)
  To: Michael Heimpold
  Cc: Rob Herring, Stefan Wahren, Mark Rutland, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20170512061552.Horde.ggjCMHnIsr8LeADwTQwhnx7-O4EMSK59OscLBGDc3sTiBZZV94DADvEd@public.gmane.org>

On Fri, 12 May 2017 06:15:52 +0000, Michael Heimpold wrote:
> Hi,
> 
> Zitat von Jakub Kicinski <kubakici-5tc4TXWwyLM@public.gmane.org>:
> 
> > On Thu, 11 May 2017 21:12:22 +0200, Michael Heimpold wrote:  
> >> Am Mittwoch, 10. Mai 2017, 10:53:26 CEST schrieb Stefan Wahren:  
> >> > This merges the serdev binding for the QCA7000 UART driver (Ethernet over
> >> > UART) into the existing document.
> >> >
> >> > Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> >> > ---
> >> >  .../devicetree/bindings/net/qca-qca7000.txt        | 32
> >> > ++++++++++++++++++++++ 1 file changed, 32 insertions(+)
> >> >
> >> > diff --git a/Documentation/devicetree/bindings/net/qca-qca7000.txt
> >> > b/Documentation/devicetree/bindings/net/qca-qca7000.txt index
> >> > a37f656..08364c3 100644
> >> > --- a/Documentation/devicetree/bindings/net/qca-qca7000.txt
> >> > +++ b/Documentation/devicetree/bindings/net/qca-qca7000.txt
> >> > @@ -54,3 +54,35 @@ ssp2: spi@80014000 {
> >> >  		local-mac-address = [ A0 B0 C0 D0 E0 F0 ];
> >> >  	};
> >> >  };
> >> > +
> >> > +(b) Ethernet over UART
> >> > +
> >> > +In order to use the QCA7000 as UART slave it must be defined as    
> >> a child of  
> >> > a +UART master in the device tree. It is possible to preconfigure the UART
> >> > +settings of the QCA7000 firmware, but it's not possible to change them
> >> > during +runtime.
> >> > +
> >> > +Required properties:
> >> > +- compatible        : Should be "qca,qca7000-uart"  
> >>
> >> I already discussed this with Stefan off-list a little bit, but I would like
> >> to bring this to a broader audience: I'm not sure whether the compatible
> >> should contain the "-uart" suffix, because the hardware chip is the  
> >> very same
> >> QCA7000 chip which can also be used with SPI protocol.
> >> The only difference is the loaded firmware within the chip which can either
> >> speak SPI or UART protocol (but not both at the same time - due to shared
> >> pins). So the hardware design decides which interface type is used.
> >>
> >> At the moment, this patch series adds a dedicated driver for the UART
> >> protocol, in parallel to the existing SPI driver. So a different compatible
> >> string is needed here to match against the new driver.
> >>
> >> An alternative approach would be to re-use the existing compatible string
> >> "qca,qca7000" for both, the SPI and UART protocol, because a "smarter"
> >> (combined) driver would detect which protocol to use. For example the driver
> >> could check for spi-cpha and/or spi-cpol which are required for SPI  
> >> protocol:
> >> if these exists the driver could assume that SPI must be used, if both are
> >> missing then UART protocol should be used.
> >> (This way it would not be necessary to check whether the node is a child of
> >> a SPI or UART master node - but maybe this is even easier - I don't know)
> >>
> >> Or in shorter words: my concern is that while "qca7000-uart" describes the
> >> hardware, it's too closely coupled to the driver implementation. Having
> >> some feedback of the experts would be nice :-)  
> >
> > I'm no expert, but devices which can do both I2C and SPI are quite
> > common, and they usually have the same compatible string for both
> > buses.  
> 
> do you have an example driver at hand? I only found GPIO mcp23s08 driver,
> which can handle both I2C and SPI chips, but there are different compatible
> strings used to distinguish several chip models.

I think drivers/tty/serial/sc16is7xx.c has the same strings, and some
Kconfig magic to work when either bus is enabled in .config.

Quick grep shows there are couple more potential ones to look at:

$ find . -name Kconfig | xargs grep -n 'SPI_MASTER.* I2C' 
./drivers/tty/serial/Kconfig:1208:        depends on (SPI_MASTER && !I2C) || I2C
./drivers/mfd/Kconfig:327:	depends on (SPI_MASTER || I2C)
./drivers/iio/dac/Kconfig:10:	depends on (SPI_MASTER && I2C!=m) || I2C
./drivers/iio/dac/Kconfig:34:	depends on (SPI_MASTER && I2C!=m) || I2C
./drivers/iio/dac/Kconfig:57:	depends on (SPI_MASTER && I2C!=m) || I2C
./drivers/gpio/Kconfig:1231:	depends on (SPI_MASTER && !I2C) || I2C
$ find . -name Kconfig | xargs grep -n 'I2C.*||.*SPI_MASTER' 
./drivers/mfd/Kconfig:1094:	depends on (I2C=y || SPI_MASTER=y)
./drivers/iio/gyro/Kconfig:55:	depends on (I2C || SPI_MASTER)
./drivers/iio/gyro/Kconfig:107:	depends on (I2C || SPI_MASTER) && SYSFS
./drivers/iio/accel/Kconfig:153:	depends on (I2C || SPI_MASTER) && SYSFS
./drivers/iio/pressure/Kconfig:20:	depends on (I2C || SPI_MASTER)
./drivers/iio/pressure/Kconfig:161:	depends on (I2C || SPI_MASTER) && SYSFS
./drivers/iio/magnetometer/Kconfig:118:	depends on (I2C || SPI_MASTER) && SYSFS

drivers/mfd/mc13xxx-*.c seems to have the same strings.  The iio/dac drivers
don't support DT but do share names.  The MCP GPIO chip you mention indeed has
different product names based on the bus it's made for (0 vs s in the middle 
of the name), so I gather less relevant case?  drivers/iio/pressure/bmp280-*.c 
has the same strings, if I'm looking correctly... I didn't look at the others.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH net] sctp: fix src address selection if using secondary addresses for ipv6
From: Xin Long @ 2017-05-12  6:39 UTC (permalink / raw)
  To: network dev, linux-sctp; +Cc: davem, Marcelo Ricardo Leitner, Neil Horman

Commit 0ca50d12fe46 ("sctp: fix src address selection if using secondary
addresses") has fixed a src address selection issue when using secondary
addresses for ipv4.

Now sctp ipv6 also has the similar issue. When using a secondary address,
sctp_v6_get_dst tries to choose the saddr which has the most same bits
with the daddr by sctp_v6_addr_match_len. It may make some cases not work
as expected.

hostA:
  [1] fd21:356b:459a:cf10::11 (eth1)
  [2] fd21:356b:459a:cf20::11 (eth2)

hostB:
  [a] fd21:356b:459a:cf30::2  (eth1)
  [b] fd21:356b:459a:cf40::2  (eth2)

route from hostA to hostB:
  fd21:356b:459a:cf30::/64 dev eth1  metric 1024  mtu 1500

The expected path should be:
  fd21:356b:459a:cf10::11 <-> fd21:356b:459a:cf30::2
But addr[2] matches addr[a] more bits than addr[1] does, according to
sctp_v6_addr_match_len. It causes the path to be:
  fd21:356b:459a:cf20::11 <-> fd21:356b:459a:cf30::2

This patch is to fix it with the same way as Marcelo's fix for sctp ipv4.
As no ip_dev_find for ipv6, this patch is to use ipv6_chk_addr to check
if the saddr is in a dev instead.

Note that for backwards compatibility, it will still do the addr_match_len
check here when no optimal is found.

Reported-by: Patrick Talbert <ptalbert@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 net/sctp/ipv6.c | 46 +++++++++++++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 961ee59..142b70e 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -240,12 +240,10 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
 	struct sctp_bind_addr *bp;
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct sctp_sockaddr_entry *laddr;
-	union sctp_addr *baddr = NULL;
 	union sctp_addr *daddr = &t->ipaddr;
 	union sctp_addr dst_saddr;
 	struct in6_addr *final_p, final;
 	__u8 matchlen = 0;
-	__u8 bmatchlen;
 	sctp_scope_t scope;
 
 	memset(fl6, 0, sizeof(struct flowi6));
@@ -312,23 +310,37 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
 	 */
 	rcu_read_lock();
 	list_for_each_entry_rcu(laddr, &bp->address_list, list) {
-		if (!laddr->valid)
+		struct dst_entry *bdst;
+		__u8 bmatchlen;
+
+		if (!laddr->valid ||
+		    laddr->state != SCTP_ADDR_SRC ||
+		    laddr->a.sa.sa_family != AF_INET6 ||
+		    scope > sctp_scope(&laddr->a))
 			continue;
-		if ((laddr->state == SCTP_ADDR_SRC) &&
-		    (laddr->a.sa.sa_family == AF_INET6) &&
-		    (scope <= sctp_scope(&laddr->a))) {
-			bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
-			if (!baddr || (matchlen < bmatchlen)) {
-				baddr = &laddr->a;
-				matchlen = bmatchlen;
-			}
-		}
-	}
-	if (baddr) {
-		fl6->saddr = baddr->v6.sin6_addr;
-		fl6->fl6_sport = baddr->v6.sin6_port;
+
+		fl6->saddr = laddr->a.v6.sin6_addr;
+		fl6->fl6_sport = laddr->a.v6.sin6_port;
 		final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final);
-		dst = ip6_dst_lookup_flow(sk, fl6, final_p);
+		bdst = ip6_dst_lookup_flow(sk, fl6, final_p);
+
+		if (!IS_ERR(bdst) &&
+		    ipv6_chk_addr(dev_net(bdst->dev),
+				  &laddr->a.v6.sin6_addr, bdst->dev, 1)) {
+			if (!IS_ERR_OR_NULL(dst))
+				dst_release(dst);
+			dst = bdst;
+			break;
+		}
+
+		bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
+		if (matchlen > bmatchlen)
+			continue;
+
+		if (!IS_ERR_OR_NULL(dst))
+			dst_release(dst);
+		dst = bdst;
+		matchlen = bmatchlen;
 	}
 	rcu_read_unlock();
 
-- 
2.1.0

^ permalink raw reply related

* Re: [Patch net] ipv4: restore rt->fi for reference counting
From: Julian Anastasov @ 2017-05-12  6:39 UTC (permalink / raw)
  To: Cong Wang
  Cc: Eric Dumazet, David Miller, Linux Kernel Network Developers,
	Andrey Konovalov, Eric Dumazet
In-Reply-To: <CAM_iQpWxDKHF4N1xor7qj+5s91GrctgcGnzN0buw18qs7__-gQ@mail.gmail.com>


	Hello,

On Thu, 11 May 2017, Cong Wang wrote:

> On Thu, May 11, 2017 at 5:07 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > So, if I understand you correctly it is safe to NULL'ing
> > nh_dev in NETDEV_UNREGISTER_FINAL, right?
> >
> > If still not, how about transfer nh_dev's to loopback_dev
> > too in NETDEV_UNREGISTER? Like we transfer dst->dev.
> >
> > I don't want to touch the fast path to check for NULL, as
> > it will change more code and slow down performance.
> 
> Finally I come up with the attached patch. Please let me know if
> I still miss anything.

	fib_flush will unlink the FIB infos at NETDEV_UNREGISTER
time, so we can not see them in any hash tables later on
NETDEV_UNREGISTER_FINAL. fib_put_nh_devs() can not work
except if moving NHs in another hash table but that should
not be needed.

	I'm thinking for the following solution which
is a bit hackish:

- on NETDEV_UNREGISTER we want to put the nh_dev references,
so fib_release_info is a good place. But as fib_release_info
is not always called, we will have two places that put
references. We can use such hack:

	- for example, use nh_oif to know if dev_put is
	already called

	- fib_release_info() should set nh_oif to 0 because
	it will now call dev_put without clearing nh_dev

	- free_fib_info_rcu() will not call dev_put if nh_oif is 0:
	if (nexthop_nh->nh_dev && nexthop_nh->nh_oif)
		dev_put(nexthop_nh->nh_dev);

	- as fi is unlinked, there is no chance fib_info_hashfn()
	to use the cleared nh_oif for hashing

	- we expect noone to touch nh_dev fields after fi is
	unlinked, this includes free_fib_info and free_fib_info_rcu

	What we achieve:

- between NETDEV_UNREGISTER and NETDEV_UNREGISTER_FINAL nh_dev
still points to our dev (and not to loopback, I think, this
answers your question in previous email), so route lookups
will not find loopback in the FIB tree. We do not want
some packets to be wrongly rerouted. Even if we don't
hold dev reference, the RCU grace period helps here.

- fib_dev/nh_dev != NULL checks are not needed, so this addresses
Eric's concerns. BTW, fib_route_seq_show actually checks
for fi->fib_dev, may be not in a safe way (lockless_dereference
needed?) but as we don't set nh_dev to NULL this is not
needed.

	What more? What about nh_pcpu_rth_output and
nh_rth_input holding routes? We should think about
them too. I should think more if nh_oif trick can work
for them, may be not because nh_oif is optional...
May be we should purge them somehow?

Regards

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox