Displaying 15 results from an estimated 15 matches for "virtio_i2c_del_vq".
Did you mean:
virtio_i2c_del_vqs
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;buf, vmsg_i->hdr.len);
+
+ kfree(vmsg_i->buf);
+ vmsg_i->buf = NULL;
+ }
+ reinit_completion(&vi->completion);
+ }
+ if (i == num)
+ ret = num;
+
+err_unlock_free:
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vmsg_o->buf);
+ kfree(vmsg_o);
+ return ret;
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "i2c-msg");...
2020 Sep 03
9
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;buf, vmsg_i->hdr.len);
+
+ kfree(vmsg_i->buf);
+ vmsg_i->buf = NULL;
+ }
+ reinit_completion(&vi->completion);
+ }
+ if (i == num)
+ ret = num;
+
+err_unlock_free:
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vmsg_o->buf);
+ kfree(vmsg_o);
+ return ret;
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "i2c-msg");...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...+ memcpy(msgs[i].buf, vmsg->buf, msgs[i].len);
+
+ kfree(vmsg->buf);
+ vmsg->buf = NULL;
+
+ reinit_completion(&vi->completion);
+ }
+
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vi->vmsg.buf);
+ vi->vmsg.buf = NULL;
+ return ((ret < 0) ? ret : i);
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "msg");
+ re...
2020 Sep 22
3
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...+ memcpy(msgs[i].buf, vmsg->buf, msgs[i].len);
+
+ kfree(vmsg->buf);
+ vmsg->buf = NULL;
+
+ reinit_completion(&vi->completion);
+ }
+
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vi->vmsg.buf);
+ vi->vmsg.buf = NULL;
+ return ((ret < 0) ? ret : i);
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "msg");
+ re...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;buf = NULL;
> + }
> + reinit_completion(&vi->completion);
> + }
> + if (i == num)
> + ret = num;
> +
> +err_unlock_free:
> + mutex_unlock(&vi->i2c_lock);
> + kfree(vmsg_o->buf);
> + kfree(vmsg_o);
> + return ret;
> +}
> +
> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
> +{
> + vdev->config->reset(vdev);
> + vdev->config->del_vqs(vdev);
> +}
> +
> +static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
> +{
> + struct virtio_device *vdev = vi->vdev;
> +
> + vi->vq = virtio_find_single_vq...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;buf = NULL;
> + }
> + reinit_completion(&vi->completion);
> + }
> + if (i == num)
> + ret = num;
> +
> +err_unlock_free:
> + mutex_unlock(&vi->i2c_lock);
> + kfree(vmsg_o->buf);
> + kfree(vmsg_o);
> + return ret;
> +}
> +
> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
> +{
> + vdev->config->reset(vdev);
> + vdev->config->del_vqs(vdev);
> +}
> +
> +static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
> +{
> + struct virtio_device *vdev = vi->vdev;
> +
> + vi->vq = virtio_find_single_vq...
2020 Sep 14
0
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...en);
> +
> + kfree(vmsg->buf);
> + vmsg->buf = NULL;
> + }
> +
> + reinit_completion(&vi->completion);
> + }
> +
> + mutex_unlock(&vi->i2c_lock);
> + kfree(vmsg->buf);
> + return ((ret < 0) ? ret : i);
> +}
> +
> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
> +{
> + vdev->config->reset(vdev);
> + vdev->config->del_vqs(vdev);
> +}
> +
> +static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
> +{
> + struct virtio_device *vdev = vi->vdev;
> +
> + vi->vq = virtio_find_single_vq...
2020 Sep 04
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...;buf = NULL;
> + }
> + reinit_completion(&vi->completion);
> + }
> + if (i == num)
> + ret = num;
> +
> +err_unlock_free:
> + mutex_unlock(&vi->i2c_lock);
> + kfree(vmsg_o->buf);
> + kfree(vmsg_o);
> + return ret;
> +}
> +
> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
> +{
> + vdev->config->reset(vdev);
Why need reset here?
Thanks
> + vdev->config->del_vqs(vdev);
> +}
> +
> +static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
> +{
> + struct virtio_device *vdev = vi->vdev;
> +
> +...
2020 Sep 22
0
[PATCH v3] i2c: virtio: add a virtio i2c frontend driver
...ree(vmsg->buf);
> + vmsg->buf = NULL;
> +
> + reinit_completion(&vi->completion);
> + }
> +
> + mutex_unlock(&vi->i2c_lock);
> + kfree(vi->vmsg.buf);
> + vi->vmsg.buf = NULL;
> + return ((ret < 0) ? ret : i);
> +}
> +
> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
> +{
> + vdev->config->reset(vdev);
> + vdev->config->del_vqs(vdev);
> +}
> +
> +static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
> +{
> + struct virtio_device *vdev = vi->vdev;
> +
> + vi->vq = virtio_find_single_vq...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...mp;& msgs[i].len)
+ memcpy(msgs[i].buf, vmsg->buf, msgs[i].len);
+
+ kfree(vmsg->buf);
+ vmsg->buf = NULL;
+ }
+
+ reinit_completion(&vi->completion);
+ }
+
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vmsg->buf);
+ return ((ret < 0) ? ret : i);
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "msg");
+ re...
2020 Sep 11
6
[PATCH v2] i2c: virtio: add a virtio i2c frontend driver
...mp;& msgs[i].len)
+ memcpy(msgs[i].buf, vmsg->buf, msgs[i].len);
+
+ kfree(vmsg->buf);
+ vmsg->buf = NULL;
+ }
+
+ reinit_completion(&vi->completion);
+ }
+
+ mutex_unlock(&vi->i2c_lock);
+ kfree(vmsg->buf);
+ return ((ret < 0) ? ret : i);
+}
+
+static void virtio_i2c_del_vqs(struct virtio_device *vdev)
+{
+ vdev->config->reset(vdev);
+ vdev->config->del_vqs(vdev);
+}
+
+static int virtio_i2c_setup_vqs(struct virtio_i2c *vi)
+{
+ struct virtio_device *vdev = vi->vdev;
+
+ vi->vq = virtio_find_single_vq(vdev, virtio_i2c_msg_done, "msg");
+ re...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> utilize the virtqueue by submit the request in a batch.
>
I'm afraid not all physical devices support batch. I'd like to keep the
current design and consider
your suggestion as a possible optimization in the future.
Thanks.
>>
>> +}
>> +
>> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
>> +{
>> +??? vdev->config->reset(vdev);
>
>
> Why need reset here?
>
> Thanks
>
I'm following what other virtio drivers do.
They reset the devices before they clean up the queues.
>
>> +??? vdev->config->del_vqs(...
2020 Sep 04
2
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> utilize the virtqueue by submit the request in a batch.
>
I'm afraid not all physical devices support batch. I'd like to keep the
current design and consider
your suggestion as a possible optimization in the future.
Thanks.
>>
>> +}
>> +
>> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
>> +{
>> +??? vdev->config->reset(vdev);
>
>
> Why need reset here?
>
> Thanks
>
I'm following what other virtio drivers do.
They reset the devices before they clean up the queues.
>
>> +??? vdev->config->del_vqs(...
2020 Sep 03
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...> + kfree(vmsg_o->buf);
> + kfree(vmsg_o);
> + return ret;
> +}
...
> + vi->adap.timeout = HZ / 10;
+ Blank line.
> + ret = i2c_add_adapter(&vi->adap);
> + if (ret) {
> + dev_err(&vdev->dev, "failed to add virtio-i2c adapter.\n");
> + virtio_i2c_del_vqs(vdev);
Usually we do clean up followed by message.
> + }
> +
> + return ret;
--
With Best Regards,
Andy Shevchenko
2020 Sep 07
0
[PATCH] i2c: virtio: add a virtio i2c frontend driver
...al one. It's
impossible to forbid batching if you have a queue anyway ...
> I'd like to keep the current design and consider
> your suggestion as a possible optimization in the future.
>
> Thanks.
>
>
>>>
>>> +}
>>> +
>>> +static void virtio_i2c_del_vqs(struct virtio_device *vdev)
>>> +{
>>> +??? vdev->config->reset(vdev);
>>
>>
>> Why need reset here?
>>
>> Thanks
>>
> I'm following what other virtio drivers do.
> They reset the devices before they clean up the queues.
You...