search for: virtio_input_devids

Displaying 20 results from an estimated 25 matches for "virtio_input_devids".

2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...t; 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 { > > + char string[128]; > > + __u8 bitmap[128]; > > I note that neither string nor bitmap a...
2015 Mar 24
2
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...t; 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 { > > + char string[128]; > > + __u8 bitmap[128]; > > I note that neither string nor bitmap a...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...(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_cread(vi->vdev, struct virtio_input_config, + u...
2015 Mar 24
3
[PATCH v4] Add virtio-input driver.
...(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_cread(vi->vdev, struct virtio_input_config, + u...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...+ VIRTIO_INPUT_CFG_ID_DEVIDS = 0x03, + VIRTIO_INPUT_CFG_PROP_BITS = 0x10, + VIRTIO_INPUT_CFG_EV_BITS = 0x11, + VIRTIO_INPUT_CFG_ABS_INFO = 0x12, +}; + +struct virtio_input_absinfo { + __virtio32 min; + __virtio32 max; + __virtio32 fuzz; + __virtio32 flat; + __virtio32 res; +}; + +struct virtio_input_devids { + __virtio16 bustype; + __virtio16 vendor; + __virtio16 product; + __virtio16 version; +}; + +struct virtio_input_config { + __u8 select; + __u8 subsel; + __u8 size; + __u8 reserved; + union { + char string[128]; + __u8 bitmap[128]; + struct virtio_input_absinfo abs; + struct...
2015 Mar 24
6
[PATCH v3] Add virtio-input driver.
...+ VIRTIO_INPUT_CFG_ID_DEVIDS = 0x03, + VIRTIO_INPUT_CFG_PROP_BITS = 0x10, + VIRTIO_INPUT_CFG_EV_BITS = 0x11, + VIRTIO_INPUT_CFG_ABS_INFO = 0x12, +}; + +struct virtio_input_absinfo { + __virtio32 min; + __virtio32 max; + __virtio32 fuzz; + __virtio32 flat; + __virtio32 res; +}; + +struct virtio_input_devids { + __virtio16 bustype; + __virtio16 vendor; + __virtio16 product; + __virtio16 version; +}; + +struct virtio_input_config { + __u8 select; + __u8 subsel; + __u8 size; + __u8 reserved; + union { + char string[128]; + __u8 bitmap[128]; + struct virtio_input_absinfo abs; + struct...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...uot;, 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.ids.vendor, &vi->idev->id.vendor); > + virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...uot;, 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.ids.vendor, &vi->idev->id.vendor); > + virtio_cread(vi->vdev, struct virtio_i...
2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...t;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.ids.vendor, &vi->idev->id.vendor); > > + virtio_crea...
2015 Mar 24
2
[PATCH v3] Add virtio-input driver.
...t;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.ids.vendor, &vi->idev->id.vendor); > > + virtio_crea...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...> > + 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.ids.vendor, &vi->idev->id.vendor);...
2015 Mar 24
0
[PATCH v3] Add virtio-input driver.
...> > + 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.ids.vendor, &vi->idev->id.vendor);...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...(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_cread(vi->vdev, struct virtio_input_config, + u...
2015 Mar 26
3
[PATCH v5] Add virtio-input driver.
...(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_cread(vi->vdev, struct virtio_input_config, + u...
2020 Aug 03
0
[PATCH v2 11/24] virtio_input: correct tags for config space fields
.../virtio_input.h +++ b/include/uapi/linux/virtio_input.h @@ -40,18 +40,18 @@ enum virtio_input_config_select { }; struct virtio_input_absinfo { - __u32 min; - __u32 max; - __u32 fuzz; - __u32 flat; - __u32 res; + __le32 min; + __le32 max; + __le32 fuzz; + __le32 flat; + __le32 res; }; struct virtio_input_devids { - __u16 bustype; - __u16 vendor; - __u16 product; - __u16 version; + __le16 bustype; + __le16 vendor; + __le16 product; + __le16 version; }; struct virtio_input_config { -- MST
2020 Aug 05
0
[PATCH v3 11/38] virtio_input: correct tags for config space fields
.../virtio_input.h +++ b/include/uapi/linux/virtio_input.h @@ -40,18 +40,18 @@ enum virtio_input_config_select { }; struct virtio_input_absinfo { - __u32 min; - __u32 max; - __u32 fuzz; - __u32 flat; - __u32 res; + __le32 min; + __le32 max; + __le32 fuzz; + __le32 flat; + __le32 res; }; struct virtio_input_devids { - __u16 bustype; - __u16 vendor; - __u16 product; - __u16 version; + __le16 bustype; + __le16 vendor; + __le16 product; + __le16 version; }; struct virtio_input_config { -- MST
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...fig 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; > > > + __u8 reserved; > > > + union { > > > + char string[128]; > > > + __u8 bitmap[1...
2015 Mar 24
0
[virtio-dev] Re: [PATCH v3] Add virtio-input driver.
...fig 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; > > > + __u8 reserved; > > > + union { > > > + char string[128]; > > > + __u8 bitmap[1...
2020 Aug 05
1
[PATCH v3 30/38] virtio_input: convert to LE accessors
...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_cread(vi->vdev, struct virtio_input_config, - u...
2015 Mar 20
2
[PATCH v2] Add virtio-input driver.
...+ VIRTIO_INPUT_CFG_ID_SERIAL = 0x02, + VIRTIO_INPUT_CFG_ID_DEVIDS = 0x03, + VIRTIO_INPUT_CFG_PROP_BITS = 0x10, + VIRTIO_INPUT_CFG_EV_BITS = 0x11, + VIRTIO_INPUT_CFG_ABS_INFO = 0x12, +}; + +struct virtio_input_absinfo { + __u32 min; + __u32 max; + __u32 fuzz; + __u32 flat; +}; + +struct virtio_input_devids { + __u16 bustype; + __u16 vendor; + __u16 product; + __u16 version; +}; + +struct virtio_input_config { + __u8 select; + __u8 subsel; + __u8 size; + __u8 reserved; + union { + char string[128]; + __u8 bitmap[128]; + struct virtio_input_absinfo abs; + struct virtio_input_devids...