1. 09 1月, 2018 1 次提交
    • A
      Bluetooth: hciuart: add nvmem dependency · b71b25fe
      Arnd Bergmann 提交于
      When the hci support is built-in, but mvmem is a loadable module, we
      get a link failure:
      
      drivers/bluetooth/hci_ll.o: In function `hci_ti_probe':
      hci_ll.c:(.text+0x226): undefined reference to `nvmem_cell_get'
      hci_ll.c:(.text+0x238): undefined reference to `nvmem_cell_read'
      hci_ll.c:(.text+0x244): undefined reference to `nvmem_cell_put'
      
      This adds another Kconfig dependency to enforce valid configurations.
      
      Fixes: 0e58d0cd ("Bluetooth: hci_ll: Add optional nvmem BD address source")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b71b25fe
  2. 27 12月, 2017 1 次提交
    • L
      Bluetooth: Avoid WARN splat due to missing GPIOLIB · 27378f4c
      Lukas Wunner 提交于
      Loading hci_bcm with CONFIG_GPIOLIB=n results in the following splat
      when calling gpiod_to_irq() from bcm_get_resources():
      
          WARNING: CPU: 0 PID: 1006 at ./include/linux/gpio/consumer.h:450 bcm_get_resources+0x50/0x80
          CPU: 0 PID: 1006 Comm: kworker/u8:4 Tainted: G       A         4.15.0-rc4custom+ #4
          Hardware name: Apple Inc. MacBook8,1/Mac-BE0E8AC46FE800CC, BIOS MB81.88Z.0168.B00.1708080033 08/08/2017
          Call Trace:
          bcm_serdev_probe+0x8b/0xc0
          driver_probe_device+0x202/0x310
          __driver_attach+0x85/0x90
          ? driver_probe_device+0x310/0x310
          bus_for_each_dev+0x57/0x80
          async_run_entry_fn+0x2c/0xd0
          process_one_work+0x1d2/0x3d0
          worker_thread+0x26/0x3c0
          ? process_one_work+0x3d0/0x3d0
          kthread+0x10c/0x130
          ? kthread_create_on_node+0x40/0x40
          ret_from_fork+0x1f/0x30
      
      We could call gpiod_to_irq() only if IS_ENABLED(CONFIG_GPIOLIB) but
      without GPIOLIB, the driver's power saving features can't be used,
      so selecting GPIOLIB seems more appropriate.
      
      The same issue is present in hci_intel.c and hci_nokia.c, fix those up
      as well.
      Reported-by: NMax Shavrick <mxms@me.com>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      27378f4c
  3. 13 12月, 2017 2 次提交
  4. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  5. 12 10月, 2017 1 次提交
    • A
      Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS · 05e89fb5
      Arnd Bergmann 提交于
      It is no longer possible to build BT_HCIUART into the kernel
      when SERIAL_DEV_BUS is a loadable module, even if none of the
      SERIAL_DEV_BUS based implementations are selected:
      
      drivers/bluetooth/hci_ldisc.o: In function `hci_uart_set_flow_control':
      hci_ldisc.c:(.text+0xb40): undefined reference to `serdev_device_set_flow_control'
      hci_ldisc.c:(.text+0xb5c): undefined reference to `serdev_device_set_tiocm'
      
      This adds a dependency to avoid the broken configuration.
      
      Fixes: 7841d554 ("Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      05e89fb5
  6. 10 10月, 2017 1 次提交
    • J
      Bluetooth: avoid silent hci_bcm ACPI PM regression · 4294625e
      Johan Hovold 提交于
      The hci_bcm platform-device hack which was used to implement
      power management for ACPI devices is being replaced by a
      serial-device-bus implementation.
      
      Unfortunately, when the corresponding change to the ACPI code lands (a
      change that will stop enumerating and registering the serial-device-node
      child as a platform device) PM will break silently unless serdev
      TTY-port controller support has been enabled. Specifically, hciattach
      (btattach) would still succeed, but power management would no longer
      work.
      
      Although this is strictly a runtime dependency, let's make the driver
      depend on SERIAL_DEV_CTRL_TTYPORT, which is the particular serdev
      controller implementation used by the ACPI devices currently managed by
      this driver, to avoid breaking PM without anyone noticing.
      
      Note that the driver already has a (build-time) dependency on the serdev
      bus code.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      4294625e
  7. 18 8月, 2017 1 次提交
  8. 25 7月, 2017 1 次提交
  9. 18 5月, 2017 2 次提交
    • T
      Bluetooth: hci_nokia: select BT_HCIUART_H4 · c42c88e6
      Tobias Regnery 提交于
      We see the following build failure with CONFIG_BT_HCIUART_NOKIA=y and
      CONFIG_BT_HCIUART_H4=n:
      
      drivers/bluetooth/hci_nokia.c: In function 'nokia_recv':
      drivers/bluetooth/hci_nokia.c:644:18: error: implicit declaration of function 'h4_recv_buf' [-Werror=implicit-function-declaration]
      ...
      
      Fix this by selecting the BT_HCIUART_H4 symbol like all the other users
      of the protocoll.
      
      Fixes: 7bb31868 ("Bluetooth: add nokia driver")
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Reviewed-by: NSebastian Reichel <sre@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c42c88e6
    • T
      Bluetooth: hci_uart: fix kconfig dependency · 76c4969f
      Tobias Regnery 提交于
      We see the following link error with CONFIG_BT_HCIUART=y,
      CONFIG_BT_HCIUART_LL=y and CONFIG_SERIAL_DEV_BUS=m:
      
      drivers/built-in.o: In function 'll_close':
      supp.c:(.text+0x55add4): undefined reference to 'serdev_device_close'
      supp.c:(.text+0x55add4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_close'
      drivers/built-in.o: In function 'll_open':
      supp.c:(.text+0x55aed0): undefined reference to 'serdev_device_open'
      supp.c:(.text+0x55aed0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_open'
      drivers/built-in.o: In function `hci_ti_probe':
      supp.c:(.text+0x55b00c): undefined reference to 'hci_uart_register_device'
      supp.c:(.text+0x55b00c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'hci_uart_register_device'
      drivers/built-in.o: In function `ll_setup':
      supp.c:(.text+0x55b08c): undefined reference to 'serdev_device_set_flow_control'
      supp.c:(.text+0x55b08c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_flow_control'
      supp.c:(.text+0x55b324): undefined reference to 'serdev_device_set_baudrate'
      supp.c:(.text+0x55b324): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_baudrate'
      drivers/built-in.o: In function 'll_init':
      supp.c:(.init.text+0x1b508): undefined reference to '__serdev_device_driver_register'
      supp.c:(.init.text+0x1b508): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol '__serdev_device_driver_register'
      
      Fix this by dependig BT_HCIUART_LL on the BT_HCIUART_SERDEV symbol.
      This implies a dependency on BT_HCIUART and hci_ll.c is only compiled in
      if SERIAl_DEV_BUS is built in or SERIAL_DEV_BUS and BT_HCIUART are
      modules.
      
      Fixes: 37180552 ("bluetooth: hci_uart: add LL protocol serdev driver support")
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      76c4969f
  10. 22 4月, 2017 1 次提交
    • A
      Bluetooth: try to improve CONFIG_SERIAL_DEV_BUS dependency · 1fb78fb6
      Arnd Bergmann 提交于
      With CONFIG_SERIAL_DEV_BUS=m, the hci_serdev.o file does not actually
      get built into hci_uart.o as the Makefile doesn't pick it up, leading
      to a link error with anything referring to it:
      
      ERROR: "hci_uart_register_device" [drivers/bluetooth/hci_nokia.ko] undefined!
      scripts/Makefile.modpost:91: recipe for target '__modpost' failed
      
      Changing this in the Makefile would cause another problem when
      hci_uart itself is built-in and cannot reference symbols from the
      serdev module.
      
      This tries to address both problems by introducing a new hidden
      Kconfig symbol that controls both the compilation of hci_serdev.o
      and whether the Nokia driver can be selected. This seems to address
      the problem for me, though there might be a better way to do it.
      
      Fixes: 7bb31868 ("Bluetooth: add nokia driver")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      1fb78fb6
  11. 13 4月, 2017 1 次提交
  12. 29 3月, 2017 1 次提交
  13. 23 3月, 2017 1 次提交
  14. 17 2月, 2017 1 次提交
  15. 20 9月, 2016 3 次提交
  16. 24 2月, 2016 1 次提交
  17. 21 10月, 2015 2 次提交
    • A
      Bluetooth: bpa10x: fix BT_HCIUART dependency · 7841d06e
      Arnd Bergmann 提交于
      The change to bpa10x to use the h4_recv_buf helper added a dependency
      on BT_HCIUART. This was incorrectly added to Kconfig by adding a
      'select' statement, which now in turn causes build failures
      when CONFIG_TTY is not set:
      
      warning: (BT_HCIBPA10X) selects BT_HCIUART which has unmet direct dependencies (NET && BT && TTY)
      vers/built-in.o: In function `hci_uart_tty_receive':
      fpga-mgr.c:(.text+0x282824): undefined reference to `tty_unthrottle'
      drivers/built-in.o: In function `hci_uart_tty_ioctl':
      fpga-mgr.c:(.text+0x282aa0): undefined reference to `n_tty_ioctl_helper'
      drivers/built-in.o: In function `hci_uart_flush':
      
      This replaces the 'select BT_HCIUART' dependency with 'depends on', which
      does not have this kind of problem. Alternatively, one could add 'depends
      on TTY', but avoiding 'select' on user-visible options is generally the
      preferred choice as that does not introduce the potential for dependency
      loops or incomplete dependency chains.
      
      Fixes: 91489919 ("Bluetooth: bpa10x: Fix missing BT_HCIUART dependency")
      Fixes: 943cc592 ("Bluetooth: bpa10x: Use h4_recv_buf helper for frame reassembly")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7841d06e
    • M
      Bluetooth: bpa10x: Fix missing BT_HCIUART dependency · 91489919
      Marcel Holtmann 提交于
      Selecting just BT_HCIUART_H4 is not enough and it also needs to select
      BT_HCIUART to avoid this warning:
      
      warning: (BT_HCIBPA10X) selects BT_HCIUART_H4 which has unmet direct
      dependencies (NET && BT && BT_HCIUART)
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      91489919
  18. 08 10月, 2015 1 次提交
  19. 04 10月, 2015 1 次提交
    • L
      Bluetooth: btintel: Add iBT register access over HCI support · d06f107b
      Loic Poulain 提交于
      Add regmap ibt to support Intel Bluetooth silicon register access
      over HCI. Intel BT/FM combo chip allows to read/write some registers
      (e.g. FM registers) via its HCI interface.
      
      Read/Write operations are performed via a HCI transaction composed of
      a HCI command (host->controller) followed by a HCI command complete
      event (controller->host). Read/Write Command opcodes can be specified
      to the regmap init function.
      We define data formats which are intel/vendor specific.
      
      Register Read/Write HCI command payload (Host):
      Field: | REG ADDR | MODE | DATA_LEN | DATA... |
      size:  |   32b    |  8b  |    8b    |  8b*    |
      
      Register Read HCI command complete event payload (Controller):
      Field: | CMD STATUS | REG ADDR | DATA... |
      size:  |     8b     |   32b    |  8b*    |
      
      Register Write HCI command complete event payload (Controller):
      Field: | CMD_STATUS |
      size:  |     8b     |
      
      Since this payload is HCI encapsulated, Little Endian byte order is
      used.
      
      Write/Read Example:
      
      If we write 0x0000002a at address 0x00008c04, with opcode_write 0xfc5d,
      The resulting transaction is (btmon trace):
      
      < HCI Command (0x3f|0x005d) plen 10 [hci0]
              04 8c 00 00 02 04 2a 00 00 00
      > HCI Event (0x0e) plen 4
            Unknown (0x3f|0x005d) ncmd 1
              00
      
      Then, if we read the same register with opcode_read 0xfc5e:
      
      < HCI Command (0x3f|0x005e) plen 6 [hci0]
              04 8c 00 00 02 04
      > HCI Event (0x0e) plen 12 [hci0]
            Unknown (0x3f|0x005e) ncmd 1
              00 04 8c 00 00 2a 00 00 00
      Signed-off-by: NLoic Poulain <loic.poulain@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      d06f107b
  20. 22 9月, 2015 1 次提交
  21. 11 8月, 2015 2 次提交
  22. 23 7月, 2015 1 次提交
  23. 14 5月, 2015 1 次提交
  24. 08 4月, 2015 11 次提交