History

virtio_bt: Fix alignment in configuration struct

The current version of the configuration structure has unaligned 16-bit fields, but according to the specification [1], access to the configuration space must be aligned. Add a second, aligned version of the configuration structure and a new feature bit indicating that this version is being used. [1] https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.pdf

Igor Skalkin committed 4 years ago

Commit 47c50851 parent 3b1c7c02 files · +21 −3Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/virtio_bt.h+8−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 #define VIRTIO_BT_F_VND_HCI 0 /* Indicates vendor command support */
1010 #define VIRTIO_BT_F_MSFT_EXT 1 /* Indicates MSFT vendor support */
1111 #define VIRTIO_BT_F_AOSP_EXT 2 /* Indicates AOSP vendor support */
12+#define VIRTIO_BT_F_CONFIG_V2 3 /* Use second version configuration */
1213
1314 enum virtio_bt_config_type {
1415 VIRTIO_BT_CONFIG_TYPE_PRIMARY = 0,
@@ -28,4 +29,11 @@ struct virtio_bt_config { · 13 unmodified lines
2829 __u16 msft_opcode;
2930 } __attribute__((packed));
3031
32+struct virtio_bt_config_v2 {
33+ __u8 type;
34+ __u8 alignment;
35+ __u16 vendor;
36+ __u16 msft_opcode;
37+};
38+
3139 #endif /* _UAPI_LINUX_VIRTIO_BT_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t