diff options
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mr.c | 13 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/main.c | 12 |
7 files changed, 26 insertions, 19 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 028937b2a199..2a210c4efb89 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
| @@ -2202,6 +2202,10 @@ static int mlx4_en_set_features(struct net_device *netdev, | |||
| 2202 | return ret; | 2202 | return ret; |
| 2203 | } | 2203 | } |
| 2204 | 2204 | ||
| 2205 | if (DEV_FEATURE_CHANGED(netdev, features, NETIF_F_HW_VLAN_CTAG_TX)) | ||
| 2206 | en_info(priv, "Turn %s TX vlan strip offload\n", | ||
| 2207 | (features & NETIF_F_HW_VLAN_CTAG_TX) ? "ON" : "OFF"); | ||
| 2208 | |||
| 2205 | if (features & NETIF_F_LOOPBACK) | 2209 | if (features & NETIF_F_LOOPBACK) |
| 2206 | priv->ctrl_flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); | 2210 | priv->ctrl_flags |= cpu_to_be32(MLX4_WQE_CTRL_FORCE_LOOPBACK); |
| 2207 | else | 2211 | else |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index 2ba5d368edce..698d60de1255 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c | |||
| @@ -162,6 +162,10 @@ static int mlx4_en_init_allocator(struct mlx4_en_priv *priv, | |||
| 162 | if (mlx4_alloc_pages(priv, &ring->page_alloc[i], | 162 | if (mlx4_alloc_pages(priv, &ring->page_alloc[i], |
| 163 | frag_info, GFP_KERNEL | __GFP_COLD)) | 163 | frag_info, GFP_KERNEL | __GFP_COLD)) |
| 164 | goto out; | 164 | goto out; |
| 165 | |||
| 166 | en_dbg(DRV, priv, " frag %d allocator: - size:%d frags:%d\n", | ||
| 167 | i, ring->page_alloc[i].page_size, | ||
| 168 | atomic_read(&ring->page_alloc[i].page->_count)); | ||
| 165 | } | 169 | } |
| 166 | return 0; | 170 | return 0; |
| 167 | 171 | ||
| @@ -1059,8 +1063,9 @@ void mlx4_en_calc_rx_buf(struct net_device *dev) | |||
| 1059 | (eff_mtu > buf_size + frag_sizes[i]) ? | 1063 | (eff_mtu > buf_size + frag_sizes[i]) ? |
| 1060 | frag_sizes[i] : eff_mtu - buf_size; | 1064 | frag_sizes[i] : eff_mtu - buf_size; |
| 1061 | priv->frag_info[i].frag_prefix_size = buf_size; | 1065 | priv->frag_info[i].frag_prefix_size = buf_size; |
| 1062 | priv->frag_info[i].frag_stride = ALIGN(frag_sizes[i], | 1066 | priv->frag_info[i].frag_stride = |
| 1063 | SMP_CACHE_BYTES); | 1067 | ALIGN(priv->frag_info[i].frag_size, |
| 1068 | SMP_CACHE_BYTES); | ||
| 1064 | buf_size += priv->frag_info[i].frag_size; | 1069 | buf_size += priv->frag_info[i].frag_size; |
| 1065 | i++; | 1070 | i++; |
| 1066 | } | 1071 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 4b08a393ebcb..5a21e5dc94cb 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
| @@ -2169,7 +2169,7 @@ static const u8 config_dev_csum_flags[] = { | |||
| 2169 | int mlx4_config_dev_retrieval(struct mlx4_dev *dev, | 2169 | int mlx4_config_dev_retrieval(struct mlx4_dev *dev, |
| 2170 | struct mlx4_config_dev_params *params) | 2170 | struct mlx4_config_dev_params *params) |
| 2171 | { | 2171 | { |
| 2172 | struct mlx4_config_dev config_dev; | 2172 | struct mlx4_config_dev config_dev = {0}; |
| 2173 | int err; | 2173 | int err; |
| 2174 | u8 csum_mask; | 2174 | u8 csum_mask; |
| 2175 | 2175 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index f3245fe0f442..7e487223489a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
| @@ -251,7 +251,8 @@ static void mlx4_enable_cqe_eqe_stride(struct mlx4_dev *dev) | |||
| 251 | if (mlx4_is_master(dev)) | 251 | if (mlx4_is_master(dev)) |
| 252 | dev_cap->function_caps |= MLX4_FUNC_CAP_EQE_CQE_STRIDE; | 252 | dev_cap->function_caps |= MLX4_FUNC_CAP_EQE_CQE_STRIDE; |
| 253 | } else { | 253 | } else { |
| 254 | mlx4_dbg(dev, "Disabling CQE stride cacheLine unsupported\n"); | 254 | if (cache_line_size() != 32 && cache_line_size() != 64) |
| 255 | mlx4_dbg(dev, "Disabling CQE stride, cacheLine size unsupported\n"); | ||
| 255 | dev_cap->flags2 &= ~MLX4_DEV_CAP_FLAG2_CQE_STRIDE; | 256 | dev_cap->flags2 &= ~MLX4_DEV_CAP_FLAG2_CQE_STRIDE; |
| 256 | dev_cap->flags2 &= ~MLX4_DEV_CAP_FLAG2_EQE_STRIDE; | 257 | dev_cap->flags2 &= ~MLX4_DEV_CAP_FLAG2_EQE_STRIDE; |
| 257 | } | 258 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mr.c b/drivers/net/ethernet/mellanox/mlx4/mr.c index d21e884a0838..78f51e103880 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mr.c +++ b/drivers/net/ethernet/mellanox/mlx4/mr.c | |||
| @@ -598,14 +598,11 @@ int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, | |||
| 598 | if (err) | 598 | if (err) |
| 599 | return err; | 599 | return err; |
| 600 | 600 | ||
| 601 | mpt_entry->start = cpu_to_be64(mr->iova); | 601 | mpt_entry->start = cpu_to_be64(iova); |
| 602 | mpt_entry->length = cpu_to_be64(mr->size); | 602 | mpt_entry->length = cpu_to_be64(size); |
| 603 | mpt_entry->entity_size = cpu_to_be32(mr->mtt.page_shift); | 603 | mpt_entry->entity_size = cpu_to_be32(page_shift); |
| 604 | 604 | mpt_entry->flags &= ~(cpu_to_be32(MLX4_MPT_FLAG_FREE | | |
| 605 | mpt_entry->pd_flags &= cpu_to_be32(MLX4_MPT_PD_MASK | | 605 | MLX4_MPT_FLAG_SW_OWNS)); |
| 606 | MLX4_MPT_PD_FLAG_EN_INV); | ||
| 607 | mpt_entry->flags &= cpu_to_be32(MLX4_MPT_FLAG_FREE | | ||
| 608 | MLX4_MPT_FLAG_SW_OWNS); | ||
| 609 | if (mr->mtt.order < 0) { | 606 | if (mr->mtt.order < 0) { |
| 610 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_PHYSICAL); | 607 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_PHYSICAL); |
| 611 | mpt_entry->mtt_addr = 0; | 608 | mpt_entry->mtt_addr = 0; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index c5f3dfca226b..486e3d26cd4a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | |||
| @@ -2541,7 +2541,7 @@ int mlx4_SW2HW_MPT_wrapper(struct mlx4_dev *dev, int slave, | |||
| 2541 | /* Make sure that the PD bits related to the slave id are zeros. */ | 2541 | /* Make sure that the PD bits related to the slave id are zeros. */ |
| 2542 | pd = mr_get_pd(inbox->buf); | 2542 | pd = mr_get_pd(inbox->buf); |
| 2543 | pd_slave = (pd >> 17) & 0x7f; | 2543 | pd_slave = (pd >> 17) & 0x7f; |
| 2544 | if (pd_slave != 0 && pd_slave != slave) { | 2544 | if (pd_slave != 0 && --pd_slave != slave) { |
| 2545 | err = -EPERM; | 2545 | err = -EPERM; |
| 2546 | goto ex_abort; | 2546 | goto ex_abort; |
| 2547 | } | 2547 | } |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 3f4525619a07..d6651937d899 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c | |||
| @@ -903,12 +903,12 @@ static void remove_one(struct pci_dev *pdev) | |||
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | static const struct pci_device_id mlx5_core_pci_table[] = { | 905 | static const struct pci_device_id mlx5_core_pci_table[] = { |
| 906 | { PCI_VDEVICE(MELLANOX, 4113) }, /* Connect-IB */ | 906 | { PCI_VDEVICE(MELLANOX, 0x1011) }, /* Connect-IB */ |
| 907 | { PCI_VDEVICE(MELLANOX, 4114) }, /* Connect-IB VF */ | 907 | { PCI_VDEVICE(MELLANOX, 0x1012) }, /* Connect-IB VF */ |
| 908 | { PCI_VDEVICE(MELLANOX, 4115) }, /* ConnectX-4 */ | 908 | { PCI_VDEVICE(MELLANOX, 0x1013) }, /* ConnectX-4 */ |
| 909 | { PCI_VDEVICE(MELLANOX, 4116) }, /* ConnectX-4 VF */ | 909 | { PCI_VDEVICE(MELLANOX, 0x1014) }, /* ConnectX-4 VF */ |
| 910 | { PCI_VDEVICE(MELLANOX, 4117) }, /* ConnectX-4LX */ | 910 | { PCI_VDEVICE(MELLANOX, 0x1015) }, /* ConnectX-4LX */ |
| 911 | { PCI_VDEVICE(MELLANOX, 4118) }, /* ConnectX-4LX VF */ | 911 | { PCI_VDEVICE(MELLANOX, 0x1016) }, /* ConnectX-4LX VF */ |
| 912 | { 0, } | 912 | { 0, } |
| 913 | }; | 913 | }; |
| 914 | 914 | ||
