Skip to content

Commit

Permalink
net/mlx5_core: Request the mlx5 IB module on driver load
Browse files Browse the repository at this point in the history
Call request module on mlx5_ib so it will be available for applications
requiring it, such as installers that require boot over IB.

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 4945c1d commit f66f049
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <linux/mlx5/qp.h>
#include <linux/mlx5/srq.h>
#include <linux/debugfs.h>
#include <linux/kmod.h>
#include <linux/mlx5/mlx5_ifc.h>
#include "mlx5_core.h"

Expand Down Expand Up @@ -840,6 +841,8 @@ struct mlx5_core_event_handler {
void *data);
};

#define MLX5_IB_MOD "mlx5_ib"

static int init_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
Expand Down Expand Up @@ -878,6 +881,10 @@ static int init_one(struct pci_dev *pdev,
goto out_init;
}

err = request_module_nowait(MLX5_IB_MOD);
if (err)
pr_info("failed request module on %s\n", MLX5_IB_MOD);

return 0;

out_init:
Expand Down

0 comments on commit f66f049

Please sign in to comment.