Commit b36c2024 authored by David S. Miller's avatar David S. Miller

Merge tag 'mlx5-fixes-2017-07-09' of https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-fixes-2017-07-09

This series includes fixes to mlx5 driver:
 - Compilation warnings and issues introduced on v4.12
 - Initialize CEE's getpermhwaddr address buffer to 0xff
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f263fbb8 d968f0f2
...@@ -4,14 +4,14 @@ subdir-ccflags-y += -I$(src) ...@@ -4,14 +4,14 @@ subdir-ccflags-y += -I$(src)
mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \ mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \
health.o mcg.o cq.o srq.o alloc.o qp.o port.o mr.o pd.o \ health.o mcg.o cq.o srq.o alloc.o qp.o port.o mr.o pd.o \
mad.o transobj.o vport.o sriov.o fs_cmd.o fs_core.o \ mad.o transobj.o vport.o sriov.o fs_cmd.o fs_core.o \
fs_counters.o rl.o lag.o dev.o lib/gid.o fs_counters.o rl.o lag.o dev.o wq.o lib/gid.o
mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o mlx5_core-$(CONFIG_MLX5_ACCEL) += accel/ipsec.o
mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o \ mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o \
fpga/ipsec.o fpga/ipsec.o
mlx5_core-$(CONFIG_MLX5_CORE_EN) += wq.o eswitch.o eswitch_offloads.o \ mlx5_core-$(CONFIG_MLX5_CORE_EN) += eswitch.o eswitch_offloads.o \
en_main.o en_common.o en_fs.o en_ethtool.o en_tx.o \ en_main.o en_common.o en_fs.o en_ethtool.o en_tx.o \
en_rx.o en_rx_am.o en_txrx.o en_clock.o vxlan.o \ en_rx.o en_rx_am.o en_txrx.o en_clock.o vxlan.o \
en_tc.o en_arfs.o en_rep.o en_fs_ethtool.o en_selftest.o en_tc.o en_arfs.o en_rep.o en_fs_ethtool.o en_selftest.o
......
...@@ -363,6 +363,7 @@ void mlx5e_ipsec_build_inverse_table(void) ...@@ -363,6 +363,7 @@ void mlx5e_ipsec_build_inverse_table(void)
{ {
u16 mss_inv; u16 mss_inv;
u32 mss; u32 mss;
u64 n;
/* Calculate 1/x inverse table for use in GSO data path. /* Calculate 1/x inverse table for use in GSO data path.
* Using this table, we provide the IPSec accelerator with the value of * Using this table, we provide the IPSec accelerator with the value of
...@@ -372,7 +373,8 @@ void mlx5e_ipsec_build_inverse_table(void) ...@@ -372,7 +373,8 @@ void mlx5e_ipsec_build_inverse_table(void)
*/ */
mlx5e_ipsec_inverse_table[1] = htons(0xFFFF); mlx5e_ipsec_inverse_table[1] = htons(0xFFFF);
for (mss = 2; mss < MAX_LSO_MSS; mss++) { for (mss = 2; mss < MAX_LSO_MSS; mss++) {
mss_inv = ((1ULL << 32) / mss) >> 16; n = 1ULL << 32;
mss_inv = do_div(n, mss) >> 16;
mlx5e_ipsec_inverse_table[mss] = htons(mss_inv); mlx5e_ipsec_inverse_table[mss] = htons(mss_inv);
} }
} }
...@@ -464,6 +464,8 @@ static void mlx5e_dcbnl_getpermhwaddr(struct net_device *netdev, ...@@ -464,6 +464,8 @@ static void mlx5e_dcbnl_getpermhwaddr(struct net_device *netdev,
if (!perm_addr) if (!perm_addr)
return; return;
memset(perm_addr, 0xff, MAX_ADDR_LEN);
mlx5_query_nic_vport_mac_address(priv->mdev, 0, perm_addr); mlx5_query_nic_vport_mac_address(priv->mdev, 0, perm_addr);
} }
......
...@@ -102,7 +102,7 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpga_device *fdev) ...@@ -102,7 +102,7 @@ static int mlx5_fpga_device_load_check(struct mlx5_fpga_device *fdev)
return 0; return 0;
} }
int mlx5_fpga_device_brb(struct mlx5_fpga_device *fdev) static int mlx5_fpga_device_brb(struct mlx5_fpga_device *fdev)
{ {
int err; int err;
struct mlx5_core_dev *mdev = fdev->mdev; struct mlx5_core_dev *mdev = fdev->mdev;
......
...@@ -275,7 +275,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, ...@@ -275,7 +275,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters,
{ {
struct mlx5_fpga_device *fdev = mdev->fpga; struct mlx5_fpga_device *fdev = mdev->fpga;
unsigned int i; unsigned int i;
u32 *data; __be32 *data;
u32 count; u32 count;
u64 addr; u64 addr;
int ret; int ret;
...@@ -290,7 +290,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, ...@@ -290,7 +290,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters,
count = mlx5_fpga_ipsec_counters_count(mdev); count = mlx5_fpga_ipsec_counters_count(mdev);
data = kzalloc(sizeof(u32) * count * 2, GFP_KERNEL); data = kzalloc(sizeof(*data) * count * 2, GFP_KERNEL);
if (!data) { if (!data) {
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/idr.h> #include <linux/idr.h>
#include "mlx5_core.h" #include "mlx5_core.h"
#include "lib/mlx5.h"
void mlx5_init_reserved_gids(struct mlx5_core_dev *dev) void mlx5_init_reserved_gids(struct mlx5_core_dev *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment