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: <20210125191622.GA1599720@nvidia.com>
Date:   Mon, 25 Jan 2021 15:16:22 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Shiraz Saleem <shiraz.saleem@...el.com>
CC:     <dledford@...hat.com>, <kuba@...nel.org>, <davem@...emloft.net>,
        <linux-rdma@...r.kernel.org>, <gregkh@...uxfoundation.org>,
        <netdev@...r.kernel.org>, <david.m.ertman@...el.com>,
        <anthony.l.nguyen@...el.com>,
        Mustafa Ismail <mustafa.ismail@...el.com>
Subject: Re: [PATCH 07/22] RDMA/irdma: Register an auxiliary driver and
 implement private channel OPs

On Fri, Jan 22, 2021 at 05:48:12PM -0600, Shiraz Saleem wrote:

> +static int irdma_probe(struct auxiliary_device *aux_dev,
> +		       const struct auxiliary_device_id *id)
> +{
> +	struct irdma_drvdata *drvdata;
> +	int ret;
> +
> +	drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
> +	if (!drvdata)
> +		return -ENOMEM;
> +
> +	switch (id->driver_data) {
> +	case IRDMA_GEN_2:
> +		drvdata->init_dev = irdma_init_dev;
> +		drvdata->deinit_dev = irdma_deinit_dev;
> +		break;
> +	case IRDMA_GEN_1:
> +		drvdata->init_dev = i40iw_init_dev;
> +		drvdata->deinit_dev = i40iw_deinit_dev;
> +		break;
> +	default:
> +		ret = -ENODEV;
> +		goto ver_err;

Also don't do this, if the drivers are so different then give them
different aux bus names and bind two drivers with the different
flow.

I suppose the old i40e can keep its weird registration thing, but ice
should not duplicate that, new code must use aux devices properly, as
in my other email.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ