Displaying 20 results from an estimated 22 matches for "virtio_input_cfg_id_devids".
2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...> > + bytes = virtinput_cfg_select(vi, select, subsel);
> > + if (!bytes)
> > + return;
>
> How about limiting bytes to sizeof struct virtio_input_config->u?
It's limited to 256 anyway because size is u8 in config space.
> > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > + if (size >= 8) {
>
> What does 8 mean here? Should be sizeof virtio_input_devids?
Yes, fixed.
> > +struct virtio_input_config {
> > + __u8 select;
> > + __u8 subsel;
> > + __u8 size;
> > + __u8 reserved;
> > + union {
>...
2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...> > + bytes = virtinput_cfg_select(vi, select, subsel);
> > + if (!bytes)
> > + return;
>
> How about limiting bytes to sizeof struct virtio_input_config->u?
It's limited to 256 anyway because size is u8 in config space.
> > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > + if (size >= 8) {
>
> What does 8 mean here? Should be sizeof virtio_input_devids?
Yes, fixed.
> > +struct virtio_input_config {
> > + __u8 select;
> > + __u8 subsel;
> > + __u8 size;
> > + __u8 reserved;
> > + union {
>...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= 8) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= 8) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...out limiting bytes to sizeof struct virtio_input_config->u?
>
> It's limited to 256 anyway because size is u8 in config space.
That struct is 128 bytes though.
Also, change bytes and virtinput_cfg_select to be u8 to make this
clearer?
> > > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > > + if (size >= 8) {
> >
> > What does 8 mean here? Should be sizeof virtio_input_devids?
>
> Yes, fixed.
>
> > > +struct virtio_input_config {
> > > + __u8 select;
> > > + __u8 subsel;
> > > + __u8 size;
>...
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...out limiting bytes to sizeof struct virtio_input_config->u?
>
> It's limited to 256 anyway because size is u8 in config space.
That struct is 128 bytes though.
Also, change bytes and virtinput_cfg_select to be u8 to make this
clearer?
> > > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > > + if (size >= 8) {
> >
> > What does 8 mean here? Should be sizeof virtio_input_devids?
>
> Yes, fixed.
>
> > > +struct virtio_input_config {
> > > + __u8 select;
> > > + __u8 subsel;
> > > + __u8 size;
>...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= sizeof(struct virtio_input_devids)) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_c...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= sizeof(struct virtio_input_devids)) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_c...
2020 Aug 05
1
[PATCH v3 30/38] virtio_input: convert to LE accessors
...;
+ virtio_cread_le(vi->vdev, struct virtio_input_config, u.abs.flat, &fl);
input_set_abs_params(vi->idev, abs, mi, ma, fu, fl);
input_abs_set_res(vi->idev, abs, re);
}
@@ -244,14 +244,14 @@ static int virtinput_probe(struct virtio_device *vdev)
size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
if (size >= sizeof(struct virtio_input_devids)) {
- virtio_cread(vi->vdev, struct virtio_input_config,
- u.ids.bustype, &vi->idev->id.bustype);
- virtio_cread(vi->vdev, struct virtio_input_config,
- u.ids.vendor, &vi->idev->id.vendor);
- virtio_c...
2015 Mar 20
2
[PATCH v2] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= 8) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 20
2
[PATCH v2] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= 8) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...ntf(vi->phys, sizeof(vi->phys),
> > + "virtio%d/input0", vdev->index);
> > + vi->idev->name = vi->name;
> > + vi->idev->phys = vi->phys;
> > + vi->idev->uniq = vi->serial;
> > +
> > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > + if (size >= 8) {
>
> What does 8 mean here? Should be sizeof virtio_input_devids?
>
> > + virtio_cread(vi->vdev, struct virtio_input_config,
> > + u.ids.bustype, &vi->idev->id.bustype);
> > + virtio_cread(vi->vdev, struct vir...
2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...ntf(vi->phys, sizeof(vi->phys),
> > + "virtio%d/input0", vdev->index);
> > + vi->idev->name = vi->name;
> > + vi->idev->phys = vi->phys;
> > + vi->idev->uniq = vi->serial;
> > +
> > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > + if (size >= 8) {
>
> What does 8 mean here? Should be sizeof virtio_input_devids?
>
> > + virtio_cread(vi->vdev, struct virtio_input_config,
> > + u.ids.bustype, &vi->idev->id.bustype);
> > + virtio_cread(vi->vdev, struct vir...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...vi->serial)));
> + snprintf(vi->phys, sizeof(vi->phys),
> + "virtio%d/input0", vdev->index);
> + vi->idev->name = vi->name;
> + vi->idev->phys = vi->phys;
> + vi->idev->uniq = vi->serial;
> +
> + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> + if (size >= 8) {
What does 8 mean here? Should be sizeof virtio_input_devids?
> + virtio_cread(vi->vdev, struct virtio_input_config,
> + u.ids.bustype, &vi->idev->id.bustype);
> + virtio_cread(vi->vdev, struct virtio_input_config,
> + u.i...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...vi->serial)));
> + snprintf(vi->phys, sizeof(vi->phys),
> + "virtio%d/input0", vdev->index);
> + vi->idev->name = vi->name;
> + vi->idev->phys = vi->phys;
> + vi->idev->uniq = vi->serial;
> +
> + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> + if (size >= 8) {
What does 8 mean here? Should be sizeof virtio_input_devids?
> + virtio_cread(vi->vdev, struct virtio_input_config,
> + u.ids.bustype, &vi->idev->id.bustype);
> + virtio_cread(vi->vdev, struct virtio_input_config,
> + u.i...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...;phys),
> > > + "virtio%d/input0", vdev->index);
> > > + vi->idev->name = vi->name;
> > > + vi->idev->phys = vi->phys;
> > > + vi->idev->uniq = vi->serial;
> > > +
> > > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > > + if (size >= 8) {
> >
> > What does 8 mean here? Should be sizeof virtio_input_devids?
> >
> > > + virtio_cread(vi->vdev, struct virtio_input_config,
> > > + u.ids.bustype, &vi->idev->id.bustype);
> > > + v...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...;phys),
> > > + "virtio%d/input0", vdev->index);
> > > + vi->idev->name = vi->name;
> > > + vi->idev->phys = vi->phys;
> > > + vi->idev->uniq = vi->serial;
> > > +
> > > + size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
> > > + if (size >= 8) {
> >
> > What does 8 mean here? Should be sizeof virtio_input_devids?
> >
> > > + virtio_cread(vi->vdev, struct virtio_input_config,
> > > + u.ids.bustype, &vi->idev->id.bustype);
> > > + v...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= sizeof(struct virtio_input_devids)) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_c...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...vi->serial, min(size, sizeof(vi->serial)));
+ snprintf(vi->phys, sizeof(vi->phys),
+ "virtio%d/input0", vdev->index);
+ vi->idev->name = vi->name;
+ vi->idev->phys = vi->phys;
+ vi->idev->uniq = vi->serial;
+
+ size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
+ if (size >= sizeof(struct virtio_input_devids)) {
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.bustype, &vi->idev->id.bustype);
+ virtio_cread(vi->vdev, struct virtio_input_config,
+ u.ids.vendor, &vi->idev->id.vendor);
+ virtio_c...
2020 Aug 06
0
[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v)))
...serial)));
239 snprintf(vi->phys, sizeof(vi->phys),
240 "virtio%d/input0", vdev->index);
241 vi->idev->name = vi->name;
242 vi->idev->phys = vi->phys;
243 vi->idev->uniq = vi->serial;
244
245 size = virtinput_cfg_select(vi, VIRTIO_INPUT_CFG_ID_DEVIDS, 0);
246 if (size >= sizeof(struct virtio_input_devids)) {
> 247 virtio_cread_le(vi->vdev, struct virtio_input_config,
248 u.ids.bustype, &vi->idev->id.bustype);
249 virtio_cread_le(vi->vdev, struct virtio_input_config,
250 u.ids.vendor, &vi->i...