public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] virtio_bt: Fix alignment in configuration struct
@ 2022-10-18 17:30 Igor Skalkin
  2022-10-18 17:30 ` [PATCH v2 1/1] " Igor Skalkin
  2022-10-25 22:40 ` [PATCH v2 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 5+ messages in thread
From: Igor Skalkin @ 2022-10-18 17:30 UTC (permalink / raw)
  To: virtualization, luiz.dentz, mst
  Cc: marcel, johan.hedberg, jasowang, linux-bluetooth, linux-kernel,
	Igor Skalkin

According to specification [1], "For the device-specific configuration
space, the driver MUST use 8 bit wide accesses for 8 bit wide fields,
16 bit wide and aligned accesses for 16 bit wide fields and 32 bit wide
and aligned accesses for 32 and 64 bit wide fields.".

Current version of the configuration structure has non-aligned 16bit
fields.

This patch adds 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

Changes in v2:
  The first version of this patch just changed the configuration
  structure in uapi/linux/virtio_bt.h
  This can not be done, because it will break the userspace, so the
  second version offers a less radical approach - it introduces a new
  feature bit and a new configuration structure that both the device
  and the driver will use if this bit is negotiated.

Igor Skalkin (1):
  virtio_bt: Fix alignment in configuration struct

 drivers/bluetooth/virtio_bt.c  | 16 +++++++++++++---
 include/uapi/linux/virtio_bt.h |  8 ++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-25 22:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 17:30 [PATCH v2 0/1] virtio_bt: Fix alignment in configuration struct Igor Skalkin
2022-10-18 17:30 ` [PATCH v2 1/1] " Igor Skalkin
2022-10-18 18:32   ` bluez.test.bot
2022-10-18 18:36     ` Luiz Augusto von Dentz
2022-10-25 22:40 ` [PATCH v2 0/1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox