[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5210a664d5e94ea9968fc9b207a53d45@intel.com>
Date: Sat, 30 Jan 2021 01:19:28 +0000
From: "Saleem, Shiraz" <shiraz.saleem@...el.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: "dledford@...hat.com" <dledford@...hat.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Ertman, David M" <david.m.ertman@...el.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"Ismail, Mustafa" <mustafa.ismail@...el.com>
Subject: RE: [PATCH 07/22] RDMA/irdma: Register an auxiliary driver and
implement private channel OPs
> 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 we could have a gen1 aux driver and one for gen2 with the flows being a little orthogonal from each other.
The gen2 aux driver auxiliary_device_id table would have entries for iWARP and RoCE
aux dev's.
>
> 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