QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
@ 2019-07-12 13:39 Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth Philippe Mathieu-Daudé
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

A series of obvious patches to build without the deprecated
bluetooth devices. Still worth for 4.1 or too late?
It is clearly not a bugfix.

Regards,

Phil.

Philippe Mathieu-Daudé (7):
  hw/arm: Nokia N-series tablet requires Bluetooth
  hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  MAINTAINERS: Add a Bluetooth entry
  vl: Fix 'braces' coding style issues
  vl: Use qemu_strtoi() instead of strtol()
  vl: Extract bt_parse() into its own file
  hw/bt: Allow building with CONFIG_BLUETOOTH disabled

 MAINTAINERS         |   7 +++
 Makefile.objs       |   3 +-
 bt-opts.c           | 140 ++++++++++++++++++++++++++++++++++++++++++++
 bt-stubs.c          |  18 ++++++
 hw/arm/Kconfig      |   1 +
 hw/bt/Makefile.objs |   4 +-
 hw/usb/Kconfig      |   2 +-
 include/sysemu/bt.h |   3 +
 vl.c                | 121 --------------------------------------
 9 files changed, 174 insertions(+), 125 deletions(-)
 create mode 100644 bt-opts.c
 create mode 100644 bt-stubs.c

-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-15 13:05   ` Thomas Huth
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH Philippe Mathieu-Daudé
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Missed in 4826ac6d192 because the Bluetooth devices are
currently always enabled.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index ab65ecd216..11195251f3 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -106,6 +106,7 @@ config NSERIES
     select LM832X   # GPIO keyboard chip
     select TWL92230 # energy-management
     select TUSB6010
+    select BLUETOOTH
 
 config OMAP
     bool
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-12 13:58   ` Paolo Bonzini
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/usb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index 564305e283..1b435ec002 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -82,7 +82,7 @@ config USB_NETWORK
 config USB_BLUETOOTH
     bool
     default y
-    depends on USB
+    depends on USB && BLUETOOTH
 
 config USB_SMARTCARD
     bool
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-08-14 12:47   ` Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 4/7] vl: Fix 'braces' coding style issues Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index cc9636b43a..5d8f27d9bd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1733,6 +1733,13 @@ F: hw/*/*xive*
 F: include/hw/*/*xive*
 F: docs/*/*xive*
 
+Bluetooth
+S: Orphan
+F: bt-*.c
+F: hw/bt/
+F: include/hw/bt.h
+F: include/sysemu/bt.h
+
 Subsystems
 ----------
 Audio
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 4/7] vl: Fix 'braces' coding style issues
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 5/7] vl: Use qemu_strtoi() instead of strtol() Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Since we'll move this code around, fix its style first:

  ERROR: braces {} are necessary for all arms of this statement style

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 vl.c | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/vl.c b/vl.c
index 5089fce6c5..96de4f74b9 100644
--- a/vl.c
+++ b/vl.c
@@ -920,8 +920,9 @@ static struct HCIInfo *hci_table[MAX_NICS];
 
 struct HCIInfo *qemu_next_hci(void)
 {
-    if (cur_hci == nb_hcis)
+    if (cur_hci == nb_hcis) {
         return &null_hci;
+    }
 
     return hci_table[cur_hci++];
 }
@@ -937,8 +938,9 @@ static int bt_hci_parse(const char *str)
     }
 
     hci = hci_init(str);
-    if (!hci)
+    if (!hci) {
         return -1;
+    }
 
     bdaddr.b[0] = 0x52;
     bdaddr.b[1] = 0x54;
@@ -957,9 +959,10 @@ static void bt_vhci_add(int vlan_id)
 {
     struct bt_scatternet_s *vlan = qemu_find_bt_vlan(vlan_id);
 
-    if (!vlan->slave)
+    if (!vlan->slave) {
         warn_report("adding a VHCI to an empty scatternet %i",
                     vlan_id);
+    }
 
     bt_vhci_init(bt_new_hci(vlan));
 }
@@ -984,12 +987,14 @@ static struct bt_device_s *bt_device_add(const char *opt)
 
     vlan = qemu_find_bt_vlan(vlan_id);
 
-    if (!vlan->slave)
+    if (!vlan->slave) {
         warn_report("adding a slave device to an empty scatternet %i",
                     vlan_id);
+    }
 
-    if (!strcmp(devname, "keyboard"))
+    if (!strcmp(devname, "keyboard")) {
         return bt_keyboard_init(vlan);
+    }
 
     error_report("unsupported bluetooth device '%s'", devname);
     return 0;
@@ -1002,9 +1007,11 @@ static int bt_parse(const char *opt)
 
     if (strstart(opt, "hci", &endp)) {
         if (!*endp || *endp == ',') {
-            if (*endp)
-                if (!strstart(endp, ",vlan=", 0))
+            if (*endp) {
+                if (!strstart(endp, ",vlan=", 0)) {
                     opt = endp + 1;
+                }
+            }
 
             return bt_hci_parse(opt);
        }
@@ -1021,14 +1028,16 @@ static int bt_parse(const char *opt)
                     error_report("bad parameter '%s'", endp + 1);
                     return 1;
                 }
-            } else
+            } else {
                 vlan = 0;
+            }
 
             bt_vhci_add(vlan);
             return 0;
         }
-    } else if (strstart(opt, "device:", &endp))
+    } else if (strstart(opt, "device:", &endp)) {
         return !bt_device_add(endp);
+    }
 
     error_report("bad bluetooth parameter '%s'", opt);
     return 1;
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 5/7] vl: Use qemu_strtoi() instead of strtol()
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 4/7] vl: Fix 'braces' coding style issues Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: Extract bt_parse() into its own file Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Since we'll move this code around, fix this checkpatch warning
first:

  ERROR: consider using qemu_strtol in preference to strtol

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 vl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/vl.c b/vl.c
index 96de4f74b9..c7f4d01c99 100644
--- a/vl.c
+++ b/vl.c
@@ -978,8 +978,7 @@ static struct bt_device_s *bt_device_add(const char *opt)
     pstrcpy(devname, MIN(sizeof(devname), len), opt);
 
     if (endp) {
-        vlan_id = strtol(endp + 6, &endp, 0);
-        if (*endp) {
+        if (qemu_strtoi(endp + 6, (const char **)&endp, 0, &vlan_id) < 0) {
             error_report("unrecognised bluetooth vlan Id");
             return 0;
         }
@@ -1019,8 +1018,7 @@ static int bt_parse(const char *opt)
         if (!*endp || *endp == ',') {
             if (*endp) {
                 if (strstart(endp, ",vlan=", &p)) {
-                    vlan = strtol(p, (char **) &endp, 0);
-                    if (*endp) {
+                    if (qemu_strtoi(p, &endp, 0, &vlan) < 0) {
                         error_report("bad scatternet '%s'", p);
                         return 1;
                     }
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 6/7] vl: Extract bt_parse() into its own file
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 5/7] vl: Use qemu_strtoi() instead of strtol() Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

This is required to be able to compile vl.c with CONFIG_BLUETOOTH
disabled.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
2300 lines less for the C preprocessor :)
---
 Makefile.objs       |   2 +-
 bt-opts.c           | 140 ++++++++++++++++++++++++++++++++++++++++++++
 include/sysemu/bt.h |   3 +
 vl.c                | 128 ----------------------------------------
 4 files changed, 144 insertions(+), 129 deletions(-)
 create mode 100644 bt-opts.c

diff --git a/Makefile.objs b/Makefile.objs
index 6a143dcd57..c2845a0efc 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -65,7 +65,7 @@ common-obj-y += replay/
 
 common-obj-y += ui/
 common-obj-m += ui/
-common-obj-y += bt-host.o bt-vhci.o
+common-obj-y += bt-host.o bt-vhci.o bt-opts.o
 bt-host.o-cflags := $(BLUEZ_CFLAGS)
 
 common-obj-y += dma-helpers.o
diff --git a/bt-opts.c b/bt-opts.c
new file mode 100644
index 0000000000..d14ae4836f
--- /dev/null
+++ b/bt-opts.c
@@ -0,0 +1,140 @@
+/*
+ * Bluetooth command line options.
+ *
+ * Copyright (C) 2008 Andrzej Zaborowski
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "qemu/cutils.h"
+#include "sysemu/bt.h"
+#include "net/net.h"
+#include "hw/bt.h"
+
+static int nb_hcis;
+static int cur_hci;
+static struct HCIInfo *hci_table[MAX_NICS];
+
+struct HCIInfo *qemu_next_hci(void)
+{
+    if (cur_hci == nb_hcis) {
+        return &null_hci;
+    }
+
+    return hci_table[cur_hci++];
+}
+
+static int bt_hci_parse(const char *str)
+{
+    struct HCIInfo *hci;
+    bdaddr_t bdaddr;
+
+    if (nb_hcis >= MAX_NICS) {
+        error_report("too many bluetooth HCIs (max %i)", MAX_NICS);
+        return -1;
+    }
+
+    hci = hci_init(str);
+    if (!hci) {
+        return -1;
+    }
+
+    bdaddr.b[0] = 0x52;
+    bdaddr.b[1] = 0x54;
+    bdaddr.b[2] = 0x00;
+    bdaddr.b[3] = 0x12;
+    bdaddr.b[4] = 0x34;
+    bdaddr.b[5] = 0x56 + nb_hcis;
+    hci->bdaddr_set(hci, bdaddr.b);
+
+    hci_table[nb_hcis++] = hci;
+
+    return 0;
+}
+
+static void bt_vhci_add(int vlan_id)
+{
+    struct bt_scatternet_s *vlan = qemu_find_bt_vlan(vlan_id);
+
+    if (!vlan->slave) {
+        warn_report("adding a VHCI to an empty scatternet %i", vlan_id);
+    }
+
+    bt_vhci_init(bt_new_hci(vlan));
+}
+
+static struct bt_device_s *bt_device_add(const char *opt)
+{
+    struct bt_scatternet_s *vlan;
+    int vlan_id = 0;
+    char *endp = strstr(opt, ",vlan=");
+    int len = (endp ? endp - opt : strlen(opt)) + 1;
+    char devname[10];
+
+    pstrcpy(devname, MIN(sizeof(devname), len), opt);
+
+    if (endp) {
+        if (qemu_strtoi(endp + 6, (const char **)&endp, 0, &vlan_id) < 0) {
+            error_report("unrecognised bluetooth vlan Id");
+            return 0;
+        }
+    }
+
+    vlan = qemu_find_bt_vlan(vlan_id);
+
+    if (!vlan->slave) {
+        warn_report("adding a slave device to an empty scatternet %i",
+                    vlan_id);
+    }
+
+    if (!strcmp(devname, "keyboard")) {
+        return bt_keyboard_init(vlan);
+    }
+
+    error_report("unsupported bluetooth device '%s'", devname);
+    return 0;
+}
+
+int bt_parse(const char *opt)
+{
+    const char *endp, *p;
+    int vlan;
+
+    if (strstart(opt, "hci", &endp)) {
+        if (!*endp || *endp == ',') {
+            if (*endp) {
+                if (!strstart(endp, ",vlan=", 0)) {
+                    opt = endp + 1;
+                }
+            }
+
+            return bt_hci_parse(opt);
+       }
+    } else if (strstart(opt, "vhci", &endp)) {
+        if (!*endp || *endp == ',') {
+            if (*endp) {
+                if (strstart(endp, ",vlan=", &p)) {
+                    if (qemu_strtoi(p, &endp, 0, &vlan) < 0) {
+                        error_report("bad scatternet '%s'", p);
+                        return 1;
+                    }
+                } else {
+                    error_report("bad parameter '%s'", endp + 1);
+                    return 1;
+                }
+            } else {
+                vlan = 0;
+            }
+
+            bt_vhci_add(vlan);
+            return 0;
+        }
+    } else if (strstart(opt, "device:", &endp)) {
+        return !bt_device_add(endp);
+    }
+
+    error_report("bad bluetooth parameter '%s'", opt);
+    return 1;
+}
diff --git a/include/sysemu/bt.h b/include/sysemu/bt.h
index 2fd8c0f14b..5b73709c2d 100644
--- a/include/sysemu/bt.h
+++ b/include/sysemu/bt.h
@@ -17,4 +17,7 @@ typedef struct HCIInfo {
 struct HCIInfo *bt_host_hci(const char *id);
 struct HCIInfo *qemu_next_hci(void);
 
+/* TODO Convert bt-opts.c to opts_init() and remove from here. */
+int bt_parse(const char *opt);
+
 #endif
diff --git a/vl.c b/vl.c
index c7f4d01c99..3a6dd3ba2b 100644
--- a/vl.c
+++ b/vl.c
@@ -60,7 +60,6 @@ int main(int argc, char **argv)
 #include "hw/isa/isa.h"
 #include "hw/scsi/scsi.h"
 #include "hw/display/vga.h"
-#include "hw/bt.h"
 #include "sysemu/watchdog.h"
 #include "hw/firmware/smbios.h"
 #include "hw/acpi/acpi.h"
@@ -913,133 +912,6 @@ static void configure_rtc(QemuOpts *opts)
 }
 
 /***********************************************************/
-/* Bluetooth support */
-static int nb_hcis;
-static int cur_hci;
-static struct HCIInfo *hci_table[MAX_NICS];
-
-struct HCIInfo *qemu_next_hci(void)
-{
-    if (cur_hci == nb_hcis) {
-        return &null_hci;
-    }
-
-    return hci_table[cur_hci++];
-}
-
-static int bt_hci_parse(const char *str)
-{
-    struct HCIInfo *hci;
-    bdaddr_t bdaddr;
-
-    if (nb_hcis >= MAX_NICS) {
-        error_report("too many bluetooth HCIs (max %i)", MAX_NICS);
-        return -1;
-    }
-
-    hci = hci_init(str);
-    if (!hci) {
-        return -1;
-    }
-
-    bdaddr.b[0] = 0x52;
-    bdaddr.b[1] = 0x54;
-    bdaddr.b[2] = 0x00;
-    bdaddr.b[3] = 0x12;
-    bdaddr.b[4] = 0x34;
-    bdaddr.b[5] = 0x56 + nb_hcis;
-    hci->bdaddr_set(hci, bdaddr.b);
-
-    hci_table[nb_hcis++] = hci;
-
-    return 0;
-}
-
-static void bt_vhci_add(int vlan_id)
-{
-    struct bt_scatternet_s *vlan = qemu_find_bt_vlan(vlan_id);
-
-    if (!vlan->slave) {
-        warn_report("adding a VHCI to an empty scatternet %i",
-                    vlan_id);
-    }
-
-    bt_vhci_init(bt_new_hci(vlan));
-}
-
-static struct bt_device_s *bt_device_add(const char *opt)
-{
-    struct bt_scatternet_s *vlan;
-    int vlan_id = 0;
-    char *endp = strstr(opt, ",vlan=");
-    int len = (endp ? endp - opt : strlen(opt)) + 1;
-    char devname[10];
-
-    pstrcpy(devname, MIN(sizeof(devname), len), opt);
-
-    if (endp) {
-        if (qemu_strtoi(endp + 6, (const char **)&endp, 0, &vlan_id) < 0) {
-            error_report("unrecognised bluetooth vlan Id");
-            return 0;
-        }
-    }
-
-    vlan = qemu_find_bt_vlan(vlan_id);
-
-    if (!vlan->slave) {
-        warn_report("adding a slave device to an empty scatternet %i",
-                    vlan_id);
-    }
-
-    if (!strcmp(devname, "keyboard")) {
-        return bt_keyboard_init(vlan);
-    }
-
-    error_report("unsupported bluetooth device '%s'", devname);
-    return 0;
-}
-
-static int bt_parse(const char *opt)
-{
-    const char *endp, *p;
-    int vlan;
-
-    if (strstart(opt, "hci", &endp)) {
-        if (!*endp || *endp == ',') {
-            if (*endp) {
-                if (!strstart(endp, ",vlan=", 0)) {
-                    opt = endp + 1;
-                }
-            }
-
-            return bt_hci_parse(opt);
-       }
-    } else if (strstart(opt, "vhci", &endp)) {
-        if (!*endp || *endp == ',') {
-            if (*endp) {
-                if (strstart(endp, ",vlan=", &p)) {
-                    if (qemu_strtoi(p, &endp, 0, &vlan) < 0) {
-                        error_report("bad scatternet '%s'", p);
-                        return 1;
-                    }
-                } else {
-                    error_report("bad parameter '%s'", endp + 1);
-                    return 1;
-                }
-            } else {
-                vlan = 0;
-            }
-
-            bt_vhci_add(vlan);
-            return 0;
-        }
-    } else if (strstart(opt, "device:", &endp)) {
-        return !bt_device_add(endp);
-    }
-
-    error_report("bad bluetooth parameter '%s'", opt);
-    return 1;
-}
 
 static int parse_name(void *opaque, QemuOpts *opts, Error **errp)
 {
-- 
2.20.1



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

* [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: Extract bt_parse() into its own file Philippe Mathieu-Daudé
@ 2019-07-12 13:39 ` Philippe Mathieu-Daudé
  2019-07-15 13:08   ` Thomas Huth
  2019-07-14 11:04 ` [Qemu-devel] [PATCH-for-4.1? 0/7] vl: " Richard Henderson
  2019-07-15 13:13 ` Thomas Huth
  8 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 13:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina, Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile.objs       |  3 ++-
 bt-stubs.c          | 18 ++++++++++++++++++
 hw/bt/Makefile.objs |  4 ++--
 3 files changed, 22 insertions(+), 3 deletions(-)
 create mode 100644 bt-stubs.c

diff --git a/Makefile.objs b/Makefile.objs
index c2845a0efc..98269e393a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -65,8 +65,9 @@ common-obj-y += replay/
 
 common-obj-y += ui/
 common-obj-m += ui/
-common-obj-y += bt-host.o bt-vhci.o bt-opts.o
 bt-host.o-cflags := $(BLUEZ_CFLAGS)
+common-obj-$(CONFIG_BLUETOOTH) += bt-host.o bt-vhci.o bt-opts.o
+common-obj-$(call lnot,$(CONFIG_BLUETOOTH)) += bt-stubs.o
 
 common-obj-y += dma-helpers.o
 common-obj-y += vl.o
diff --git a/bt-stubs.c b/bt-stubs.c
new file mode 100644
index 0000000000..d3f5158d3b
--- /dev/null
+++ b/bt-stubs.c
@@ -0,0 +1,18 @@
+/*
+ * Bluetooth stubs.
+ *
+ * Copyright (c) 2019 Red Hat, Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "sysemu/bt.h"
+
+int bt_parse(const char *opt)
+{
+    error_report("Bluetooth support is disabled");
+
+    return 1;
+}
diff --git a/hw/bt/Makefile.objs b/hw/bt/Makefile.objs
index 867a7d2e8a..46aec8e38e 100644
--- a/hw/bt/Makefile.objs
+++ b/hw/bt/Makefile.objs
@@ -1,3 +1,3 @@
-common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
-common-obj-y += hci-csr.o
+common-obj-$(CONFIG_BLUETOOTH) += core.o l2cap.o sdp.o hci.o hid.o
+common-obj-$(CONFIG_BLUETOOTH) += hci-csr.o
 
-- 
2.20.1



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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH Philippe Mathieu-Daudé
@ 2019-07-12 13:58   ` Paolo Bonzini
  2019-07-12 14:16     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2019-07-12 13:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

On 12/07/19 15:39, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/usb/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index 564305e283..1b435ec002 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -82,7 +82,7 @@ config USB_NETWORK
>  config USB_BLUETOOTH
>      bool
>      default y
> -    depends on USB
> +    depends on USB && BLUETOOTH
>  
>  config USB_SMARTCARD
>      bool
> 

Shouldn't it select BLUETOOTH instead?

Paolo


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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 13:58   ` Paolo Bonzini
@ 2019-07-12 14:16     ` Philippe Mathieu-Daudé
  2019-07-12 14:58       ` Paolo Bonzini
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 14:16 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

On 7/12/19 3:58 PM, Paolo Bonzini wrote:
> On 12/07/19 15:39, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  hw/usb/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
>> index 564305e283..1b435ec002 100644
>> --- a/hw/usb/Kconfig
>> +++ b/hw/usb/Kconfig
>> @@ -82,7 +82,7 @@ config USB_NETWORK
>>  config USB_BLUETOOTH
>>      bool
>>      default y
>> -    depends on USB
>> +    depends on USB && BLUETOOTH
>>  
>>  config USB_SMARTCARD
>>      bool
>>
> 
> Shouldn't it select BLUETOOTH instead?

I wondered but am not sure, it is default to Yes, but Bluetooth code is
deprecated and print a big warning when you use it, so I think this
device should not be selected as default, neither pull in the deprecated
bluetooth code.

So personally I'd respin without 'default y'. If you have a good reason
to use it, I can use 'select' instead.

Regards,

Phil.


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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 14:16     ` Philippe Mathieu-Daudé
@ 2019-07-12 14:58       ` Paolo Bonzini
  2019-07-12 16:45         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2019-07-12 14:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

On 12/07/19 16:16, Philippe Mathieu-Daudé wrote:
> I wondered but am not sure, it is default to Yes, but Bluetooth code is
> deprecated and print a big warning when you use it, so I think this
> device should not be selected as default, neither pull in the deprecated
> bluetooth code.
> 
> So personally I'd respin without 'default y'. If you have a good reason
> to use it, I can use 'select' instead.

There are two separate questions.  One is whether USB_BLUETOOTH should
select BLUETOOTH and the answer there is almost certainly yes (in the
words of kconfig.rst, BLUETOOTH is a "subsystem" while USB_BLUETOOTH is
a "device"; devices select the bus that the device provides).

The other is whether we want to enable USB_BLUETOOTH by default.  I
wouldn't have any problem there, but if we disable it basically no one
would ship/use it and we might as well delete the whole thing.

Paolo


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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 14:58       ` Paolo Bonzini
@ 2019-07-12 16:45         ` Philippe Mathieu-Daudé
  2019-07-12 17:31           ` Paolo Bonzini
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-12 16:45 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

On 7/12/19 4:58 PM, Paolo Bonzini wrote:
> On 12/07/19 16:16, Philippe Mathieu-Daudé wrote:
>> I wondered but am not sure, it is default to Yes, but Bluetooth code is
>> deprecated and print a big warning when you use it, so I think this
>> device should not be selected as default, neither pull in the deprecated
>> bluetooth code.
>>
>> So personally I'd respin without 'default y'. If you have a good reason
>> to use it, I can use 'select' instead.
> 
> There are two separate questions.  One is whether USB_BLUETOOTH should
> select BLUETOOTH and the answer there is almost certainly yes (in the
> words of kconfig.rst, BLUETOOTH is a "subsystem" while USB_BLUETOOTH is
> a "device"; devices select the bus that the device provides).

Fair :)

> The other is whether we want to enable USB_BLUETOOTH by default.  I
> wouldn't have any problem there, but if we disable it basically no one
> would ship/use it and we might as well delete the whole thing.

The only user is the ARM Nokia N-series board, so if we set default=n,
the Bluetooth subsystem will be only be selected on arm-softmmu (and
aarch64-softmmu).

This seems a sane cleanup. If another board wants to use the bluetooth
code, it should probably move it out of the orphan status.


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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 16:45         ` Philippe Mathieu-Daudé
@ 2019-07-12 17:31           ` Paolo Bonzini
  2019-07-14 16:01             ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2019-07-12 17:31 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

On 12/07/19 18:45, Philippe Mathieu-Daudé wrote:
> On 7/12/19 4:58 PM, Paolo Bonzini wrote:
>> The other is whether we want to enable USB_BLUETOOTH by default.  I
>> wouldn't have any problem there, but if we disable it basically no one
>> would ship/use it and we might as well delete the whole thing.
> 
> The only user is the ARM Nokia N-series board, so if we set default=n,
> the Bluetooth subsystem will be only be selected on arm-softmmu (and
> aarch64-softmmu).
> 
> This seems a sane cleanup. If another board wants to use the bluetooth
> code, it should probably move it out of the orphan status.

Fair! ;)

Paolo


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

* Re: [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
@ 2019-07-14 11:04 ` " Richard Henderson
  2019-07-15 13:13 ` Thomas Huth
  8 siblings, 0 replies; 22+ messages in thread
From: Richard Henderson @ 2019-07-14 11:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina

On 7/12/19 3:39 PM, Philippe Mathieu-Daudé wrote:
> A series of obvious patches to build without the deprecated
> bluetooth devices. Still worth for 4.1 or too late?
> It is clearly not a bugfix.
> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (7):
>   hw/arm: Nokia N-series tablet requires Bluetooth
>   hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
>   MAINTAINERS: Add a Bluetooth entry
>   vl: Fix 'braces' coding style issues
>   vl: Use qemu_strtoi() instead of strtol()
>   vl: Extract bt_parse() into its own file
>   hw/bt: Allow building with CONFIG_BLUETOOTH disabled

All of this looks plausible to me to go along with the 4.1 deprecation.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


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

* Re: [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH
  2019-07-12 17:31           ` Paolo Bonzini
@ 2019-07-14 16:01             ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-14 16:01 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Thomas Huth, Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann

Hi Paolo,

On 7/12/19 7:31 PM, Paolo Bonzini wrote:
> On 12/07/19 18:45, Philippe Mathieu-Daudé wrote:
>> On 7/12/19 4:58 PM, Paolo Bonzini wrote:
>>> The other is whether we want to enable USB_BLUETOOTH by default.  I
>>> wouldn't have any problem there, but if we disable it basically no one
>>> would ship/use it and we might as well delete the whole thing.
>>
>> The only user is the ARM Nokia N-series board, so if we set default=n,
>> the Bluetooth subsystem will be only be selected on arm-softmmu (and
>> aarch64-softmmu).

Using (1):

+    default y if BLUETOOTH
     depends on USB
+    select BLUETOOTH

I get:

    KconfigDataError: cycle found including BLUETOOTH

This works but doesn't follow kconfig.rst (2):

+    default y if BLUETOOTH
     depends on USB

This works (kconfig.rst compliant, 3):

+    default n
     depends on USB
+    select BLUETOOTH

Are you OK with (2) or you prefer (3)?

>>
>> This seems a sane cleanup. If another board wants to use the bluetooth
>> code, it should probably move it out of the orphan status.
> 
> Fair! ;)
> 
> Paolo
> 


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

* Re: [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth Philippe Mathieu-Daudé
@ 2019-07-15 13:05   ` Thomas Huth
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Huth @ 2019-07-15 13:05 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann, Paolo Bonzini

On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
> Missed in 4826ac6d192 because the Bluetooth devices are
> currently always enabled.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index ab65ecd216..11195251f3 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -106,6 +106,7 @@ config NSERIES
>      select LM832X   # GPIO keyboard chip
>      select TWL92230 # energy-management
>      select TUSB6010
> +    select BLUETOOTH

Looking at hw/bt/Makefile.objs the BLUETOOTH switch seems to be
completely unused?

 Thomas


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

* Re: [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
@ 2019-07-15 13:08   ` Thomas Huth
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Huth @ 2019-07-15 13:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann, Paolo Bonzini

On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  Makefile.objs       |  3 ++-
>  bt-stubs.c          | 18 ++++++++++++++++++
>  hw/bt/Makefile.objs |  4 ++--
>  3 files changed, 22 insertions(+), 3 deletions(-)
>  create mode 100644 bt-stubs.c
> 
> diff --git a/Makefile.objs b/Makefile.objs
> index c2845a0efc..98269e393a 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -65,8 +65,9 @@ common-obj-y += replay/
>  
>  common-obj-y += ui/
>  common-obj-m += ui/
> -common-obj-y += bt-host.o bt-vhci.o bt-opts.o
>  bt-host.o-cflags := $(BLUEZ_CFLAGS)
> +common-obj-$(CONFIG_BLUETOOTH) += bt-host.o bt-vhci.o bt-opts.o
> +common-obj-$(call lnot,$(CONFIG_BLUETOOTH)) += bt-stubs.o
>  
>  common-obj-y += dma-helpers.o
>  common-obj-y += vl.o
> diff --git a/bt-stubs.c b/bt-stubs.c
> new file mode 100644
> index 0000000000..d3f5158d3b
> --- /dev/null
> +++ b/bt-stubs.c
> @@ -0,0 +1,18 @@
> +/*
> + * Bluetooth stubs.
> + *
> + * Copyright (c) 2019 Red Hat, Inc.
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qemu/error-report.h"
> +#include "sysemu/bt.h"
> +
> +int bt_parse(const char *opt)
> +{
> +    error_report("Bluetooth support is disabled");
> +
> +    return 1;
> +}
> diff --git a/hw/bt/Makefile.objs b/hw/bt/Makefile.objs
> index 867a7d2e8a..46aec8e38e 100644
> --- a/hw/bt/Makefile.objs
> +++ b/hw/bt/Makefile.objs
> @@ -1,3 +1,3 @@
> -common-obj-y += core.o l2cap.o sdp.o hci.o hid.o
> -common-obj-y += hci-csr.o
> +common-obj-$(CONFIG_BLUETOOTH) += core.o l2cap.o sdp.o hci.o hid.o
> +common-obj-$(CONFIG_BLUETOOTH) += hci-csr.o

... ok, so the BLUETOOTH switch gets used here. But I wonder whether we
should have separate switches for the backends (i.e. the files here) and
the guest devices (i.e. the ones in hw/bt/) ?

 Thomas


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

* Re: [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
  2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2019-07-14 11:04 ` [Qemu-devel] [PATCH-for-4.1? 0/7] vl: " Richard Henderson
@ 2019-07-15 13:13 ` Thomas Huth
  2019-08-13 14:00   ` Philippe Mathieu-Daudé
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Huth @ 2019-07-15 13:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Peter Maydell, Miroslav Rezanina, qemu-arm, Gerd Hoffmann, Paolo Bonzini

On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
> A series of obvious patches to build without the deprecated
> bluetooth devices. Still worth for 4.1 or too late?
> It is clearly not a bugfix.

I wonder whether this series is worth the effort right now, or whether
we should simply nuke the bluetooth code after 4.1 has been released?

 Thomas


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

* Re: [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
  2019-07-15 13:13 ` Thomas Huth
@ 2019-08-13 14:00   ` Philippe Mathieu-Daudé
  2019-08-13 14:04     ` Peter Maydell
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-13 14:00 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: Peter Maydell, Markus Armbruster, qemu-arm, Gerd Hoffmann,
	Paolo Bonzini, Miroslav Rezanina

On 7/15/19 3:13 PM, Thomas Huth wrote:
> On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
>> A series of obvious patches to build without the deprecated
>> bluetooth devices. Still worth for 4.1 or too late?
>> It is clearly not a bugfix.
> 
> I wonder whether this series is worth the effort right now, or whether
> we should simply nuke the bluetooth code after 4.1 has been released?

Well, perfect is the enemy of good :)

This series is already done and is an improvement to what we have.

Regarding nuking it, it depends on the Nokia N-series boards, they might
become useless without BT support.

Peter, as a maintainer of these boards, what do you prefer?

Thanks,

Phil.


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

* Re: [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
  2019-08-13 14:00   ` Philippe Mathieu-Daudé
@ 2019-08-13 14:04     ` Peter Maydell
  2019-08-14 12:45       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Maydell @ 2019-08-13 14:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, QEMU Developers, Markus Armbruster, qemu-arm,
	Gerd Hoffmann, Paolo Bonzini, Miroslav Rezanina

On Tue, 13 Aug 2019 at 15:01, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 7/15/19 3:13 PM, Thomas Huth wrote:
> > On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
> >> A series of obvious patches to build without the deprecated
> >> bluetooth devices. Still worth for 4.1 or too late?
> >> It is clearly not a bugfix.
> >
> > I wonder whether this series is worth the effort right now, or whether
> > we should simply nuke the bluetooth code after 4.1 has been released?
>
> Well, perfect is the enemy of good :)
>
> This series is already done and is an improvement to what we have.
>
> Regarding nuking it, it depends on the Nokia N-series boards, they might
> become useless without BT support.

Er, they're not useless at all without BT support. The BT
hardware is a really tiny part that I doubt many users of
the board models ever used. As long as we retain a "simulate
doing nothing much" model of the BT device to show the guest
I don't care whether the BT backend code disappears.

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled
  2019-08-13 14:04     ` Peter Maydell
@ 2019-08-14 12:45       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:45 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Thomas Huth, QEMU Developers, Markus Armbruster, qemu-arm,
	Gerd Hoffmann, Paolo Bonzini, Miroslav Rezanina

On 8/13/19 4:04 PM, Peter Maydell wrote:
> On Tue, 13 Aug 2019 at 15:01, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>> On 7/15/19 3:13 PM, Thomas Huth wrote:
>>> On 12/07/2019 15.39, Philippe Mathieu-Daudé wrote:
>>>> A series of obvious patches to build without the deprecated
>>>> bluetooth devices. Still worth for 4.1 or too late?
>>>> It is clearly not a bugfix.
>>>
>>> I wonder whether this series is worth the effort right now, or whether
>>> we should simply nuke the bluetooth code after 4.1 has been released?
>>
>> Well, perfect is the enemy of good :)
>>
>> This series is already done and is an improvement to what we have.
>>
>> Regarding nuking it, it depends on the Nokia N-series boards, they might
>> become useless without BT support.
> 
> Er, they're not useless at all without BT support. The BT
> hardware is a really tiny part that I doubt many users of
> the board models ever used. As long as we retain a "simulate
> doing nothing much" model of the BT device to show the guest
> I don't care whether the BT backend code disappears.

OK, I won't insist then.


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

* Re: [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices
  2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices Philippe Mathieu-Daudé
@ 2019-08-14 12:47   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-08-14 12:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, QEMU Trivial, qemu-arm,
	Gerd Hoffmann, Paolo Bonzini, Miroslav Rezanina

Cc'ing qemu-trivial@ to salvage this patch.

On 7/12/19 3:39 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  MAINTAINERS | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cc9636b43a..5d8f27d9bd 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1733,6 +1733,13 @@ F: hw/*/*xive*
>  F: include/hw/*/*xive*
>  F: docs/*/*xive*
>  
> +Bluetooth
> +S: Orphan
> +F: bt-*.c
> +F: hw/bt/
> +F: include/hw/bt.h
> +F: include/sysemu/bt.h
> +
>  Subsystems
>  ----------
>  Audio
> 


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

end of thread, back to index

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 13:39 [Qemu-devel] [PATCH-for-4.1? 0/7] vl: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 1/7] hw/arm: Nokia N-series tablet requires Bluetooth Philippe Mathieu-Daudé
2019-07-15 13:05   ` Thomas Huth
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1 2/7] hw/usb: Bluetooth HCI USB depends on USB & BLUETOOTH Philippe Mathieu-Daudé
2019-07-12 13:58   ` Paolo Bonzini
2019-07-12 14:16     ` Philippe Mathieu-Daudé
2019-07-12 14:58       ` Paolo Bonzini
2019-07-12 16:45         ` Philippe Mathieu-Daudé
2019-07-12 17:31           ` Paolo Bonzini
2019-07-14 16:01             ` Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 3/7] MAINTAINERS: Add an entry for the Bluetooth devices Philippe Mathieu-Daudé
2019-08-14 12:47   ` Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 4/7] vl: Fix 'braces' coding style issues Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 5/7] vl: Use qemu_strtoi() instead of strtol() Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: Extract bt_parse() into its own file Philippe Mathieu-Daudé
2019-07-12 13:39 ` [Qemu-devel] [PATCH-for-4.1? 7/7] hw/bt: Allow building with CONFIG_BLUETOOTH disabled Philippe Mathieu-Daudé
2019-07-15 13:08   ` Thomas Huth
2019-07-14 11:04 ` [Qemu-devel] [PATCH-for-4.1? 0/7] vl: " Richard Henderson
2019-07-15 13:13 ` Thomas Huth
2019-08-13 14:00   ` Philippe Mathieu-Daudé
2019-08-13 14:04     ` Peter Maydell
2019-08-14 12:45       ` Philippe Mathieu-Daudé

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org qemu-devel@archiver.kernel.org
	public-inbox-index qemu-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox