aboutsummaryrefslogtreecommitdiff
path: root/drivers/bluetooth
AgeCommit message (Collapse)AuthorFilesLines
2017-04-22Bluetooth: hci_ldisc: Add missing return in hci_uart_init_work()Dean Jenkins1-0/+1
If hci_register_dev() returns an error in hci_uart_init_work() then the HCI_UART_REGISTERED bit gets erroneously set due to a missing return statement. Therefore, add the missing return statement. The consequence of the missing return is that the HCI UART is not registered but HCI_UART_REGISTERED is set which allows the code to think that hu->hdev is safe to access but hu->hdev has been freed so could lead to a crash. Signed-off-by: Dean Jenkins <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-22Bluetooth: try to improve CONFIG_SERIAL_DEV_BUS dependencyArnd Bergmann2-2/+8
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: 7bb318680e86 ("Bluetooth: add nokia driver") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-22Bluetooth: hci_ll: Fix NULL pointer deref on FW upload failureSebastian Reichel1-2/+1
Avoid NULL pointer dereference occurring due to freeing skb containing an error pointer. It can easily be triggered by using the driver with broken uart (i.e. due to misconfigured pinmuxing). Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support") Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-13bluetooth: hci_uart: add LL protocol serdev driver supportRob Herring1-1/+261
Turns out that the LL protocol and the TI-ST are the same thing AFAICT. The TI-ST adds firmware loading, GPIO control, and shared access for NFC, FM radio, etc. For now, we're only implementing what is needed for BT. This mirrors other drivers like BCM and Intel, but uses the new serdev bus. The firmware loading is greatly simplified by using existing infrastructure to send commands. It may be a bit slower than the original code using synchronous functions, but the real bottleneck is likely doing firmware load at 115.2kbps. Signed-off-by: Rob Herring <[email protected]> Cc: Marcel Holtmann <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Johan Hedberg <[email protected]> Cc: [email protected] Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-13bluetooth: hci_uart: remove unused hci_uart_init_ttyRob Herring2-20/+0
There are no users of hci_uart_init_tty, so remove it. Signed-off-by: Rob Herring <[email protected]> Cc: Marcel Holtmann <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Johan Hedberg <[email protected]> Cc: [email protected] Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-13Bluetooth: add nokia driverSebastian Reichel3-0/+834
This adds a driver for the Nokia H4+ protocol, which is used at least on the Nokia N9, N900 & N950. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_serdev: allow modular driversSebastian Reichel2-0/+2
For bluetooth protocol driver only supporting serdev it makes sense to follow common practice and built them into their own module. Such modules need access to hci_uart_register_device and hci_uart_tx_wakeup for using the common protocol helpers. Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_serdev: do not open device in hci openSebastian Reichel1-9/+3
The device driver may need to communicate with the UART device while the Bluetooth device is closed (e.g. due to interrupts). Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_uart: add serdev driver support libraryRob Herring3-0/+366
This adds library functions for serdev based BT drivers. This is largely copied from hci_ldisc.c and modified to use serdev calls. There's a little bit of duplication, but I avoided intermixing this as the ldisc code should eventually go away. Signed-off-by: Rob Herring <[email protected]> Cc: Marcel Holtmann <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Johan Hedberg <[email protected]> Cc: [email protected] Acked-by: Pavel Machek <[email protected]> [Fix style issues reported by Pavel] Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_uart: add support for word alignmentSebastian Reichel3-0/+24
This will be used by Nokia's H4+ protocol, which uses 2-byte aligned packets. Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity checkXinming Hu1-5/+3
Sanity check of interrupt number in interrupt handler is unnecessary and confusion, remove it. Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure pathXinming Hu1-0/+7
Host sleep handshake with device might been fail, disable platform wakeup interrupt in this case. Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_intel: add missing tty-device sanity checkJohan Hovold1-1/+12
Make sure to check the tty-device pointer before looking up the sibling platform device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: 74cdad37cd24 ("Bluetooth: hci_intel: Add runtime PM support") Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver") Cc: stable <[email protected]> # 4.3 Cc: Loic Poulain <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_bcm: add missing tty-device sanity checkJohan Hovold1-1/+4
Make sure to check the tty-device pointer before looking up the sibling platform device to avoid dereferencing a NULL-pointer when the tty is one end of a Unix98 pty. Fixes: 0395ffc1ee05 ("Bluetooth: hci_bcm: Add PM for BCM devices") Cc: stable <[email protected]> # 4.3 Cc: Frederic Danis <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btmrvl: cleanup code in return from btmrvl_sdio_suspend()prasanna karthik1-3/+3
Else is not generally useful after a break or return Signed-off-by: Prasanna Karthik <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_bcm: Support platform enumerationAndy Shevchenko1-17/+33
Until now the driver supports only ACPI enumeration. Nevertheless Intel Edison SoM has Broadcom Wi-Fi + BT chip and neither ACPI nor DT enumeration mechanism. Enable pure platform driver in order to support Intel Edison SoM. Cc: Jarkko Nikula <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btmrvl: wake system up when receives a wake irqJeffy Chen1-2/+7
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btusb: wake system up when receives a wake irqJeffy Chen1-0/+2
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btrtl: Change message for missing config fileLarry Finger1-5/+8
The message concerning missing config files for 8723b, 8821a, and 8761a should have been issued with BT_INFO() rather than BT_ERR() as this condition is not fatal. After looking at that code, I have reworked the logic to log such messages only if the device needs such a config file. At the moment, only the 8822b fits that description. Signed-off-by: Larry Finger <[email protected]> Acked-by: 陆朱伟 <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: Added support for Rivet Networks Killer 1535Gabriel1-0/+1
Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_intel: Add support Intel Bluetooth device 9160/9260 for UARTTedd Ho-Jeong An1-0/+1
This patch adds support for Intel Bluetooth device 9160/9260 also known as ThunderPeak(ThP) for UART. Signed-off-by: Tedd Ho-Jeong An <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_intel: Fix firmware file name to use hw_variantTedd Ho-Jeong An1-6/+10
The format of Intel Bluetooth firmware for bootloader product is ibt-<hw_variant>-<device_revision_id>.sfi and .ddc. This patch uses a hw_variant value read from the device during runtime to form the firmware filenames instead of using a constant value, so it can support multiple prouducts. Signed-off-by: Tedd Ho-Jeong An <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btusb: Add support for Intel Bluetooth devices 9160/9260 [8087:0025]Marcel Holtmann1-0/+2
The new Bluetooth devices 9160/9260 (also known as ThunderPeak) devices from Intel use the same firmware loading mechanism as previous generation. So include the new USB product identifier and whitelist the hardware variant. T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 8 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=8087 ProdID=0025 Rev= 0.02 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015 Bluetooth: hci0: Device revision is 2 Bluetooth: hci0: Secure boot is enabled Bluetooth: hci0: OTP lock is disabled Bluetooth: hci0: API lock is disabled Bluetooth: hci0: Debug lock is disabled Bluetooth: hci0: Minimum firmware build 1 week 10 2014 < HCI Command: Read Local Version Information (0x04|0x0001) plen 0 > HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1 Status: Success (0x00) HCI version: Bluetooth 5.0 (0x09) - Revision 256 (0x0100) LMP version: Bluetooth 5.0 (0x09) - Subversion 256 (0x0100) Manufacturer: Intel Corp. (2) Based on original patch from Jaya Praveen G <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]> Tested-by: Tedd Ho-Jeong An <[email protected]> Signed-off-by: Tedd Ho-Jeong An <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: Use switch statement for Intel hardware variantsTedd Ho-Jeong An2-9/+18
Multiple new hardware variants are planned and the simple if statement would get really complicated and unreadable. So instead replace it with a simple switch statement. The change is applied to both USB and UART. Based-on-patch-by: Marcel Holtmann <[email protected]> Signed-off-by: Tedd Ho-Jeong An <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: bluecard: use setup_timerGeliang Tang1-3/+2
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: hci_bcm: Fix clock (un)prepareJohn Keeping1-2/+2
The hci_bcm driver currently does not prepare/unprepare the clock and goes directly to enable, but as the documentation for clk_enable says, clk_prepare must be called before clk_enable. Signed-off-by: John Keeping <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-04-12Bluetooth: btmrvl: fix spelling mistake: "unregester" -> "unregister"Colin Ian King1-1/+1
trivial fix to spelling mistake in debug message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-03-28soc: qcom: smd: Transition client drivers from smd to rpmsgBjorn Andersson2-17/+17
By moving these client drivers to use RPMSG instead of the direct SMD API we can reuse them ontop of the newly added GLINK wire-protocol support found in the 820 and 835 Qualcomm platforms. As the new (RPMSG-based) and old SMD implementations are mutually exclusive we have to change all client drivers in one commit, to make sure we have a working system before and after this transition. Acked-by: Andy Gross <[email protected]> Acked-by: Kalle Valo <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-03-22Bluetooth: btqcomsmd: fix compile-test dependencyArnd Bergmann1-1/+2
compile-testing fails when QCOM_SMD is a loadable module: drivers/bluetooth/built-in.o: In function `btqcomsmd_send': btqca.c:(.text+0xa8): undefined reference to `qcom_smd_send' drivers/bluetooth/built-in.o: In function `btqcomsmd_probe': btqca.c:(.text+0x3ec): undefined reference to `qcom_wcnss_open_channel' btqca.c:(.text+0x46c): undefined reference to `qcom_smd_set_drvdata' This clarifies the dependency to allow compile-testing only when SMD is completely disabled, otherwise the dependency on QCOM_SMD will make sure we can link against it. Fixes: e27ee2b16bad ("Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled") Signed-off-by: Arnd Bergmann <[email protected]> [bjorn: Restructure and clarify dependency to QCOM_WCNSS_CTRL] Signed-off-by: Bjorn Andersson <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-02-19btmrvl: fix spelling mistake: "actived" -> "activated"Colin Ian King1-1/+1
trivial fix to spelling mistake in error message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-18Bluetooth: hci_qca: fix spelling mistake: "Spurrious" -> "Spurious"Colin Ian King1-2/+2
trivial fix to spelling mistake in error message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btmrvl: fix spelling mistake: "caibration" -> "calibration"Colin Ian King1-1/+1
trivial fix to spelling mistake in BT_ERR error message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabledJavier Martinez Canillas1-1/+1
The driver only has runtime but no build time dependency with QCOM_SMD && QCOM_WCNSS_CTRL. So it can be built for testing purposes if COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: Add another AR3012 04ca:3018 deviceDmitry Tunin2-0/+3
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3018 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: Dmitry Tunin <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]> Cc: [email protected]
2017-02-16Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96Daniel Drake1-24/+44
The BCM2E96 ID is used by the ECS EF20 laptop, and BCM2E95 is present in the Weibu F3C. Both are now logged as: hci0: BCM: chip id 82 hci0: BCM43341B0 (002.001.014) build 0000 hci0: BCM (002.001.014) build 0158 The ECS vendor kernel predates the host-wakeup support in hci_bcm but it explicitly has a comment saying that the GPIO assignment needs to be reordered for BCM2E96: 1. (not used in vendor driver) 2. Device wakeup 3. Shutdown For both devices in question, the DSDT has these GPIOs listed in order of GpioInt, GpioIo, GpioIo. And if we use the first one listed (GpioInt) as the host wakeup, that interrupt handler fires while doing bluetooth I/O. I am assuming the convention of GPIO ordering has been changed for these new device IDs, so lets use the new ordering on such devices. Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btbcm: Add a delay for module resetWen-chien Jesse Sung1-0/+3
Some btbcm devices require more time to complete its reset process. They won't reply any hci command until reset is done. [ 17.218554] Bluetooth: hci0 command 0x1001 tx timeout [ 25.214999] Bluetooth: hci0: BCM: Reading local version info failed (-110) Signed-off-by: Wen-chien Jesse Sung <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btusb: Add support for 413c:8143Wen-chien Jesse Sung1-0/+4
This is a Boardcom module and requires patchram to work. T: Bus=01 Lev=03 Prnt=03 Port=01 Cnt=02 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=413c ProdID=8143 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM20702A0 S: SerialNumber=20689D1FAF94 C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none) E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) Signed-off-by: Wen-chien Jesse Sung <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16btmrvl: use dt's irqflags for wakeup pinJeffy Chen1-2/+1
Use irqflags parsed from dt. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16btmrvl: set irq_bt to -1 when failed to parse itJeffy Chen1-0/+1
The irq_of_parse_and_map will return 0 as a invalid irq. Set irq_bt to -1 in this case, so that the btmrvl resume/suspend code would not try to enable/disable it. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16btmrvl: avoid double-disable_irq() raceJeffy Chen1-2/+6
It's much the same as what we did for mwifiex in: b9da4d2 mwifiex: avoid double-disable_irq() race "We have a race where the wakeup IRQ might be in flight while we're calling mwifiex_disable_wake() from resume(). This can leave us disabling the IRQ twice. Let's disable the IRQ and enable it in case if we have double-disabled it." Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btusb: Configure Marvell to use one of the pins for oob wakeupRajat Jain1-0/+51
The Marvell devices may have many gpio pins, and hence for wakeup on these out-of-band pins, the chip needs to be told which pin is to be used for wakeup, using an hci command. Thus, we read the pin number etc from the device tree node and send a command to the chip. Signed-off-by: Rajat Jain <[email protected]> Reviewed-by: Brian Norris <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btusb: Add out-of-band wakeup supportRajat Jain1-0/+85
Some onboard BT chips (e.g. Marvell 8997) contain a wakeup pin that can be connected to a gpio on the CPU side, and can be used to wakeup the host out-of-band. This can be useful in situations where the in-band wakeup is not possible or not preferable (e.g. the in-band wakeup may require the USB host controller to remain active, and hence consuming more system power during system sleep). The oob gpio interrupt to be used for wakeup on the CPU side, is read from the device tree node, (using standard interrupt descriptors). A devcie tree binding document is also added for the driver. The compatible string is in compliance with Documentation/devicetree/bindings/usb/usb-device.txt Signed-off-by: Rajat Jain <[email protected]> Reviewed-by: Brian Norris <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btusb: Use an error label for error pathsRajat Jain1-10/+9
Use a label to remove the repetetive cleanup, for error cases. Signed-off-by: Rajat Jain <[email protected]> Reviewed-by: Brian Norris <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btqcomsmd: Fix module autoloadJavier Martinez Canillas1-0/+1
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias $ After this patch: $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias alias: of:N*T*Cqcom,wcnss-btC* alias: of:N*T*Cqcom,wcnss-bt Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2017-02-16Bluetooth: btusb: add support for 0bb4:0306Christoph Haag1-0/+4
It's a custom USB ID for the broadcom bt adapter in the HTC Vive. T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bb4 ProdID=0306 Rev= 1.12 S: Manufacturer=Broadcom Corp S: Product=BCM2045A0 S: SerialNumber=AC3743E110CE C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) dmesg: Bluetooth: hci0: BCM: chip id 102 Bluetooth: hci0: c-l Bluetooth: hci0: BCM (001.001.005) build 0000 Bluetooth: hci0: BCM (001.001.005) build 0481 Bluetooth: hci0: BCM20703A1 Generic USB 20Mhz fcbga_BU Signed-off-by: Christoph Haag <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2016-12-16Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs updates from Al Viro: - more ->d_init() stuff (work.dcache) - pathname resolution cleanups (work.namei) - a few missing iov_iter primitives - copy_from_iter_full() and friends. Either copy the full requested amount, advance the iterator and return true, or fail, return false and do _not_ advance the iterator. Quite a few open-coded callers converted (and became more readable and harder to fuck up that way) (work.iov_iter) - several assorted patches, the big one being logfs removal * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: logfs: remove from tree vfs: fix put_compat_statfs64() does not handle errors namei: fold should_follow_link() with the step into not-followed link namei: pass both WALK_GET and WALK_MORE to should_follow_link() namei: invert WALK_PUT logics namei: shift interpretation of LOOKUP_FOLLOW inside should_follow_link() namei: saner calling conventions for mountpoint_last() namei.c: get rid of user_path_parent() switch getfrag callbacks to ..._full() primitives make skb_add_data,{_nocache}() and skb_copy_to_page_nocache() advance only on success [iov_iter] new primitives - copy_from_iter_full() and friends don't open-code file_inode() ceph: switch to use of ->d_init() ceph: unify dentry_operations instances lustre: switch to use of ->d_init()
2016-12-16Makefile: drop -D__CHECK_ENDIAN__ from cflagsMichael S. Tsirkin1-2/+0
That's the default now, no need for makefiles to set it. Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Kalle Valo <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Arend van Spriel <[email protected]>
2016-12-08Bluetooth: btmrvl: drop duplicate header slab.hGeliang Tang1-1/+0
Drop duplicate header slab.h from btmrvl_drv.h. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
2016-12-05[iov_iter] new primitives - copy_from_iter_full() and friendsAl Viro1-1/+1
copy_from_iter_full(), copy_from_iter_full_nocache() and csum_and_copy_from_iter_full() - counterparts of copy_from_iter() et.al., advancing iterator only in case of successful full copy and returning whether it had been successful or not. Convert some obvious users. *NOTE* - do not blindly assume that something is a good candidate for those unless you are sure that not advancing iov_iter in failure case is the right thing in this case. Anything that does short read/short write kind of stuff (or is in a loop, etc.) is unlikely to be a good one. Signed-off-by: Al Viro <[email protected]>
2016-11-27Bluetooth: hci_qca: Use setup_timer Kernel API instead of init_timerPrasanna Karthik1-6/+3
Replace init_timer function with setup_timer reported by coccinelle Signed-off-by: Prasanna Karthik <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>