diff options
Diffstat (limited to 'drivers/net')
6 files changed, 20 insertions, 30 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c index 956860a69797..3bdab972420b 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c @@ -762,7 +762,7 @@ static int hw_atl_b0_hw_packet_filter_set(struct aq_hw_s *self,  	hw_atl_rpfl2promiscuous_mode_en_set(self, IS_FILTER_ENABLED(IFF_PROMISC));  	hw_atl_rpfl2multicast_flr_en_set(self, -					 IS_FILTER_ENABLED(IFF_MULTICAST), 0); +					 IS_FILTER_ENABLED(IFF_ALLMULTI), 0);  	hw_atl_rpfl2_accept_all_mc_packets_set(self,  					       IS_FILTER_ENABLED(IFF_ALLMULTI)); diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 5d08d2aeb172..e337da6ba2a4 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -1083,6 +1083,8 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)  	lmac->dmacs_count = (RX_DMAC_COUNT / bgx->lmac_count);  	lmac->dmacs = kcalloc(lmac->dmacs_count, sizeof(*lmac->dmacs),  			      GFP_KERNEL); +	if (!lmac->dmacs) +		return -ENOMEM;  	/* Enable lmac */  	bgx_reg_modify(bgx, lmacid, BGX_CMRX_CFG, CMR_EN); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c index 00fc5f1afb1d..7dddb9e748b8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c @@ -1038,10 +1038,8 @@ static void mk_act_open_req(struct filter_entry *f, struct sk_buff *skb,  	OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, qid_filterid));  	req->local_port = cpu_to_be16(f->fs.val.lport);  	req->peer_port = cpu_to_be16(f->fs.val.fport); -	req->local_ip = f->fs.val.lip[0] | f->fs.val.lip[1] << 8 | -		f->fs.val.lip[2] << 16 | f->fs.val.lip[3] << 24; -	req->peer_ip = f->fs.val.fip[0] | f->fs.val.fip[1] << 8 | -		f->fs.val.fip[2] << 16 | f->fs.val.fip[3] << 24; +	memcpy(&req->local_ip, f->fs.val.lip, 4); +	memcpy(&req->peer_ip, f->fs.val.fip, 4);  	req->opt0 = cpu_to_be64(NAGLE_V(f->fs.newvlan == VLAN_REMOVE ||  					f->fs.newvlan == VLAN_REWRITE) |  				DELACK_V(f->fs.hitcnts) | diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index eb9eb7aa953a..405236cf0b04 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -858,8 +858,6 @@ struct mlx5e_profile {  		mlx5e_fp_handle_rx_cqe handle_rx_cqe;  		mlx5e_fp_handle_rx_cqe handle_rx_cqe_mpwqe;  	} rx_handlers; -	void	(*netdev_registered_init)(struct mlx5e_priv *priv); -	void    (*netdev_registered_remove)(struct mlx5e_priv *priv);  	int	max_tc;  }; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c index e33afa8d2417..722998d68564 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c @@ -443,16 +443,12 @@ static int mlx5e_dcbnl_ieee_setapp(struct net_device *dev, struct dcb_app *app)  	bool is_new;  	int err; -	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP) -		return -EINVAL; - -	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager)) -		return -EINVAL; - -	if (!MLX5_DSCP_SUPPORTED(priv->mdev)) -		return -EINVAL; +	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager) || +	    !MLX5_DSCP_SUPPORTED(priv->mdev)) +		return -EOPNOTSUPP; -	if (app->protocol >= MLX5E_MAX_DSCP) +	if ((app->selector != IEEE_8021QAZ_APP_SEL_DSCP) || +	    (app->protocol >= MLX5E_MAX_DSCP))  		return -EINVAL;  	/* Save the old entry info */ @@ -500,16 +496,12 @@ static int mlx5e_dcbnl_ieee_delapp(struct net_device *dev, struct dcb_app *app)  	struct mlx5e_priv *priv = netdev_priv(dev);  	int err; -	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP) -		return -EINVAL; - -	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager)) -		return -EINVAL; - -	if (!MLX5_DSCP_SUPPORTED(priv->mdev)) -		return -EINVAL; +	if  (!MLX5_CAP_GEN(priv->mdev, vport_group_manager) || +	     !MLX5_DSCP_SUPPORTED(priv->mdev)) +		return -EOPNOTSUPP; -	if (app->protocol >= MLX5E_MAX_DSCP) +	if ((app->selector != IEEE_8021QAZ_APP_SEL_DSCP) || +	    (app->protocol >= MLX5E_MAX_DSCP))  		return -EINVAL;  	/* Skip if no dscp app entry */ @@ -1146,7 +1138,7 @@ static int mlx5e_set_trust_state(struct mlx5e_priv *priv, u8 trust_state)  {  	int err; -	err =  mlx5_set_trust_state(priv->mdev, trust_state); +	err = mlx5_set_trust_state(priv->mdev, trust_state);  	if (err)  		return err;  	priv->dcbx_dp.trust_state = trust_state; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 3a2c4e548226..dfbcda0d0e08 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -1970,15 +1970,15 @@ static bool actions_match_supported(struct mlx5e_priv *priv,  static bool same_hw_devs(struct mlx5e_priv *priv, struct mlx5e_priv *peer_priv)  {  	struct mlx5_core_dev *fmdev, *pmdev; -	u16 func_id, peer_id; +	u64 fsystem_guid, psystem_guid;  	fmdev = priv->mdev;  	pmdev = peer_priv->mdev; -	func_id = (u16)((fmdev->pdev->bus->number << 8) | PCI_SLOT(fmdev->pdev->devfn)); -	peer_id = (u16)((pmdev->pdev->bus->number << 8) | PCI_SLOT(pmdev->pdev->devfn)); +	mlx5_query_nic_vport_system_image_guid(fmdev, &fsystem_guid); +	mlx5_query_nic_vport_system_image_guid(pmdev, &psystem_guid); -	return (func_id == peer_id); +	return (fsystem_guid == psystem_guid);  }  static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,  | 
