search for: mdev_match

Displaying 20 results from an estimated 42 matches for "mdev_match".

2019 Oct 15
1
[PATCH V3 2/7] mdev: bus uevent support
...+++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index b7c40ce86ee3..319d886ffaf7 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -82,9 +82,17 @@ static int mdev_match(struct device *dev, struct device_driver *drv) > return 0; > } > > +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) > +{ > + struct mdev_device *mdev = to_mdev_device(dev); > + > + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev-...
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...3223aee20b..319d886ffaf7 100644 > >> --- a/drivers/vfio/mdev/mdev_driver.c > >> +++ b/drivers/vfio/mdev/mdev_driver.c > >> @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) > >> return 0; > >> } > >> > >> +static int mdev_match(struct device *dev, struct device_driver *drv) > >> +{ > >> + unsigned int i; > >> + struct mdev_device *mdev = to_mdev_device(dev); > >> + struct mdev_driver *mdrv = to_mdev_driver(drv); > >> + const struct mdev_class_id *ids = mdrv->id_table; > &...
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...3223aee20b..319d886ffaf7 100644 > >> --- a/drivers/vfio/mdev/mdev_driver.c > >> +++ b/drivers/vfio/mdev/mdev_driver.c > >> @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) > >> return 0; > >> } > >> > >> +static int mdev_match(struct device *dev, struct device_driver *drv) > >> +{ > >> + unsigned int i; > >> + struct mdev_device *mdev = to_mdev_device(dev); > >> + struct mdev_driver *mdrv = to_mdev_driver(drv); > >> + const struct mdev_class_id *ids = mdrv->id_table; > &...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...; > >> --- a/drivers/vfio/mdev/mdev_driver.c > > >> +++ b/drivers/vfio/mdev/mdev_driver.c > > >> @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) > > >> return 0; > > >> } > > >> > > >> +static int mdev_match(struct device *dev, struct device_driver *drv) > > >> +{ > > >> + unsigned int i; > > >> + struct mdev_device *mdev = to_mdev_device(dev); > > >> + struct mdev_driver *mdrv = to_mdev_driver(drv); > > >> + const struct mdev_class_id *ids =...
2019 Oct 11
0
[PATCH V3 2/7] mdev: bus uevent support
...ers/vfio/mdev/mdev_driver.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index b7c40ce86ee3..319d886ffaf7 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -82,9 +82,17 @@ static int mdev_match(struct device *dev, struct device_driver *drv) return 0; } +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct mdev_device *mdev = to_mdev_device(dev); + + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); +} + struct bus_type mde...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..319d886ffaf7 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) > return 0; > } > > +static int mdev_match(struct device *dev, struct device_driver *drv) > +{ > + unsigned int i; > + struct mdev_device *mdev = to_mdev_device(dev); > + struct mdev_driver *mdrv = to_mdev_driver(drv); > + const struct mdev_class_id *ids = mdrv->id_table; > + Nit, as we start to allow new mdev bus driv...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..319d886ffaf7 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) > return 0; > } > > +static int mdev_match(struct device *dev, struct device_driver *drv) > +{ > + unsigned int i; > + struct mdev_device *mdev = to_mdev_device(dev); > + struct mdev_driver *mdrv = to_mdev_driver(drv); > + const struct mdev_class_id *ids = mdrv->id_table; > + Nit, as we start to allow new mdev bus driv...
2019 Sep 17
1
[RFC PATCH 1/2] mdev: device id support
.../mdev_driver.c > b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..fd5e9541d18e 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) > return 0; > } > > +static int mdev_match(struct device *dev, struct device_driver *drv) > +{ > + unsigned int i; > + struct mdev_device *mdev = to_mdev_device(dev); > + struct mdev_driver *mdrv = to_mdev_driver(drv); > + const struct mdev_device_id *ids = mdrv->id_table; > + > + for (i = 0; ids[i].id; i++) > +...
2019 Sep 24
1
[PATCH V2 2/8] mdev: class id support
...mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..b7c40ce86ee3 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) > return 0; > } > > +static int mdev_match(struct device *dev, struct device_driver *drv) > +{ > + unsigned int i; > + struct mdev_device *mdev = to_mdev_device(dev); > + struct mdev_driver *mdrv = to_mdev_driver(drv); > + const struct mdev_class_id *ids = mdrv->id_table; > + > + for (i = 0; ids[i].id; i++) > + i...
2019 Sep 12
0
[RFC PATCH 1/2] mdev: device id support
...parent device diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..fd5e9541d18e 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_device_id *ids = mdrv->id_table; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->parent->dev...
2019 Sep 24
0
[PATCH V2 2/8] mdev: class id support
...otherwise 0. diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..b7c40ce86ee3 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->class_id) + r...
2019 Nov 05
0
[PATCH V8 1/6] mdev: class id support
...oto add_fail; diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..ed06433693e8 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,33 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + if (!ids) + return 0; + + for (i = 0; ids[i].id; i++) + if (ids[i].id...
2019 Nov 04
0
[PATCH V7 1/6] mdev: class id support
...oto add_fail; diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..ed06433693e8 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,33 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + if (!ids) + return 0; + + for (i = 0; ids[i].id; i++) + if (ids[i].id...
2019 Oct 11
0
[PATCH V3 1/7] mdev: class id support
..._create_fail: diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..b7c40ce86ee3 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->class_id) + r...
2019 Oct 23
0
[PATCH V5 1/6] mdev: class id support
...oto add_fail; diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..319d886ffaf7 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->class_id) + r...
2019 Sep 23
0
[PATCH 1/6] mdev: class id support
...parent device diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index 0d3223aee20b..b70bbebc9dd3 100644 --- a/drivers/vfio/mdev/mdev_driver.c +++ b/drivers/vfio/mdev/mdev_driver.c @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) return 0; } +static int mdev_match(struct device *dev, struct device_driver *drv) +{ + unsigned int i; + struct mdev_device *mdev = to_mdev_device(dev); + struct mdev_driver *mdrv = to_mdev_driver(drv); + const struct mdev_class_id *ids = mdrv->id_table; + + for (i = 0; ids[i].id; i++) + if (ids[i].id == mdev->parent->clas...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...dev/mdev_driver.c >> index 0d3223aee20b..319d886ffaf7 100644 >> --- a/drivers/vfio/mdev/mdev_driver.c >> +++ b/drivers/vfio/mdev/mdev_driver.c >> @@ -69,8 +69,30 @@ static int mdev_remove(struct device *dev) >> return 0; >> } >> >> +static int mdev_match(struct device *dev, struct device_driver *drv) >> +{ >> + unsigned int i; >> + struct mdev_device *mdev = to_mdev_device(dev); >> + struct mdev_driver *mdrv = to_mdev_driver(drv); >> + const struct mdev_class_id *ids = mdrv->id_table; >> + > Nit, as we star...
2019 Oct 16
0
[PATCH V3 1/7] mdev: class id support
...o/mdev/mdev_driver.c index 0d3223aee20b..b7c40ce86ee3 >> 100644 >> --- a/drivers/vfio/mdev/mdev_driver.c >> +++ b/drivers/vfio/mdev/mdev_driver.c >> @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) >> return 0; >> } >> >> +static int mdev_match(struct device *dev, struct device_driver *drv) { >> + unsigned int i; >> + struct mdev_device *mdev = to_mdev_device(dev); >> + struct mdev_driver *mdrv = to_mdev_driver(drv); >> + const struct mdev_class_id *ids = mdrv->id_table; >> + >> + for (i = 0; ids[i]....
2019 Sep 24
0
[PATCH 1/6] mdev: class id support
...fio/mdev/mdev_driver.c index >> 0d3223aee20b..b70bbebc9dd3 100644 >> --- a/drivers/vfio/mdev/mdev_driver.c >> +++ b/drivers/vfio/mdev/mdev_driver.c >> @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) >> return 0; >> } >> >> +static int mdev_match(struct device *dev, struct device_driver *drv) { >> + unsigned int i; >> + struct mdev_device *mdev = to_mdev_device(dev); >> + struct mdev_driver *mdrv = to_mdev_driver(drv); >> + const struct mdev_class_id *ids = mdrv->id_table; >> + >> + for (i = 0; ids[i]....
2019 Sep 25
1
[PATCH V2 2/8] mdev: class id support
.../mdev_driver.c > b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..b7c40ce86ee3 100644 > --- a/drivers/vfio/mdev/mdev_driver.c > +++ b/drivers/vfio/mdev/mdev_driver.c > @@ -69,8 +69,22 @@ static int mdev_remove(struct device *dev) > return 0; > } > > +static int mdev_match(struct device *dev, struct device_driver *drv) > +{ > + unsigned int i; > + struct mdev_device *mdev = to_mdev_device(dev); > + struct mdev_driver *mdrv = to_mdev_driver(drv); > + const struct mdev_class_id *ids = mdrv->id_table; > + > + for (i = 0; ids[i].id; i++) > + i...