[Linux-cachefs] [PATCH] cachefiles: allocate static minor for /dev/cachefiles

2023-06-16 Thread Marcel Holtmann
-loading. Signed-off-by: Marcel Holtmann --- Documentation/admin-guide/devices.txt | 3 ++- fs/cachefiles/main.c | 4 +++- include/linux/miscdevice.h| 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/devices.txt b/Documentation

Re: [PATCH v4 00/12] Compiler warning fixes for libvhost-user,libvduse

2022-12-23 Thread Marcel Holtmann
his is the first attempt at some >> obvious fixes that can be done without any harm to the code and its >> readability. >> Marcel Holtmann (12): >> libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU >> libvhost-user: Replace typeof with __typeof__ >>

[PATCH v4 04/12] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-22 Thread Marcel Holtmann
’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare] 223 | for (i = 0; i < dev->nregions; i++) { | ^ Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v4 07/12] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-22 Thread Marcel Holtmann
by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index e089d4d546cf..c871bd331a6b 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects

[PATCH v4 05/12] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-22 Thread Marcel Holtmann
[-Werror=declaration-after-statement] 683 | struct uffdio_register reg_struct; | ^~ In this case, it is also simple enough and doesn't cause any extra ifdef additions. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé --- subprojects/libvhost-user

[PATCH v4 00/12] Compiler warning fixes for libvhost-user,libvduse

2022-12-22 Thread Marcel Holtmann
that can be done without any harm to the code and its readability. Marcel Holtmann (12): libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU libvhost-user: Replace typeof with __typeof__ libvhost-user: Cast rc variable to avoid compiler warning libvhost-user: Use unsigned int i

[PATCH v4 03/12] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-22 Thread Marcel Holtmann
ler warning switched on. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 67d75ece53b7..bcdf32a24f60 100

[PATCH v4 02/12] libvhost-user: Replace typeof with __typeof__

2022-12-22 Thread Marcel Holtmann
’ [-Werror=implicit-function-declaration] 86 | typeof(x) _min1 = (x); \ | ^~ Changing these two users of typeof makes the compiler happy and no extra flags or pragmas need to be provided. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé

[PATCH v4 09/12] libvduse: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
*)>vring.used->ring[vq->vring.num]) = htole16(val); | ~^ Signed-off-by: Marcel Holtmann Suggested-by: Xie Yongji Suggested-by: Paolo Bonzini --- subprojects/libvduse/libvduse.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v4 08/12] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-22 Thread Marcel Holtmann
=sign-compare] 789 | if (vq->inuse >= vq->vring.num) { | ^~ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann Reviewed-by: Xie Yongji --- subprojects/libvduse/libvduse.c

[PATCH v4 12/12] libvduse: Add extra compiler warnings

2022-12-22 Thread Marcel Holtmann
In case libvhost-user is used externally, that projects compiler warnings might be more strict. Enforce an extra set of compiler warnings to catch issues early on. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvduse/meson.build | 8 +++- 1 file changed, 7

Re: [PATCH v3 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
Hi Paolo, >> static inline void vring_set_avail_event(VduseVirtq *vq, uint16_t val) >> { >> -*((uint16_t *)>vring.used->ring[vq->vring.num]) = htole16(val); >> +uint16_t *avail; >> + >> +avail = (uint16_t *)>vring.used->ring[vq->vring.num]; >> +*avail = htole16(val); > > That

[PATCH v4 11/12] libvhost-user: Add extra compiler warnings

2022-12-22 Thread Marcel Holtmann
In case libvhost-user is used externally, that projects compiler warnings might be more strict. Enforce an extra set of compiler warnings to catch issues early on. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvhost-user/meson.build | 8 +++- 1 file changed

[PATCH v4 10/12] libvhost-user: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
Since it was proposed to change the code in libvduse.c to use memcpy instead of an assignment, the code in libvhost-user.c should also be changed to use memcpy. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvhost-user/libvhost-user.c | 5 ++--- 1 file changed, 2

Re: [PATCH v3 02/10] libvhost-user: Replace typeof with __typeof__

2022-12-22 Thread Marcel Holtmann
3: error: implicit declaration of function ‘typeof’ >> [-Werror=implicit-function-declaration] >>86 | typeof(x) _min1 = (x); \ >> | ^~ >> Changing these two users of typeof makes the compiler happy and no extra >> fl

[PATCH v4 01/12] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-22 Thread Marcel Holtmann
RCE if it is not already set by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index d6ee6e7d9168..b55b9e244d9a 100

[PATCH v4 06/12] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-22 Thread Marcel Holtmann
ter-statement] 1625 | struct uffdio_api api_struct; | ^~ Understandable, it might be desired to avoid else clauses, but in this case it seems clear enough and frankly the dev->postcopy_ufd is only assigned once. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu

[PATCH v3 08/10] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-21 Thread Marcel Holtmann
by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index e089d4d546cf..c871bd331a6b 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects

[PATCH v3 07/10] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-21 Thread Marcel Holtmann
re] 2808 | if (num > vq->inuse) { | ^ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé --- subprojects/libvhost-user/libvhost-user.h | 2 +- 1

[PATCH v3 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Marcel Holtmann
-aliasin] 603 | *((uint16_t *)>vring.used->ring[vq->vring.num]) = htole16(val); | ~^ Signed-off-by: Marcel Holtmann Suggested-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v3 04/10] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-21 Thread Marcel Holtmann
’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare] 223 | for (i = 0; i < dev->nregions; i++) { | ^ Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v3 01/10] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-21 Thread Marcel Holtmann
RCE if it is not already set by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index d6ee6e7d9168..b55b9e244d9a 100

[PATCH v3 00/10] Compiler warning fixes for libvhost-user,libvduse

2022-12-21 Thread Marcel Holtmann
that can be done without any harm to the code and its readability. Marcel Holtmann (10): libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU libvhost-user: Replace typeof with __typeof__ libvhost-user: Cast rc variable to avoid compiler warning libvhost-user: Use unsigned int i

[PATCH v3 02/10] libvhost-user: Replace typeof with __typeof__

2022-12-21 Thread Marcel Holtmann
’ [-Werror=implicit-function-declaration] 86 | typeof(x) _min1 = (x); \ | ^~ Changing these two users of typeof makes the compiler happy and no extra flags or pragmas need to be provided. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé

[PATCH v3 05/10] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-21 Thread Marcel Holtmann
[-Werror=declaration-after-statement] 683 | struct uffdio_register reg_struct; | ^~ In this case, it is also simple enough and doesn't cause any extra ifdef additions. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé --- subprojects/libvhost-user

[PATCH v3 06/10] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-21 Thread Marcel Holtmann
ter-statement] 1625 | struct uffdio_api api_struct; | ^~ Understandable, it might be desired to avoid else clauses, but in this case it seems clear enough and frankly the dev->postcopy_ufd is only assigned once. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu

Re: [RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-21 Thread Marcel Holtmann
ng[vq->vring.num]) = >> htole16(val); >> | ~^~~~~ >> >> Signed-off-by: Marcel Holtmann >> --- >> subprojects/libvduse/libvduse.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >>

[PATCH v3 03/10] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-21 Thread Marcel Holtmann
ler warning switched on. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 67d75ece53b7..bcdf32a24f60 100

[PATCH v3 09/10] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-21 Thread Marcel Holtmann
=sign-compare] 789 | if (vq->inuse >= vq->vring.num) { | ^~ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann Reviewed-by: Xie Yongji --- subprojects/libvduse/libvduse.c

[PATCH v2 06/10] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-20 Thread Marcel Holtmann
ter-statement] 1625 | struct uffdio_api api_struct; | ^~ Understandable, it might be desired to avoid else clauses, but in this case it seems clear enough and frankly the dev->postcopy_ufd is only assigned once. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/li

[PATCH v2 05/10] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-20 Thread Marcel Holtmann
[-Werror=declaration-after-statement] 683 | struct uffdio_register reg_struct; | ^~ In this case, it is also simple enough and doesn't cause any extra ifdef additions. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 +++- 1 file changed

[PATCH v2 03/10] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-20 Thread Marcel Holtmann
ler warning switched on. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 67d75ece53b7..bcdf32a24f60 100

[PATCH v2 00/10] Compiler warning fixes for libvhost-user,libvduse

2022-12-20 Thread Marcel Holtmann
or it better be commented accordingly to tell the compiler that it got this part wrong. Marcel Holtmann (10): libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU libvhost-user: Replace typeof with __typeof__ libvhost-user: Cast rc variable to avoid compiler warning libvhost

[PATCH v2 08/10] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-20 Thread Marcel Holtmann
by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index e089d4d546cf..c871bd331a6b 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects

[PATCH v2 09/10] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-20 Thread Marcel Holtmann
=sign-compare] 789 | if (vq->inuse >= vq->vring.num) { | ^~ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 2 +- 1 file c

[PATCH v2 07/10] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-20 Thread Marcel Holtmann
re] 2808 | if (num > vq->inuse) { | ^ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann Reviewed-by: Philippe Mathieu-Daudé --- subprojects/libvhost-user/libvhost-user.h | 2 +- 1

[PATCH v2 04/10] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-20 Thread Marcel Holtmann
’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare] 223 | for (i = 0; i < dev->nregions; i++) { | ^ Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v2 01/10] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-20 Thread Marcel Holtmann
RCE if it is not already set by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index d6ee6e7d9168..b55b9e244d9a 100

[PATCH v2 02/10] libvhost-user: Replace typeof with __typeof__

2022-12-20 Thread Marcel Holtmann
’ [-Werror=implicit-function-declaration] 86 | typeof(x) _min1 = (x); \ | ^~ Changing these two users of typeof makes the compiler happy and no extra flags or pragmas need to be provided. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user

[RFC v2 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-20 Thread Marcel Holtmann
ole16(val); | ~^ Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index 338ad5e352e7..51a4ba1b6878 100644 --- a/su

Re: [PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-20 Thread Marcel Holtmann
omparison of integer expressions of >> different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] >> 2808 | if (num > vq->inuse) { >> | ^ >> >> Instead of casting the comparision to unsigned int, just make the inuse >&

[virtio-dev] Correct way to specify virtio_foo_config structures?

2022-12-20 Thread Marcel Holtmann
Hi, what is the correct way for a VIRTIO_F_VERSION_1 modern device to specify the virtio_foo_config structure. Should I make it __attribute__((packed))? What field types should be used. Everything __virtio{16,32} or better __le{16,32}? Can we have __u8 and do they have to 16-bit or 32-bit

Re: [PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-19 Thread Marcel Holtmann
son of integer expressions of >> different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] >> 2808 | if (num > vq->inuse) { >> | ^ >> Instead of casting the comparision to unsigned int, just make the inuse >> field unsigned int i

[PATCH 0/3] Compiler warning fixes for libvduse

2022-12-19 Thread Marcel Holtmann
the structures point of view the assignment that is done makes no sense to me. I might have to dig into specification to figure it out or it better be commented accordingly to tell the compiler that it got this part wrong. Marcel Holtmann (3): libvduse: Provide _GNU_SOURCE when compiling outside

[PATCH RFC 3/3] libvduse: Fix assignment in vring_set_avail_event

2022-12-19 Thread Marcel Holtmann
ole16(val); | ~^ Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index 338ad5e352e7..51a4ba1b6878 100644 --- a/su

[PATCH 2/3] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-19 Thread Marcel Holtmann
=sign-compare] 789 | if (vq->inuse >= vq->vring.num) { | ^~ Instead of casting the comparison to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 2 +- 1 file c

[PATCH 1/3] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-19 Thread Marcel Holtmann
by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvduse/libvduse.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index e089d4d546cf..c871bd331a6b 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects

[PATCH 5/7] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-19 Thread Marcel Holtmann
[-Werror=declaration-after-statement] 683 | struct uffdio_register reg_struct; | ^~ In this case, it is also simple enough and doesn't cause any extra ifdef additions. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 +++- 1 file changed

[PATCH 3/7] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-19 Thread Marcel Holtmann
ler warning switched on. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 67d75ece53b7..bcdf32a24f60 100

[PATCH 0/7] Various compiler warning fixes for libvhost-user

2022-12-19 Thread Marcel Holtmann
that can be done without any harm to the code and its readabilty. Marcel Holtmann (7): libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU libvhost-user: Replace typeof with __typeof__ libvhost-user: Cast rc variable to avoid compiler warning libvhost-user: Use unsigned int i

[PATCH 1/7] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-19 Thread Marcel Holtmann
RCE if it is not already set by the build system. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 4 1 file changed, 4 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index d6ee6e7d9168..b55b9e244d9a 100

[PATCH 2/7] libvhost-user: Replace typeof with __typeof__

2022-12-19 Thread Marcel Holtmann
’ [-Werror=implicit-function-declaration] 86 | typeof(x) _min1 = (x); \ | ^~ Changing these two users of typeof makes the compiler happy and no extra flags or pragmas need to be provided. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user

[PATCH 7/7] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq

2022-12-19 Thread Marcel Holtmann
re] 2808 | if (num > vq->inuse) { | ^ Instead of casting the comparision to unsigned int, just make the inuse field unsigned int in the fist place. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 4/7] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-19 Thread Marcel Holtmann
’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare] 223 | for (i = 0; i < dev->nregions; i++) { | ^ Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 6/7] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-19 Thread Marcel Holtmann
ter-statement] 1625 | struct uffdio_api api_struct; | ^~ Understandable, it might be desired to avoid else clauses, but in this case it seems clear enough and frankly the dev->postcopy_ufd is only assigned once. Signed-off-by: Marcel Holtmann --- subprojects/libvhost-user/li

Re: [RFC PATCH 00/15] create power sequencing subsystem

2021-08-21 Thread Marcel Holtmann
Hi Dmitry, >>> This is an RFC of the proposed power sequencer subsystem. This is a >>> generification of the MMC pwrseq code. The subsystem tries to abstract >>> the idea of complex power-up/power-down/reset of the devices. >>> >>> The primary set of devices that promted me to create this

Re: [RFC PATCH 00/15] create power sequencing subsystem

2021-08-19 Thread Marcel Holtmann
Hi Dmitry, > This is an RFC of the proposed power sequencer subsystem. This is a > generification of the MMC pwrseq code. The subsystem tries to abstract > the idea of complex power-up/power-down/reset of the devices. > > The primary set of devices that promted me to create this patchset is >

Re: [virtio-dev] Reserve device id for Bluetooth device

2021-04-25 Thread Marcel Holtmann
Hi Michael, I like to reserve device ID 40 for Bluetooth device. Thanks. Regards Marcel >>> >>> The easiest way to do this is by sending a patch with >>> the proposed change: >>> https://github.com/oasis-tcs/virtio-spec#providing-feedback >>> and then request approval

[virtio-dev] [PATCH] Reserve device id for Bluetooth device

2021-04-25 Thread Marcel Holtmann
Use device ID 40 Signed-off-by: Marcel Holtmann --- content.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content.tex b/content.tex index 9232d5c4dde9..e02afafe5c87 100644 --- a/content.tex +++ b/content.tex @@ -2874,6 +2874,8 @@ \chapter{Device Types}\label{sec:Device Types

Re: [virtio-dev] Reserve device id for Bluetooth device

2021-04-24 Thread Marcel Holtmann
Hi Michael, >> I like to reserve device ID 40 for Bluetooth device. Thanks. >> >> Regards >> >> Marcel > > The easiest way to do this is by sending a patch with > the proposed change: > https://github.com/oasis-tcs/virtio-spec#providing-feedback > and then request approval by creating a github

[virtio-dev] Re: Reserve device id for Bluetooth device

2021-04-22 Thread Marcel Holtmann
Hi Michael, >> I like to reserve device ID 40 for Bluetooth device. Thanks. >> >> Regards >> >> Marcel > > I don't see the request on the virtio-dev mailing list. > Pls make sure to subscribe then post. I realized to late that it is subscriber only and so I had to send it again. See here:

[virtio-dev] Reserve device id for Bluetooth device

2021-04-21 Thread Marcel Holtmann
Hi, I like to reserve device ID 40 for Bluetooth device. Thanks. Regards Marcel - To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

Re: [PATCH v3 2/2] Bluetooth: Support the vendor specific debug events

2021-04-13 Thread Marcel Holtmann
g(hdev, "enable %d", enable); > + > + /* Read the Intel supported features and if new exception formats > + * supported, need to load the additional DDC config to enable. > + */ > + err = btintel_read_debug_features(hdev, ); > + if (err) > +

Re: [PATCH v3 1/2] Bluetooth: btusb: support link statistics telemetry events

2021-04-13 Thread Marcel Holtmann
Hi Joseph, > This patch supports the link statistics telemetry events for > Intel controllers > > To avoid the overhead, this debug feature is disabled by default. > > Reviewed-by: Miao-chen Chou > Signed-off-by: Chethan T N > Signed-off-by: Kiran K > Signed-off-by: Joseph Hwang > --- > >

Re: [PATCH] Bluetooth: btusb: fix memory leak

2021-04-13 Thread Marcel Holtmann
Hi Muhammad, > If btusb_mtk_submit_wmt_recv_urb returns error, wc should be freed and > then error should be returned to prevent memory leak. > > Addresses-Coverity: ("Prevent memory leak") > Fixes: 4cbb375e997d ("Bluetooth: btusb: Fixed too many in-token issue for > Mediatek Chip.") >

Re: [PATCH 2/2] Bluetooth: btusb: Add support for Lite-On Mediatek Chip

2021-04-12 Thread Marcel Holtmann
Hi Mark, > Add support for Lite-On Mediatek Chip (MT7921) > Lite On VID = 04CA. > > * /sys/kernel/debug/usb/devices > T: Bus=01 Lev=03 Prnt=04 Port=01 Cnt=02 Dev#= 8 Spd=480 MxCh= 0 > D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=04ca ProdID=3802 Rev= 1.00 > S:

Re: [PATCH 1/2] Bluetooth: btusb: Fixed too many in-token issue for Mediatek Chip.

2021-04-12 Thread Marcel Holtmann
Hi Mark, > This patch reduce in-token during download patch procedure. > Don't submit urb for polling event before sending hci command. > > Signed-off-by: mark-yw.chen > --- > drivers/bluetooth/btusb.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) patch has been applied to

Re: [PATCH][next] Bluetooth: virtio_bt: add missing null pointer check on alloc_skb call return

2021-04-11 Thread Marcel Holtmann
Hi Colin, > The call to alloc_skb with the GFP_KERNEL flag can return a null sk_buff > pointer, so add a null check to avoid any null pointer deference issues. > > Addresses-Coverity: ("Dereference null return value") > Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver") >

Re: [PATCH v2] Bluetooth: Return whether a connection is outbound

2021-04-11 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array

2021-04-11 Thread Marcel Holtmann
Hi Qiheng, > Fix the following coccicheck warning: > > net/bluetooth/msft.c:37:6-13: WARNING use flexible-array member instead > net/bluetooth/msft.c:42:6-10: WARNING use flexible-array member instead > net/bluetooth/msft.c:52:6-10: WARNING use flexible-array member instead > > Signed-off-by:

Re: [PATCH v2] Bluetooth: hci_h5: btrtl: Add quirk for keep power in suspend/resume

2021-04-09 Thread Marcel Holtmann
Hi Hilda, > RTL8822C devices support BT wakeup Host. Add a quirk for these specific > devices did not power off during suspend and resume. > By this change, if the Host support that received BT device signal then > it can be wakeup. > > Signed-off-by: hildawu > --- > Changes in v2: > - Add

Re: [PATCH v1] Bluetooth: Return whether a connection is outbound

2021-04-09 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH] net/Bluetooth - delete unneeded variable initialization

2021-04-09 Thread Marcel Holtmann
Hi Kai, > Delete unneeded variable initialization. > > Signed-off-by: Kai Ye > --- > net/bluetooth/6lowpan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH v2] Bluetooth: Add ncmd=0 recovery handling

2021-04-08 Thread Marcel Holtmann
Hi Manish, > During command status or command complete event, the controller may set > ncmd=0 indicating that it is not accepting any more commands. In such a > case, host holds off sending any more commands to the controller. If the > controller doesn't recover from such condition, host will

Re: [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features

2021-04-06 Thread Marcel Holtmann
Hi Daniel, > This series addresses a race condition where an advertisement > registration can conflict with a software rotation advertisement > refresh. I found that this issue was only occurring with the new > extended MGMT advertising interface. A bad use of the > hdev->cur_adv_instance caused

Re: [PATCH] net/Bluetooth - use the correct print format

2021-04-06 Thread Marcel Holtmann
Hi Kai, > Use the correct print format. Printing an unsigned int value should use %u > instead of %d. For details, please read document: > Documentation/core-api/printk-formats.rst > > Signed-off-by: Kai Ye > --- > net/bluetooth/l2cap_core.c | 16 > 1 file changed, 8

Re: [PATCH 1/1] Bluetooth: btusb: Enable quirk boolean flag for Mediatek Chip.

2021-04-02 Thread Marcel Holtmann
Hi Mark, > Adding support LE scatternet and WBS for Mediatek Chip > > Signed-off-by: mark-yw.chen > --- > drivers/bluetooth/btusb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: Check inquiry status before sending one

2021-04-02 Thread Marcel Holtmann
Hi Archie, > There is a possibility where HCI_INQUIRY flag is set but we still > send HCI_OP_INQUIRY anyway. > > Such a case can be reproduced by connecting to an LE device while > active scanning. When the device is discovered, we initiate a > connection, stop LE Scan, and send Discovery MGMT

Re: [PATCH 0/2] net/Blutooth - Coding style fix

2021-04-02 Thread Marcel Holtmann
Hi Meng, > Remove 'return' in void function and fix some coding style > > Meng Yu (2): > Bluetooth: Remove 'return' in void function > Bluetooth: Coding style fix > > net/bluetooth/6lowpan.c | 5 + > net/bluetooth/hci_debugfs.c | 8 > net/bluetooth/hci_event.c | 2 +- >

Re: [PATCH] Bluetooth: L2CAP: Rudimentary typo fixes

2021-03-26 Thread Marcel Holtmann
Hi Bhaskar, > s/minium/minimum/ > s/procdure/procedure/ > > Signed-off-by: Bhaskar Chowdhury > --- > net/bluetooth/l2cap_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH v2] Bluetooth: SCO - Remove trailing semicolon in macros

2021-03-24 Thread Marcel Holtmann
Hi Meng, > Macros should not use a trailing semicolon. > > Signed-off-by: Meng Yu > --- > > Changes in v2 > -Modify comments > > net/bluetooth/sco.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: Always call advertising disable before setting params

2021-03-24 Thread Marcel Holtmann
Hi Daniel, > In __hci_req_enable_advertising, the HCI_LE_ADV hdev flag is temporarily > cleared to allow the random address to be set, which exposes a race > condition when an advertisement is configured immediately (<10ms) after > software rotation starts to refresh an advertisement. > > In

Re: [PATCH v1] Bluetooth: Return whether a connection is outbound

2021-03-23 Thread Marcel Holtmann
Hi Yu, > When an MGMT_EV_DEVICE_CONNECTED event is reported back to the user > space we will set the flags to tell if the established connection is > outbound or not. This is useful for the user space to log better metrics > and error messages. > > Reviewed-by: Miao-chen Chou > Reviewed-by:

Re: [PATCH v2] Bluetooth: Remove trailing semicolon in macros

2021-03-23 Thread Marcel Holtmann
Hi Meng, > remove trailing semicolon in macros and coding style fix. > > Signed-off-by: Meng Yu > --- > > Changes in v2 > -Re-base in bluetooth-next > > net/bluetooth/smp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards

Re: [PATCH v2] Bluetooth: check for zapped sk before connecting

2021-03-23 Thread Marcel Holtmann
Hi Archie, > There is a possibility of receiving a zapped sock on > l2cap_sock_connect(). This could lead to interesting crashes, one > such case is tearing down an already tore l2cap_sock as is happened > with this call trace: > > __dump_stack lib/dump_stack.c:15 [inline] >

Re: [PATCH] bluetooth: fix set_ecdh_privkey() prototype

2021-03-22 Thread Marcel Holtmann
Hi Arnd, > gcc-11 points out that the declaration does not match the definition: > > net/bluetooth/ecdh_helper.c:122:55: error: argument 2 of type ‘const u8[32]’ > {aka ‘const unsigned char[32]’} with mismatched bound > [-Werror=array-parameter=] > 122 | int set_ecdh_privkey(struct crypto_kpp

Re: [PATCH] Bluetooth: Remove trailing semicolon in macros

2021-03-22 Thread Marcel Holtmann
Hi Meng, > 1. remove trailing semicolon in macros; > 2. fix some coding style. > > Signed-off-by: Meng Yu > --- > net/bluetooth/smp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) the patch doesn’t apply to bluetooth-next, please re-base and send again. Regards Marcel

Re: [PATCH] Bluetooth: hci_qca: Mundane typo fix

2021-03-22 Thread Marcel Holtmann
Hi Bhaskar, > s/packat/packet/ > > Signed-off-by: Bhaskar Chowdhury > --- > drivers/bluetooth/hci_qca.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel

Re: [PATCH] Bluetooth: verify AMP hci_chan before amp_destroy

2021-03-22 Thread Marcel Holtmann
Hi Archie, > hci_chan can be created in 2 places: hci_loglink_complete_evt() if > it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, > Only AMP hci_chan should be removed by a call to > hci_disconn_loglink_complete_evt(). However, the controller might mess > up, call that function,

Re: [PATCH] Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default

2021-03-22 Thread Marcel Holtmann
Hi Archie, > Currently l2cap_chan_set_defaults() reset chan->conf_state to zero. > However, there is a flag CONF_NOT_COMPLETE which is set when > creating the l2cap_chan. It is suggested that the flag should be > cleared when l2cap_chan is ready, but when l2cap_chan_set_defaults() > is called,

Re: [PATCH] Bluetooth: check for zapped sk before connecting

2021-03-22 Thread Marcel Holtmann
Hi Archie, > There is a possibility of receiving a zapped sock on > l2cap_sock_connect(). This could lead to interesting crashes, one > such case is tearing down an already tore l2cap_sock as is happened > with this call trace: > > __dump_stack lib/dump_stack.c:15 [inline] >

Re: [PATCH v1] Bluetooth: Add ncmd=0 recovery handling

2021-03-20 Thread Marcel Holtmann
Hi Manish, > During command status or command complete event, the controller may set > ncmd=0 indicating that it is not accepting any more commands. In such a > case, host holds off sending any more commands to the controller. If the > controller doesn't recover from such condition, host will

Re: [PATCH] Bluetooth: avoid deadlock between hci_dev->lock and socket lock

2021-03-16 Thread Marcel Holtmann
Hi Jiri, > Commit eab2404ba798 ("Bluetooth: Add BT_PHY socket option") added a > dependency between socket lock and hci_dev->lock that could lead to > deadlock. > > It turns out that hci_conn_get_phy() is not in any way relying on hdev > being immutable during the runtime of this function,

Re: [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support

2021-03-11 Thread Marcel Holtmann
Hi Venkata, > Based on device may wakeup status, Bluez stack will enable/disable > passive scanning with whitelist in BT controller while suspending. > As interrupt from BT SoC is handled by UART driver,we need to use > device handle of UART driver to get the status of device may wakeup > >

Re: [PATCH] Bluetooth: Allow scannable adv with extended MGMT APIs

2021-03-03 Thread Marcel Holtmann
Hi Daniel, > An issue was found, where if a bluetooth client requests a broadcast > advertisement with scan response data, it will not be properly > registered with the controller. This is because at the time that the > hci_cp_le_set_scan_param structure is created, the scan response will > not

Re: [PATCH v3 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH v2 1/1] Bluetooth: Remove unneeded commands for suspend

2021-03-03 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH 2/2] Bluetooth: Remove unneeded commands for suspend

2021-03-02 Thread Marcel Holtmann
Hi Abhishek, > During suspend, there are a few scan enable and set event filter > commands that don't need to be sent unless there are actual BR/EDR > devices capable of waking the system. Check the HCI_PSCAN bit before > writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED >

Re: [PATCH 1/2] Bluetooth: Notify suspend on le conn failed

2021-03-02 Thread Marcel Holtmann
Hi Abhishek, > When suspending, Bluetooth disconnects all connected peers devices. If > an LE connection is started but isn't completed, we will see an LE > Create Connection Cancel instead of an HCI disconnect. This just adds > a check to see if an LE cancel was the last disconnected device and

Re: [PATCH v4] Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle

2021-02-26 Thread Marcel Holtmann
Hi Miao-chen, > This moves msft_do_close() from hci_dev_do_close() to > hci_unregister_dev() to avoid clearing MSFT extension info. This also > re-reads MSFT info upon every msft_do_open() even if MSFT extension has > been initialized. > > The following test steps were performed. > (1) boot the

  1   2   3   4   5   6   7   8   9   10   >