lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZOPZLyhh6pGSwFHOe8oCc4a3xVTdCHric6sH78Kz5Dr7NvLw@mail.gmail.com>
Date:	Mon, 28 Jul 2014 23:57:37 +0300
From:	Or Gerlitz <or.gerlitz@...il.com>
To:	Eli Cohen <eli@....mellanox.co.il>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Roland Dreier <roland@...nel.org>,
	Jack Morgenstein <jackm@....mellanox.co.il>,
	Eli Cohen <eli@...lanox.com>,
	Yevgeny Petrilin <yevgenyp@...lanox.com>
Subject: Re: [PATCH net-next 1/3] mlx5: Move pci device handling from mlx5_ib
 to mlx5_core

On Mon, Jul 28, 2014 at 11:30 PM, Eli Cohen <eli@....mellanox.co.il> wrote:
[...]
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -54,96 +54,17 @@ MODULE_DESCRIPTION("Mellanox Connect-IB HCA >
[...]
-static int prof_sel = 2;
> -module_param_named(prof_sel, prof_sel, int, 0444);
> -MODULE_PARM_DESC(prof_sel, "profile selector. Valid range 0 - 2");
> +static int deprecated_prof_sel = 2;
> +module_param_named(prof_sel, deprecated_prof_sel, int, 0444);
> +MODULE_PARM_DESC(prof_sel, "profile selector. Deprecated here. Moved to module mlx5_core");

[...]

> @@ -1340,28 +1260,19 @@ static int init_one(struct pci_dev *pdev,
>
>         dev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*dev));
>         if (!dev)
> -               return -ENOMEM;
> +               return NULL;
>
> -       mdev = &dev->mdev;
> -       mdev->event = mlx5_ib_event;
> -       if (prof_sel >= ARRAY_SIZE(profile)) {
> -               pr_warn("selected pofile out of range, selceting default\n");
> -               prof_sel = 0;
> -       }

You need to issue a warning here if someone attempts to change the
previously default value of the now deprecated module param. E.g warn
this is deprecated and point them to mlx5_core


> -       mdev->profile = &profile[prof_sel];
> -       err = mlx5_dev_init(mdev, pdev);
> -       if (err)
> -               goto err_free;
> +       dev->mdev = mdev;
>
>         err = get_port_caps(dev);
>         if (err)
> -               goto err_cleanup;
> +               goto err_dealloc;
>
>         get_ext_port_caps(dev);
>
>         err = alloc_comp_eqs(dev);
>         if (err)
> -               goto err_cleanup;
> +               goto err_dealloc;
>
>         MLX5_INIT_DOORBELL_LOCK(&dev->uar_lock);
>
> @@ -1480,7 +1391,7 @@ static int init_one(struct pci_dev *pdev,
>
>         dev->ib_active = true;
>
> -       return 0;
> +       return dev;
>
>  err_umrc:
>         destroy_umrc_res(dev);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ