[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2B0E3F215D1AB84DA946C8BEE234CCC97B301688@ORSMSX101.amr.corp.intel.com>
Date: Tue, 19 Nov 2019 17:50:15 +0000
From: "Ertman, David M" <david.m.ertman@...el.com>
To: Jason Wang <jasowang@...hat.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: Greg KH <gregkh@...uxfoundation.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"jgg@...pe.ca" <jgg@...pe.ca>,
"parav@...lanox.com" <parav@...lanox.com>,
"Patil, Kiran" <kiran.patil@...el.com>
Subject: RE: [net-next v2 1/1] virtual-bus: Implementation of Virtual Bus
> -----Original Message-----
> From: Jason Wang <jasowang@...hat.com>
> Sent: Tuesday, November 19, 2019 12:05 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>; Ertman, David M
> <david.m.ertman@...el.com>
> Cc: Greg KH <gregkh@...uxfoundation.org>; davem@...emloft.net;
> netdev@...r.kernel.org; linux-rdma@...r.kernel.org;
> nhorman@...hat.com; sassmann@...hat.com; jgg@...pe.ca;
> parav@...lanox.com; Patil, Kiran <kiran.patil@...el.com>
> Subject: Re: [net-next v2 1/1] virtual-bus: Implementation of Virtual Bus
>
>
> On 2019/11/18 下午3:48, Greg KH wrote:
> > +Virtbus drivers
> > +~~~~~~~~~~~~~~~
> > +Virtbus drivers register with the virtual bus to be matched with
> > +virtbus devices. They expect to be registered with a probe and
> > +remove callback, and also support shutdown, suspend, and resume
> > +callbacks. They otherwise follow the standard driver behavior of
> > +having discovery and enumeration handled in the bus infrastructure.
> > +
> > +Virtbus drivers register themselves with the API entry point
> > +virtbus_drv_reg and unregister with virtbus_drv_unreg.
> > +
> > +Device Enumeration
> > +~~~~~~~~~~~~~~~~~~
> > +Enumeration is handled automatically by the bus infrastructure via
> > +the ida_simple methods.
> > +
> > +Device naming and driver binding
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +The virtbus_device.dev.name is the canonical name for the device. It
> > +is built from two other parts:
> > +
> > + - virtbus_device.name (also used for matching).
> > + - virtbus_device.id (generated automatically from ida_simple
> > + calls)
> > +
> > +This allows for multiple virtbus_devices with the same name, which
> > +will all be matched to the same virtbus_driver. Driver binding is
> > +performed by the driver core, invoking driver probe() after finding a
> match between device and driver.
> > +
> > +Virtual Bus API entry points
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +struct virtbus_device *virtbus_dev_alloc(const char *name, void
> > +*data)
>
>
> Hi:
>
> Several questions about the name parameter here:
>
> - If we want to have multiple types of device to be attached, some
> convention is needed to avoid confusion during the match. But if we had
> such one (e.g prefix or suffix), it basically another bus?
> - Who decides the name of this virtbus dev, is it under the control of
> userspace? If yes, a management interface is required.
>
> Thanks
>
This function has been removed from the API. New patch set inbound
implementing changes that Parav suggested.
>
> > +int virtbus_dev_register(struct virtbus_device *vdev) void
> > +virtbus_dev_unregister(struct virtbus_device *vdev) int
> > +virtbus_drv_register(struct virtbus_driver *vdrv, struct module
> > +*owner) void virtbus_drv_unregister(struct virtbus_driver *vdrv)
Powered by blists - more mailing lists