Displaying 20 results from an estimated 26 matches for "ops_create_fail".
2019 Oct 15
1
[PATCH V3 1/7] mdev: class id support
...Parent device operation structure to be registered.
> + * @id: class id.
> *
> * Add device to list of registered parent devices.
> * Returns a negative value on error, otherwise 0.
> @@ -324,6 +331,9 @@ int mdev_device_create(struct kobject *kobj,
> if (ret)
> goto ops_create_fail;
>
> + if (!mdev->class_id)
This is a sanity test failure of the parent driver on a privileged
path, I think it's fair to print a warning when this occurs rather than
only return an errno to the user. In fact, ret is not set to an error
value here, so it looks like this fails to cr...
2019 Oct 11
0
[PATCH V3 1/7] mdev: class id support
...presenting parent device.
* @ops: Parent device operation structure to be registered.
+ * @id: class id.
*
* Add device to list of registered parent devices.
* Returns a negative value on error, otherwise 0.
@@ -324,6 +331,9 @@ int mdev_device_create(struct kobject *kobj,
if (ret)
goto ops_create_fail;
+ if (!mdev->class_id)
+ goto class_id_fail;
+
ret = device_add(&mdev->dev);
if (ret)
goto add_fail;
@@ -340,6 +350,7 @@ int mdev_device_create(struct kobject *kobj,
sysfs_fail:
device_del(&mdev->dev);
+class_id_fail:
add_fail:
parent->ops->remove(mdev);
o...
2019 Oct 16
0
[PATCH V3 1/7] mdev: class id support
...e to be registered.
>> + * @id: class id.
>> *
>> * Add device to list of registered parent devices.
>> * Returns a negative value on error, otherwise 0.
>> @@ -324,6 +331,9 @@ int mdev_device_create(struct kobject *kobj,
>> if (ret)
>> goto ops_create_fail;
>>
>> + if (!mdev->class_id)
>> + goto class_id_fail;
>> +
>> ret = device_add(&mdev->dev);
>> if (ret)
>> goto add_fail;
>> @@ -340,6 +350,7 @@ int mdev_device_create(struct kobject *kobj,
>>
>> sysfs_fail:
>>...
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...* @id: class id.
> >> *
> >> * Add device to list of registered parent devices.
> >> * Returns a negative value on error, otherwise 0.
> >> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
> >> if (ret)
> >> goto ops_create_fail;
> >>
> >> + if (!mdev->class_id) {
> >> + ret = -EINVAL;
> >> + WARN(1, "class id must be specified for device %s\n",
> >> + dev_name(dev));
> > Nit, dev_warn(dev, "mdev vendor driver failed to specify device class\n...
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...* @id: class id.
> >> *
> >> * Add device to list of registered parent devices.
> >> * Returns a negative value on error, otherwise 0.
> >> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
> >> if (ret)
> >> goto ops_create_fail;
> >>
> >> + if (!mdev->class_id) {
> >> + ret = -EINVAL;
> >> + WARN(1, "class id must be specified for device %s\n",
> >> + dev_name(dev));
> > Nit, dev_warn(dev, "mdev vendor driver failed to specify device class\n...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...Parent device operation structure to be registered.
> + * @id: class id.
> *
> * Add device to list of registered parent devices.
> * Returns a negative value on error, otherwise 0.
> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
> if (ret)
> goto ops_create_fail;
>
> + if (!mdev->class_id) {
> + ret = -EINVAL;
> + WARN(1, "class id must be specified for device %s\n",
> + dev_name(dev));
Nit, dev_warn(dev, "mdev vendor driver failed to specify device class\n");
> + goto add_fail;
> + }
> +
> r...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...Parent device operation structure to be registered.
> + * @id: class id.
> *
> * Add device to list of registered parent devices.
> * Returns a negative value on error, otherwise 0.
> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
> if (ret)
> goto ops_create_fail;
>
> + if (!mdev->class_id) {
> + ret = -EINVAL;
> + WARN(1, "class id must be specified for device %s\n",
> + dev_name(dev));
Nit, dev_warn(dev, "mdev vendor driver failed to specify device class\n");
> + goto add_fail;
> + }
> +
> r...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...;> *
> > >> * Add device to list of registered parent devices.
> > >> * Returns a negative value on error, otherwise 0.
> > >> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
> > >> if (ret)
> > >> goto ops_create_fail;
> > >>
> > >> + if (!mdev->class_id) {
> > >> + ret = -EINVAL;
> > >> + WARN(1, "class id must be specified for device %s\n",
> > >> + dev_name(dev));
> > > Nit, dev_warn(dev, "mdev vendor driver...
2019 Nov 05
0
[PATCH V8 1/6] mdev: class id support
...ss(struct mdev_device *mdev, u16 id)
+{
+ WARN_ON(mdev->class_id);
+ mdev->class_id = id;
+}
+EXPORT_SYMBOL(mdev_set_class);
+
struct device *mdev_dev(struct mdev_device *mdev)
{
return &mdev->dev;
@@ -324,6 +335,12 @@ int mdev_device_create(struct kobject *kobj,
if (ret)
goto ops_create_fail;
+ if (!mdev->class_id) {
+ ret = -EINVAL;
+ dev_warn(dev, "mdev vendor driver failed to specify device class\n");
+ goto add_fail;
+ }
+
ret = device_add(&mdev->dev);
if (ret)
goto add_fail;
diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_drive...
2019 Nov 04
0
[PATCH V7 1/6] mdev: class id support
...ss(struct mdev_device *mdev, u16 id)
+{
+ WARN_ON(mdev->class_id);
+ mdev->class_id = id;
+}
+EXPORT_SYMBOL(mdev_set_class);
+
struct device *mdev_dev(struct mdev_device *mdev)
{
return &mdev->dev;
@@ -324,6 +334,12 @@ int mdev_device_create(struct kobject *kobj,
if (ret)
goto ops_create_fail;
+ if (!mdev->class_id) {
+ ret = -EINVAL;
+ dev_warn(dev, "mdev vendor driver failed to specify device class\n");
+ goto add_fail;
+ }
+
ret = device_add(&mdev->dev);
if (ret)
goto add_fail;
diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_drive...
2019 Oct 23
0
[PATCH V5 1/6] mdev: class id support
...resenting parent device.
* @ops: Parent device operation structure to be registered.
+ * @id: class id.
*
* Add device to list of registered parent devices.
* Returns a negative value on error, otherwise 0.
@@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
if (ret)
goto ops_create_fail;
+ if (!mdev->class_id) {
+ ret = -EINVAL;
+ WARN(1, "class id must be specified for device %s\n",
+ dev_name(dev));
+ goto add_fail;
+ }
+
ret = device_add(&mdev->dev);
if (ret)
goto add_fail;
diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/md...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...to be registered.
>> + * @id: class id.
>> *
>> * Add device to list of registered parent devices.
>> * Returns a negative value on error, otherwise 0.
>> @@ -324,6 +335,13 @@ int mdev_device_create(struct kobject *kobj,
>> if (ret)
>> goto ops_create_fail;
>>
>> + if (!mdev->class_id) {
>> + ret = -EINVAL;
>> + WARN(1, "class id must be specified for device %s\n",
>> + dev_name(dev));
> Nit, dev_warn(dev, "mdev vendor driver failed to specify device class\n");
Will fix.
>
>...
2019 Oct 11
17
[PATCH V3 0/7] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Oct 11
17
[PATCH V3 0/7] mdev based hardware virtio offloading support
Hi all:
There are hardware that can do virtio datapath offloading while having
its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver to
2019 Nov 04
1
[PATCH V7 1/6] mdev: class id support
...mdev->class_id);
> + mdev->class_id = id;
> +}
> +EXPORT_SYMBOL(mdev_set_class);
> +
> struct device *mdev_dev(struct mdev_device *mdev)
> {
> return &mdev->dev;
> @@ -324,6 +334,12 @@ int mdev_device_create(struct kobject *kobj,
> if (ret)
> goto ops_create_fail;
>
> + if (!mdev->class_id) {
> + ret = -EINVAL;
> + dev_warn(dev, "mdev vendor driver failed to specify device class\n");
> + goto add_fail;
> + }
> +
> ret = device_add(&mdev->dev);
> if (ret)
> goto add_fail;
> diff --git a/drivers...
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver
2019 Nov 04
9
[PATCH V7 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver
2019 Oct 30
8
[PATCH V6 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver
2019 Nov 07
9
[PATCH V11 0/6] mdev based hardware virtio offloading support
Hi all:
There are hardwares that can do virtio datapath offloading while
having its own control path. This path tries to implement a mdev based
unified API to support using kernel virtio driver to drive those
devices. This is done by introducing a new mdev transport for virtio
(virtio_mdev) and register itself as a new kind of mdev driver. Then
it provides a unified way for kernel virtio driver