Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Fri, 23 Mar 2018 15:24:57 +0000 (11:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Mar 2018 15:31:58 +0000 (11:31 -0400)
Fun set of conflict resolutions here...

For the mac80211 stuff, these were fortunately just parallel
adds.  Trivially resolved.

In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the
function phy_disable_interrupts() earlier in the file, whilst in
'net-next' the phy_error() call from this function was removed.

In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the
'rt_table_id' member of rtable collided with a bug fix in 'net' that
added a new struct member "rt_mtu_locked" which needs to be copied
over here.

The mlxsw driver conflict consisted of net-next separating
the span code and definitions into separate files, whilst
a 'net' bug fix made some changes to that moved code.

The mlx5 infiniband conflict resolution was quite non-trivial,
the RDMA tree's merge commit was used as a guide here, and
here are their notes:

====================

    Due to bug fixes found by the syzkaller bot and taken into the for-rc
    branch after development for the 4.17 merge window had already started
    being taken into the for-next branch, there were fairly non-trivial
    merge issues that would need to be resolved between the for-rc branch
    and the for-next branch.  This merge resolves those conflicts and
    provides a unified base upon which ongoing development for 4.17 can
    be based.

    Conflicts:
            drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524
            (IB/mlx5: Fix cleanup order on unload) added to for-rc and
            commit b5ca15ad7e61 (IB/mlx5: Add proper representors support)
            add as part of the devel cycle both needed to modify the
            init/de-init functions used by mlx5.  To support the new
            representors, the new functions added by the cleanup patch
            needed to be made non-static, and the init/de-init list
            added by the representors patch needed to be modified to
            match the init/de-init list changes made by the cleanup
            patch.
    Updates:
            drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function
            prototypes added by representors patch to reflect new function
            names as changed by cleanup patch
            drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init
            stage list to match new order from cleanup patch
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
93 files changed:
1  2 
Documentation/devicetree/bindings/net/dsa/marvell.txt
MAINTAINERS
arch/x86/net/bpf_jit_comp.c
drivers/bluetooth/btusb.c
drivers/infiniband/core/cma.c
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/qp.c
drivers/net/dsa/b53/b53_common.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
drivers/net/ethernet/freescale/fman/fman_dtsec.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
drivers/net/ethernet/qlogic/qed/qed_iwarp.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/rndis_filter.c
drivers/net/phy/marvell.c
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
drivers/net/ppp/ppp_generic.c
drivers/net/team/team.c
drivers/net/tun.c
drivers/net/wireless/mac80211_hwsim.c
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c
drivers/vhost/net.c
include/linux/mlx5/driver.h
include/linux/net.h
include/linux/phy.h
include/linux/skbuff.h
include/net/ip.h
include/net/ip6_route.h
include/net/ip_fib.h
include/net/mac80211.h
include/net/route.h
include/net/sch_generic.h
include/net/sock.h
include/uapi/linux/if_ether.h
kernel/bpf/syscall.c
kernel/trace/bpf_trace.c
net/batman-adv/distributed-arp-table.c
net/batman-adv/icmp_socket.c
net/batman-adv/log.c
net/batman-adv/multicast.c
net/batman-adv/routing.c
net/core/dev.c
net/core/devlink.c
net/core/filter.c
net/core/skbuff.c
net/core/sock.c
net/core/sock_diag.c
net/ieee802154/6lowpan/core.c
net/ipv4/route.c
net/ipv4/tcp.c
net/ipv4/xfrm4_policy.c
net/ipv6/datagram.c
net/ipv6/ip6_gre.c
net/ipv6/ndisc.c
net/ipv6/route.c
net/ipv6/xfrm6_policy.c
net/iucv/af_iucv.c
net/kcm/kcmsock.c
net/l2tp/l2tp_core.c
net/mac80211/debugfs.c
net/mac80211/mlme.c
net/netfilter/nf_tables_api.c
net/netfilter/x_tables.c
net/netfilter/xt_hashlimit.c
net/netfilter/xt_recent.c
net/netlink/genetlink.c
net/sched/act_bpf.c
net/sched/act_csum.c
net/sched/act_ipt.c
net/sched/act_pedit.c
net/sched/act_police.c
net/sched/act_sample.c
net/sched/act_simple.c
net/sched/act_skbmod.c
net/sched/act_tunnel_key.c
net/sched/act_vlan.c
net/smc/af_smc.c
net/socket.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_user.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 61cc3d7db257a65c3e04298494df5d309df1384d,0000000000000000000000000000000000000000..0e04fdddf67017f55605bcde7d53c88fadbae181
mode 100644,000000..100644
--- /dev/null
@@@ -1,189 -1,0 +1,192 @@@
-       STAGE_CREATE(MLX5_IB_STAGE_UMR_RESOURCES,
-                    mlx5_ib_stage_umr_res_init,
-                    mlx5_ib_stage_umr_res_cleanup),
 +/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
 +/*
 + * Copyright (c) 2018 Mellanox Technologies. All rights reserved.
 + */
 +
 +#include "ib_rep.h"
 +
 +static const struct mlx5_ib_profile rep_profile = {
 +      STAGE_CREATE(MLX5_IB_STAGE_INIT,
 +                   mlx5_ib_stage_init_init,
 +                   mlx5_ib_stage_init_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_FLOW_DB,
 +                   mlx5_ib_stage_rep_flow_db_init,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_CAPS,
 +                   mlx5_ib_stage_caps_init,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB,
 +                   mlx5_ib_stage_rep_non_default_cb,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_ROCE,
 +                   mlx5_ib_stage_rep_roce_init,
 +                   mlx5_ib_stage_rep_roce_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_DEVICE_RESOURCES,
 +                   mlx5_ib_stage_dev_res_init,
 +                   mlx5_ib_stage_dev_res_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_COUNTERS,
 +                   mlx5_ib_stage_counters_init,
 +                   mlx5_ib_stage_counters_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_BFREG,
 +                   mlx5_ib_stage_bfrag_init,
 +                   mlx5_ib_stage_bfrag_cleanup),
++      STAGE_CREATE(MLX5_IB_STAGE_PRE_IB_REG_UMR,
++                   NULL,
++                   mlx5_ib_stage_pre_ib_reg_umr_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
 +                   mlx5_ib_stage_ib_reg_init,
 +                   mlx5_ib_stage_ib_reg_cleanup),
++      STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
++                   mlx5_ib_stage_post_ib_reg_umr_init,
++                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_CLASS_ATTR,
 +                   mlx5_ib_stage_class_attr_init,
 +                   NULL),
 +};
 +
 +static int
 +mlx5_ib_nic_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
 +{
 +      return 0;
 +}
 +
 +static void
 +mlx5_ib_nic_rep_unload(struct mlx5_eswitch_rep *rep)
 +{
 +      rep->rep_if[REP_IB].priv = NULL;
 +}
 +
 +static int
 +mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
 +{
 +      struct mlx5_ib_dev *ibdev;
 +
 +      ibdev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*ibdev));
 +      if (!ibdev)
 +              return -ENOMEM;
 +
 +      ibdev->rep = rep;
 +      ibdev->mdev = dev;
 +      ibdev->num_ports = max(MLX5_CAP_GEN(dev, num_ports),
 +                             MLX5_CAP_GEN(dev, num_vhca_ports));
 +      if (!__mlx5_ib_add(ibdev, &rep_profile))
 +              return -EINVAL;
 +
 +      rep->rep_if[REP_IB].priv = ibdev;
 +
 +      return 0;
 +}
 +
 +static void
 +mlx5_ib_vport_rep_unload(struct mlx5_eswitch_rep *rep)
 +{
 +      struct mlx5_ib_dev *dev;
 +
 +      if (!rep->rep_if[REP_IB].priv)
 +              return;
 +
 +      dev = mlx5_ib_rep_to_dev(rep);
 +      __mlx5_ib_remove(dev, dev->profile, MLX5_IB_STAGE_MAX);
 +      rep->rep_if[REP_IB].priv = NULL;
 +}
 +
 +static void *mlx5_ib_vport_get_proto_dev(struct mlx5_eswitch_rep *rep)
 +{
 +      return mlx5_ib_rep_to_dev(rep);
 +}
 +
 +static void mlx5_ib_rep_register_vf_vports(struct mlx5_ib_dev *dev)
 +{
 +      struct mlx5_eswitch *esw   = dev->mdev->priv.eswitch;
 +      int total_vfs = MLX5_TOTAL_VPORTS(dev->mdev);
 +      int vport;
 +
 +      for (vport = 1; vport < total_vfs; vport++) {
 +              struct mlx5_eswitch_rep_if rep_if = {};
 +
 +              rep_if.load = mlx5_ib_vport_rep_load;
 +              rep_if.unload = mlx5_ib_vport_rep_unload;
 +              rep_if.get_proto_dev = mlx5_ib_vport_get_proto_dev;
 +              mlx5_eswitch_register_vport_rep(esw, vport, &rep_if, REP_IB);
 +      }
 +}
 +
 +static void mlx5_ib_rep_unregister_vf_vports(struct mlx5_ib_dev *dev)
 +{
 +      struct mlx5_eswitch *esw   = dev->mdev->priv.eswitch;
 +      int total_vfs = MLX5_TOTAL_VPORTS(dev->mdev);
 +      int vport;
 +
 +      for (vport = 1; vport < total_vfs; vport++)
 +              mlx5_eswitch_unregister_vport_rep(esw, vport, REP_IB);
 +}
 +
 +void mlx5_ib_register_vport_reps(struct mlx5_ib_dev *dev)
 +{
 +      struct mlx5_eswitch *esw = dev->mdev->priv.eswitch;
 +      struct mlx5_eswitch_rep_if rep_if = {};
 +
 +      rep_if.load = mlx5_ib_nic_rep_load;
 +      rep_if.unload = mlx5_ib_nic_rep_unload;
 +      rep_if.get_proto_dev = mlx5_ib_vport_get_proto_dev;
 +      rep_if.priv = dev;
 +
 +      mlx5_eswitch_register_vport_rep(esw, 0, &rep_if, REP_IB);
 +
 +      mlx5_ib_rep_register_vf_vports(dev);
 +}
 +
 +void mlx5_ib_unregister_vport_reps(struct mlx5_ib_dev *dev)
 +{
 +      struct mlx5_eswitch *esw   = dev->mdev->priv.eswitch;
 +
 +      mlx5_ib_rep_unregister_vf_vports(dev); /* VFs vports */
 +      mlx5_eswitch_unregister_vport_rep(esw, 0, REP_IB); /* UPLINK PF*/
 +}
 +
 +u8 mlx5_ib_eswitch_mode(struct mlx5_eswitch *esw)
 +{
 +      return mlx5_eswitch_mode(esw);
 +}
 +
 +struct mlx5_ib_dev *mlx5_ib_get_rep_ibdev(struct mlx5_eswitch *esw,
 +                                        int vport_index)
 +{
 +      return mlx5_eswitch_get_proto_dev(esw, vport_index, REP_IB);
 +}
 +
 +struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
 +                                        int vport_index)
 +{
 +      return mlx5_eswitch_get_proto_dev(esw, vport_index, REP_ETH);
 +}
 +
 +struct mlx5_ib_dev *mlx5_ib_get_uplink_ibdev(struct mlx5_eswitch *esw)
 +{
 +      return mlx5_eswitch_uplink_get_proto_dev(esw, REP_IB);
 +}
 +
 +struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw, int vport)
 +{
 +      return mlx5_eswitch_vport_rep(esw, vport);
 +}
 +
 +int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
 +                            struct mlx5_ib_sq *sq)
 +{
 +      struct mlx5_flow_handle *flow_rule;
 +      struct mlx5_eswitch *esw = dev->mdev->priv.eswitch;
 +
 +      if (!dev->rep)
 +              return 0;
 +
 +      flow_rule =
 +              mlx5_eswitch_add_send_to_vport_rule(esw,
 +                                                  dev->rep->vport,
 +                                                  sq->base.mqp.qpn);
 +      if (IS_ERR(flow_rule))
 +              return PTR_ERR(flow_rule);
 +      sq->flow_rule = flow_rule;
 +
 +      return 0;
 +}
index d9474b95d8e5a0951abb253289f8936ab67d7b5f,da091de4e69d81eda73de4e3ce758830aaa1413c..390e4375647ee2c5d58e894f7e00972a10e09fb3
@@@ -4999,19 -4860,19 +4996,19 @@@ int mlx5_ib_stage_ib_reg_init(struct ml
        return ib_register_device(&dev->ib_dev, NULL);
  }
  
- void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
 -static void mlx5_ib_stage_pre_ib_reg_umr_cleanup(struct mlx5_ib_dev *dev)
++void mlx5_ib_stage_pre_ib_reg_umr_cleanup(struct mlx5_ib_dev *dev)
  {
-       ib_unregister_device(&dev->ib_dev);
+       destroy_umrc_res(dev);
  }
  
- int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev)
 -static void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
++void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev)
  {
-       return create_umr_res(dev);
+       ib_unregister_device(&dev->ib_dev);
  }
  
- void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev)
 -static int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
++int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev)
  {
-       destroy_umrc_res(dev);
+       return create_umr_res(dev);
  }
  
  static int mlx5_ib_stage_delay_drop_init(struct mlx5_ib_dev *dev)
@@@ -5144,48 -4999,6 +5144,51 @@@ static const struct mlx5_ib_profile pf_
                     NULL),
  };
  
-       STAGE_CREATE(MLX5_IB_STAGE_UMR_RESOURCES,
-                    mlx5_ib_stage_umr_res_init,
-                    mlx5_ib_stage_umr_res_cleanup),
 +static const struct mlx5_ib_profile nic_rep_profile = {
 +      STAGE_CREATE(MLX5_IB_STAGE_INIT,
 +                   mlx5_ib_stage_init_init,
 +                   mlx5_ib_stage_init_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_FLOW_DB,
 +                   mlx5_ib_stage_flow_db_init,
 +                   mlx5_ib_stage_flow_db_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_CAPS,
 +                   mlx5_ib_stage_caps_init,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_NON_DEFAULT_CB,
 +                   mlx5_ib_stage_rep_non_default_cb,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_ROCE,
 +                   mlx5_ib_stage_rep_roce_init,
 +                   mlx5_ib_stage_rep_roce_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_DEVICE_RESOURCES,
 +                   mlx5_ib_stage_dev_res_init,
 +                   mlx5_ib_stage_dev_res_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_COUNTERS,
 +                   mlx5_ib_stage_counters_init,
 +                   mlx5_ib_stage_counters_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_UAR,
 +                   mlx5_ib_stage_uar_init,
 +                   mlx5_ib_stage_uar_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_BFREG,
 +                   mlx5_ib_stage_bfrag_init,
 +                   mlx5_ib_stage_bfrag_cleanup),
++      STAGE_CREATE(MLX5_IB_STAGE_PRE_IB_REG_UMR,
++                   NULL,
++                   mlx5_ib_stage_pre_ib_reg_umr_cleanup),
 +      STAGE_CREATE(MLX5_IB_STAGE_IB_REG,
 +                   mlx5_ib_stage_ib_reg_init,
 +                   mlx5_ib_stage_ib_reg_cleanup),
++      STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
++                   mlx5_ib_stage_post_ib_reg_umr_init,
++                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_CLASS_ATTR,
 +                   mlx5_ib_stage_class_attr_init,
 +                   NULL),
 +      STAGE_CREATE(MLX5_IB_STAGE_REP_REG,
 +                   mlx5_ib_stage_rep_reg_init,
 +                   mlx5_ib_stage_rep_reg_cleanup),
 +};
 +
  static void *mlx5_ib_add_slave_port(struct mlx5_core_dev *mdev, u8 port_num)
  {
        struct mlx5_ib_multiport_info *mpi;
index e0bad28e0f099573c643cf657a9d841e423b1059,a5272499b60054d3a37a84cf277a0c067ca1c6e4..c33bf1523d677c2faadd983b91a5baa15c1b9cc0
@@@ -742,11 -739,11 +742,12 @@@ enum mlx5_ib_stages 
        MLX5_IB_STAGE_CONG_DEBUGFS,
        MLX5_IB_STAGE_UAR,
        MLX5_IB_STAGE_BFREG,
+       MLX5_IB_STAGE_PRE_IB_REG_UMR,
        MLX5_IB_STAGE_IB_REG,
-       MLX5_IB_STAGE_UMR_RESOURCES,
+       MLX5_IB_STAGE_POST_IB_REG_UMR,
        MLX5_IB_STAGE_DELAY_DROP,
        MLX5_IB_STAGE_CLASS_ATTR,
 +      MLX5_IB_STAGE_REP_REG,
        MLX5_IB_STAGE_MAX,
  };
  
@@@ -1054,31 -1050,6 +1055,31 @@@ static inline void mlx5_odp_populate_kl
  
  #endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
  
- int mlx5_ib_stage_umr_res_init(struct mlx5_ib_dev *dev);
- void mlx5_ib_stage_umr_res_cleanup(struct mlx5_ib_dev *dev);
 +/* Needed for rep profile */
 +int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_init_cleanup(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_rep_flow_db_init(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_rep_non_default_cb(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_rep_roce_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_rep_roce_cleanup(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_dev_res_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_dev_res_cleanup(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_counters_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_counters_cleanup(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_bfrag_cleanup(struct mlx5_ib_dev *dev);
++void mlx5_ib_stage_pre_ib_reg_umr_cleanup(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_ib_reg_init(struct mlx5_ib_dev *dev);
 +void mlx5_ib_stage_ib_reg_cleanup(struct mlx5_ib_dev *dev);
++int mlx5_ib_stage_post_ib_reg_umr_init(struct mlx5_ib_dev *dev);
 +int mlx5_ib_stage_class_attr_init(struct mlx5_ib_dev *dev);
 +void __mlx5_ib_remove(struct mlx5_ib_dev *dev,
 +                    const struct mlx5_ib_profile *profile,
 +                    int stage);
 +void *__mlx5_ib_add(struct mlx5_ib_dev *dev,
 +                  const struct mlx5_ib_profile *profile);
 +
  int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
                          u8 port, struct ifla_vf_info *info);
  int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
Simple merge
Simple merge
Simple merge
index 948aceb512c598c43720991d6e1d7e48f60c3a6e,0000000000000000000000000000000000000000..4b87ec20e65810b82ebcec18d65e73f98f54bb0e
mode 100644,000000..100644
--- /dev/null
@@@ -1,104 -1,0 +1,107 @@@
 +/*
 + * drivers/net/ethernet/mellanox/mlxsw/mlxsw_span.h
 + * Copyright (c) 2018 Mellanox Technologies. All rights reserved.
 + *
 + * Redistribution and use in source and binary forms, with or without
 + * modification, are permitted provided that the following conditions are met:
 + *
 + * 1. Redistributions of source code must retain the above copyright
 + *    notice, this list of conditions and the following disclaimer.
 + * 2. Redistributions in binary form must reproduce the above copyright
 + *    notice, this list of conditions and the following disclaimer in the
 + *    documentation and/or other materials provided with the distribution.
 + * 3. Neither the names of the copyright holders nor the names of its
 + *    contributors may be used to endorse or promote products derived from
 + *    this software without specific prior written permission.
 + *
 + * Alternatively, this software may be distributed under the terms of the
 + * GNU General Public License ("GPL") version 2 as published by the Free
 + * Software Foundation.
 + *
 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 + * POSSIBILITY OF SUCH DAMAGE.
 + */
 +
 +#ifndef _MLXSW_SPECTRUM_SPAN_H
 +#define _MLXSW_SPECTRUM_SPAN_H
 +
 +#include <linux/types.h>
 +#include <linux/if_ether.h>
 +
 +#include "spectrum_router.h"
 +
 +struct mlxsw_sp;
 +struct mlxsw_sp_port;
 +
 +enum mlxsw_sp_span_type {
 +      MLXSW_SP_SPAN_EGRESS,
 +      MLXSW_SP_SPAN_INGRESS
 +};
 +
 +struct mlxsw_sp_span_inspected_port {
 +      struct list_head list;
 +      enum mlxsw_sp_span_type type;
 +      u8 local_port;
++
++      /* Whether this is a directly bound mirror (port-to-port) or an ACL. */
++      bool bound;
 +};
 +
 +struct mlxsw_sp_span_parms {
 +      struct mlxsw_sp_port *dest_port; /* NULL for unoffloaded SPAN. */
 +      unsigned int ttl;
 +      unsigned char dmac[ETH_ALEN];
 +      unsigned char smac[ETH_ALEN];
 +      union mlxsw_sp_l3addr daddr;
 +      union mlxsw_sp_l3addr saddr;
 +};
 +
 +struct mlxsw_sp_span_entry_ops;
 +
 +struct mlxsw_sp_span_entry {
 +      const struct net_device *to_dev;
 +      const struct mlxsw_sp_span_entry_ops *ops;
 +      struct mlxsw_sp_span_parms parms;
 +      struct list_head bound_ports_list;
 +      int ref_count;
 +      int id;
 +};
 +
 +struct mlxsw_sp_span_entry_ops {
 +      bool (*can_handle)(const struct net_device *to_dev);
 +      int (*parms)(const struct net_device *to_dev,
 +                   struct mlxsw_sp_span_parms *sparmsp);
 +      int (*configure)(struct mlxsw_sp_span_entry *span_entry,
 +                       struct mlxsw_sp_span_parms sparms);
 +      void (*deconfigure)(struct mlxsw_sp_span_entry *span_entry);
 +};
 +
 +int mlxsw_sp_span_init(struct mlxsw_sp *mlxsw_sp);
 +void mlxsw_sp_span_fini(struct mlxsw_sp *mlxsw_sp);
 +void mlxsw_sp_span_respin(struct mlxsw_sp *mlxsw_sp);
 +
 +int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from,
 +                           const struct net_device *to_dev,
 +                           enum mlxsw_sp_span_type type,
 +                           bool bind, int *p_span_id);
 +void mlxsw_sp_span_mirror_del(struct mlxsw_sp_port *from, int span_id,
 +                            enum mlxsw_sp_span_type type, bool bind);
 +struct mlxsw_sp_span_entry *
 +mlxsw_sp_span_entry_find_by_port(struct mlxsw_sp *mlxsw_sp,
 +                               const struct net_device *to_dev);
 +
 +void mlxsw_sp_span_entry_invalidate(struct mlxsw_sp *mlxsw_sp,
 +                                  struct mlxsw_sp_span_entry *span_entry);
 +
 +int mlxsw_sp_span_port_mtu_update(struct mlxsw_sp_port *port, u16 mtu);
 +
 +#endif
Simple merge
Simple merge
index 2dc00f714482a70afb1a1d7aaa8a490614fe6b26,a6ec41c399d6c980b86ac1242179e99de542e5ea..020f8bc5438606373442a60a838710cc6f1af0f6
@@@ -1348,11 -1349,8 +1353,8 @@@ void rndis_filter_device_remove(struct 
  {
        struct rndis_device *rndis_dev = net_dev->extension;
  
-       /* Don't try and setup sub channels if about to halt */
-       cancel_work_sync(&net_dev->subchan_work);
        /* Halt and release the rndis device */
 -      rndis_filter_halt_device(rndis_dev);
 +      rndis_filter_halt_device(net_dev, rndis_dev);
  
        net_dev->extension = NULL;
  
Simple merge
index c2d9027be863beff305b34c3ef149c9c667d08e4,9aabfa1a455a89e364fe38e8d99b0d1a5d3e9944..05c1e8ef15e61d26beac3542a0ab2836cab6c3a6
@@@ -617,6 -617,77 +617,68 @@@ static void phy_error(struct phy_devic
        phy_trigger_machine(phydev, false);
  }
  
 -              goto phy_err;
+ /**
+  * phy_disable_interrupts - Disable the PHY interrupts from the PHY side
+  * @phydev: target phy_device struct
+  */
+ static int phy_disable_interrupts(struct phy_device *phydev)
+ {
+       int err;
+       /* Disable PHY interrupts */
+       err = phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED);
+       if (err)
 -      err = phy_clear_interrupt(phydev);
 -      if (err)
 -              goto phy_err;
 -
 -      return 0;
 -
 -phy_err:
 -      phy_error(phydev);
 -
 -      return err;
++              return err;
+       /* Clear the interrupt */
++      return phy_clear_interrupt(phydev);
+ }
+ /**
+  * phy_change - Called by the phy_interrupt to handle PHY changes
+  * @phydev: phy_device struct that interrupted
+  */
+ static irqreturn_t phy_change(struct phy_device *phydev)
+ {
+       if (phy_interrupt_is_valid(phydev)) {
+               if (phydev->drv->did_interrupt &&
+                   !phydev->drv->did_interrupt(phydev))
+                       return IRQ_NONE;
+               if (phydev->state == PHY_HALTED)
+                       if (phy_disable_interrupts(phydev))
+                               goto phy_err;
+       }
+       mutex_lock(&phydev->lock);
+       if ((PHY_RUNNING == phydev->state) || (PHY_NOLINK == phydev->state))
+               phydev->state = PHY_CHANGELINK;
+       mutex_unlock(&phydev->lock);
+       /* reschedule state queue work to run as soon as possible */
+       phy_trigger_machine(phydev, true);
+       if (phy_interrupt_is_valid(phydev) && phy_clear_interrupt(phydev))
+               goto phy_err;
+       return IRQ_HANDLED;
+ phy_err:
+       phy_error(phydev);
+       return IRQ_NONE;
+ }
+ /**
+  * phy_change_work - Scheduled by the phy_mac_interrupt to handle PHY changes
+  * @work: work_struct that describes the work to be done
+  */
+ void phy_change_work(struct work_struct *work)
+ {
+       struct phy_device *phydev =
+               container_of(work, struct phy_device, phy_queue);
+       phy_change(phydev);
+ }
  /**
   * phy_interrupt - PHY interrupt handler
   * @irq: interrupt line
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2fd59ed3be00b5b1e9d6749494819c88be242130,2b581bd938120a1e9004215296d647b699da95ea..2449982daf753033d7d041b4fa75825f8f65ea7c
@@@ -2070,13 -2063,8 +2070,16 @@@ struct ieee80211_txq 
   * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
   *    TDLS links.
   *
 + * @IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP: The driver requires the
 + *    mgd_prepare_tx() callback to be called before transmission of a
 + *    deauthentication frame in case the association was completed but no
 + *    beacon was heard. This is required in multi-channel scenarios, where the
 + *    virtual interface might not be given air time for the transmission of
 + *    the frame, as it is not synced with the AP/P2P GO yet, and thus the
 + *    deauthentication frame might not be transmitted.
++ >
+  * @IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP: The driver (or firmware) doesn't
+  *    support QoS NDP for AP probing - that's most likely a driver bug.
   *
   * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
   */
@@@ -2121,7 -2109,7 +2124,8 @@@ enum ieee80211_hw_flags 
        IEEE80211_HW_REPORTS_LOW_ACK,
        IEEE80211_HW_SUPPORTS_TX_FRAG,
        IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
 +      IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP,
+       IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
  
        /* keep last, obviously */
        NUM_IEEE80211_HW_FLAGS
index 158833ea7988b82f5eabc8a7eb907ef2ca1cecef,20a92ca9e11582c13f4063b2f09c2d1787e4ccb2..dbb032d5921b4b4816ac8a469107e52c857f172c
@@@ -63,8 -63,11 +63,9 @@@ struct rtable 
        __be32                  rt_gateway;
  
        /* Miscellaneous cached information */
-       u32                     rt_pmtu;
+       u32                     rt_mtu_locked:1,
+                               rt_pmtu:31;
  
 -      u32                     rt_table_id;
 -
        struct list_head        rt_uncached;
        struct uncached_list    *rt_uncached_list;
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/sock.c
Simple merge
Simple merge
Simple merge
index e74ee837b300a9bfe1034017e00ff29ed898e1ad,299e247b20326df8426ebf2bb3b6d91f1176527b..4ac5728689f57245f5f74a838be303cf2177ae00
@@@ -1517,8 -1529,10 +1530,9 @@@ struct rtable *rt_dst_alloc(struct net_
                rt->rt_is_input = 0;
                rt->rt_iif = 0;
                rt->rt_pmtu = 0;
+               rt->rt_mtu_locked = 0;
                rt->rt_gateway = 0;
                rt->rt_uses_gateway = 0;
 -              rt->rt_table_id = 0;
                INIT_LIST_HEAD(&rt->rt_uncached);
  
                rt->dst.output = ip_output;
diff --cc net/ipv4/tcp.c
Simple merge
index 0c752dc3f93bc1fde92c10d93b16128ba640bcba,fbebda67ac1bddf148f10a811a0646b5fdeca892..6c76a757fa4a71c2ffa8b4fc63a10c9bde3b2319
@@@ -100,7 -100,10 +100,9 @@@ static int xfrm4_fill_dst(struct xfrm_d
        xdst->u.rt.rt_gateway = rt->rt_gateway;
        xdst->u.rt.rt_uses_gateway = rt->rt_uses_gateway;
        xdst->u.rt.rt_pmtu = rt->rt_pmtu;
 -      xdst->u.rt.rt_table_id = rt->rt_table_id;
+       xdst->u.rt.rt_mtu_locked = rt->rt_mtu_locked;
        INIT_LIST_HEAD(&xdst->u.rt.rt_uncached);
+       rt_add_uncached_list(&xdst->u.rt);
  
        return 0;
  }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index a6cd0712e06352609e29529852e7175ffef1b3b8,34355fd19f27dc2a0703cc92d84e7ba091568917..516cfad71b85858aeaa395a5e04c579d0bd4f856
@@@ -1417,10 -1425,10 +1425,11 @@@ static int kcm_attach(struct socket *so
         */
        if (csk->sk_user_data) {
                write_unlock_bh(&csk->sk_callback_lock);
 +              strp_stop(&psock->strp);
                strp_done(&psock->strp);
                kmem_cache_free(kcm_psockp, psock);
-               return -EALREADY;
+               err = -EALREADY;
+               goto out;
        }
  
        psock->save_data_ready = csk->sk_data_ready;
Simple merge
index a75653affbf71894e956b0211b312e61e1182ed2,94c7ee9df33b639bce674d67cb0f244e975c7dbb..b5adf3625d161bb7537ec5d5cad320ef4335f4e8
@@@ -212,7 -212,7 +212,8 @@@ static const char *hw_flag_names[] = 
        FLAG(REPORTS_LOW_ACK),
        FLAG(SUPPORTS_TX_FRAG),
        FLAG(SUPPORTS_TDLS_BUFFER_STA),
 +      FLAG(DEAUTH_NEED_MGD_TX_PREP),
+       FLAG(DOESNT_SUPPORT_QOS_NDP),
  #undef FLAG
  };
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/socket.c
Simple merge
Simple merge
Simple merge