Skip to content

Commit

Permalink
net/mlx5_core: Fix command queue size enforcement
Browse files Browse the repository at this point in the history
Command queue descriptor page size is 4KB and not the page size used by the
kernel.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eli Cohen authored and David S. Miller committed Dec 9, 2014
1 parent 3a9e161 commit 2d446d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev)
goto err_map;
}

if (cmd->log_sz + cmd->log_stride > PAGE_SHIFT) {
if (cmd->log_sz + cmd->log_stride > MLX5_ADAPTER_PAGE_SHIFT) {
dev_err(&dev->pdev->dev, "command queue size overflow\n");
err = -EINVAL;
goto err_map;
Expand Down

0 comments on commit 2d446d1

Please sign in to comment.