1. 27 12月, 2017 1 次提交
    • I
      Bluetooth: Add a new 04ca:3015 QCA_ROME device · 0a03f98b
      Ioan Moldovan 提交于
      This patch adds the 04ca:3015 (from a QCA9377 board) Bluetooth device
      to the btusb blacklist and makes the kernel use the btqca module
      instead of btusb. The patch is necessary because, without it the
      04ca:3015 device defaults to using the btusb driver, which makes the
      WIFI side of the QCA9377 board unusable (obtains 0 MBps in speedtest,
      when the 04ca:3015 bluetooth is used with an audio headset).
      
      /sys/kernel/debug/usb/devices:
      
          T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
          D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
          P:  Vendor=04ca ProdID=3015 Rev= 0.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
          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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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
      Signed-off-by: NIoan Moldovan <ioan.moldovan1999@gmail.com>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      0a03f98b
  2. 13 12月, 2017 1 次提交
    • H
      Bluetooth: btusb: Add a Kconfig option to enable USB autosuspend by default · eff2d68c
      Hans de Goede 提交于
      On many laptops the btusb device is the only USB device not having USB
      autosuspend enabled, this causes not only the HCI but also the USB
      controller to stay awake, together using aprox. 0.4W of power.
      
      Modern ultrabooks idle around 6W (at 50% screen brightness), 3.5W for
      Apollo Lake devices. 0.4W is a significant chunk of this (7 / 11%).
      
      The btusb driver already contains code to allow enabling USB autosuspend,
      but currently leaves it up to the user / userspace to enable it. This
      means that for most people it will not be enabled, leading to an
      unnecessarily high power consumption.
      
      Since enabling it is not entirely without risk of regressions, this
      commit adds a Kconfig option so that Linux distributions can choose to
      enable it by default. This commit also adds a module option so that when
      distros receive bugs they can easily ask the user to disable it again
      for easy debugging.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      eff2d68c
  3. 30 10月, 2017 3 次提交
    • M
      Bluetooth: btusb: Fix isochronous interface assignments · 459232fc
      Marcel Holtmann 提交于
      The recent MacBook's with multi-function USB interfaces for HID and
      Bluetooth operation have the isochronous interface on number 3 instead
      of number 1. Store the interface number and use it.
      
      P:  Vendor=05ac ProdID=8290 Rev= 1.40
      S:  Manufacturer=Broadcom Corp.
      S:  Product=Bluetooth USB Host Controller
      C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=  0mA
      A:  FirstIf#= 2 IfCount= 4 Cls=ff(vend.) Sub=01 Prot=01
      I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
      E:  Ad=85(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
      I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
      E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
      I:* If#= 2 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#= 3 Alt= 0 #EPs= 2 Cls=e0(wlcon) 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#= 3 Alt= 1 #EPs= 2 Cls=e0(wlcon) 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#= 3 Alt= 2 #EPs= 2 Cls=e0(wlcon) 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#= 3 Alt= 3 #EPs= 2 Cls=e0(wlcon) 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#= 3 Alt= 4 #EPs= 2 Cls=e0(wlcon) 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#= 3 Alt= 5 #EPs= 2 Cls=e0(wlcon) 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#= 4 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#= 5 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      459232fc
    • J
      Bluetooth: btusb: Update firmware filename for Intel 9x60 and later · af3715e5
      Jaya P G 提交于
      The format of Intel Bluetooth firmware for bootloader product is
      ibt-<hw_variant>-<device_revision_id>.sfi and .ddc.
      
      But for the SKU's 9x60, there a 3 variants of FW, which cannot be
      differentiated just with hw_variant and devision_revision_id.
      So to pick the appropriate FW file for 9x60 SKU's, it will be
      differentiated using hw_variant, hw_revision and fw_revision rather
      than hw_variant and device_revision_id only.
      
      Format will be like this:
      ibt-<hw_variant>-<hw_revision>-<fw_revision>.sfi and .ddc
      Signed-off-by: NJaya P G <jaya.p.g@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      af3715e5
    • M
      Bluetooth: Use bt_dev_err and bt_dev_info when possible · 2064ee33
      Marcel Holtmann 提交于
      In case of using BT_ERR and BT_INFO, convert to bt_dev_err and
      bt_dev_info when possible. This allows for controller specific
      reporting.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      2064ee33
  4. 29 10月, 2017 1 次提交
    • B
      Bluetooth: btusb: Add new NFA344A entry. · 858ff38a
      Bartosz Chronowski 提交于
      This change allows proper low power mode entry in suspend.
      
      /sys/kernel/debug/usb/devices entry:
      T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#=  3 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0489 ProdID=e09f Rev= 0.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
      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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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=e0(wlcon) 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
      Signed-off-by: NBartosz Chronowski <ext.bartosz.chronowski@tieto.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      858ff38a
  5. 14 10月, 2017 1 次提交
    • H
      Revert "Bluetooth: btusb: Add workaround for Broadcom devices without product id" · 2d13e347
      Hans de Goede 提交于
      Commit 9834e586 ("Bluetooth: btusb: Add workaround for Broadcom devices
      without product id") was added to deal with the BT part of the BCM4356A2
      on GPD pocket laptops having an usb vid:pid of 0000:0000.
      
      After another commit to add support for the BCM UART connected BT ACPI-id
      BCM2E7E used on the GPD win, it turns out that the BT on the GPD pocket is
      connected via both USB and UART. Adding support for the BCM2E7E ACPI-id
      causes it to switch to UART mode.
      
      The Windows shipped with the device is using it in UART mode and the
      presence of the BCM2E7E ACPI-id combined with the all 0 USB vid:pid
      indicates that the BT part was never meant to be used in USB mode.
      
      With the recent patches to use serdev device enumeration / instantiation
      for UART attached ACPI enumerated BT devices, everything work OOTB in UART
      mode and the workaround for the all 0 USB vid:pid is no longer needed.
      
      This reverts commit 9834e586 ("Bluetooth: btusb: Add workaround for
      Broadcom devices without product id").
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2d13e347
  6. 16 8月, 2017 1 次提交
    • S
      Bluetooth: btusb: driver to enable the usb-wakeup feature · a0085f25
      Sukumar Ghorai 提交于
      BT-Controller connected as platform non-root-hub device and
      usb-driver initialize such device with wakeup disabled,
      Ref. usb_new_device().
      
      At present wakeup-capability get enabled by hid-input device from usb
      function driver(e.g. BT HID device) at runtime. Again some functional
      driver does not set usb-wakeup capability(e.g LE HID device implement
      as HID-over-GATT), and can't wakeup the host on USB.
      
      Most of the device operation (such as mass storage) initiated from host
      (except HID) and USB wakeup aligned with host resume procedure. For BT
      device, usb-wakeup capability need to enable form btusc driver as a
      generic solution for multiple profile use case and required for USB remote
      wakeup (in-bus wakeup) while host is suspended. Also usb-wakeup feature
      need to enable/disable with HCI interface up and down.
      Signed-off-by: NSukumar Ghorai <sukumar.ghorai@intel.com>
      Signed-off-by: NAmit K Bag <amit.k.bag@intel.com>
      Acked-by: NOliver Neukum <oneukum@suse.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a0085f25
  7. 15 8月, 2017 1 次提交
    • M
      Bluetooth: btusb: Add workaround for Broadcom devices without product id · 9834e586
      Marcel Holtmann 提交于
      The GPD Pocket is shipping with a BCM2045 USB HCI with its vendor and
      product information set to 0000:0000 and also has its interface class
      set to 255 (Vendor Specific Class). Luckily it does advertise usable
      manufacturer and product strings.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0000 ProdID=0000 Rev= 1.12
      S:  Manufacturer=Broadcom Corp
      S:  Product=BCM2045A0
      S:  SerialNumber=AC83F30677CB
      C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=100mA
      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=(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)
      Reported-by: NChristopher Williamson <home@chrisaw.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      9834e586
  8. 08 8月, 2017 1 次提交
    • D
      Bluetooth: Add support of 13d3:3494 RTL8723BE device · a81d72d2
      Dmitry Tunin 提交于
      T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#= 4 Spd=12 MxCh= 0
      D: Ver= 2.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
      P: Vendor=13d3 ProdID=3494 Rev= 2.00
      S: Manufacturer=Realtek
      S: Product=Bluetooth Radio
      S: SerialNumber=00e04c000001
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=81(I) Atr=03(Int.) MxPS= 16 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
      Signed-off-by: NDmitry Tunin <hanipouspilot@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org
      a81d72d2
  9. 01 8月, 2017 1 次提交
  10. 25 7月, 2017 1 次提交
    • J
      Bluetooth: btusb: Fix memory leak in play_deferred · 19cfe912
      Jeffy Chen 提交于
      Currently we are calling usb_submit_urb directly to submit deferred tx
      urbs after unanchor them.
      
      So the usb_giveback_urb_bh would failed to unref it in usb_unanchor_urb
      and cause memory leak:
      unreferenced object 0xffffffc0ce0fa400 (size 256):
      ...
        backtrace:
          [<ffffffc00034a9a8>] __save_stack_trace+0x48/0x6c
          [<ffffffc00034b088>] create_object+0x138/0x254
          [<ffffffc0009d5504>] kmemleak_alloc+0x58/0x8c
          [<ffffffc000345f78>] __kmalloc+0x1d4/0x2a0
          [<ffffffc0006765bc>] usb_alloc_urb+0x30/0x60
          [<ffffffbffc128598>] alloc_ctrl_urb+0x38/0x120 [btusb]
          [<ffffffbffc129e7c>] btusb_send_frame+0x64/0xf8 [btusb]
      
      Put those urbs in tx_anchor to avoid the leak, and also fix the error
      handling.
      Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
      Reviewed-by: NOliver Neukum <oneukum@suse.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      19cfe912
  11. 22 7月, 2017 1 次提交
  12. 20 7月, 2017 2 次提交
  13. 16 6月, 2017 3 次提交
    • J
      networking: add and use skb_put_u8() · 634fef61
      Johannes Berg 提交于
      Joe and Bjørn suggested that it'd be nicer to not have the
      cast in the fairly common case of doing
      	*(u8 *)skb_put(skb, 1) = c;
      
      Add skb_put_u8() for this case, and use it across the code,
      using the following spatch:
      
          @@
          expression SKB, C, S;
          typedef u8;
          identifier fn = {skb_put};
          fresh identifier fn2 = fn ## "_u8";
          @@
          - *(u8 *)fn(SKB, S) = C;
          + fn2(SKB, C);
      
      Note that due to the "S", the spatch isn't perfect, it should
      have checked that S is 1, but there's also places that use a
      sizeof expression like sizeof(var) or sizeof(u8) etc. Turns
      out that nobody ever did something like
      	*(u8 *)skb_put(skb, 2) = c;
      
      which would be wrong anyway since the second byte wouldn't be
      initialized.
      Suggested-by: NJoe Perches <joe@perches.com>
      Suggested-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      634fef61
    • J
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions (skb_put, __skb_put and pskb_put) return void *
      and remove all the casts across the tree, adding a (u8 *) cast only
      where the unsigned char pointer was used directly, all done with the
      following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_put, __skb_put };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_put, __skb_put };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
      which actually doesn't cover pskb_put since there are only three
      users overall.
      
      A handful of stragglers were converted manually, notably a macro in
      drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
      instances in net/bluetooth/hci_sock.c. In the former file, I also
      had to fix one whitespace problem spatch introduced.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4df864c1
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  14. 14 6月, 2017 1 次提交
  15. 18 5月, 2017 1 次提交
    • T
      Bluetooth: Add support for Intel Bluetooth device 9460/9560 [8087:0aaa] · 86a6129a
      Tedd Ho-Jeong An 提交于
      This patch adds support for Intel Bluetooth device 9460/9560 also known
      as Jefferson Peak (JfP). The firmware downloading mechanism is same as
      previous generation. So include the new USB product identifier and
      whitelist the hardware variant.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  5 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0aaa 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
      
      Bootloader version:
      < HCI Command: Intel Read Version (0x3f|0x0005) plen 0
      > HCI Event: Command Complete (0x0e) plen 13
            Intel Read Version (0x3f|0x0005) ncmd 32
              Status: Success (0x00)
              Hardware platform: 0x37
              Hardware variant: 0x11
              Hardware revision: 0.0
              Firmware variant: 0x06
              Firmware revision: 0.1
              Firmware build: 42-52.2015
              Firmware patch: 0
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      86a6129a
  16. 13 4月, 2017 4 次提交
    • J
      Bluetooth: btusb: wake system up when receives a wake irq · 017789f3
      Jeffy Chen 提交于
      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: NJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      017789f3
    • G
      1eef1c35
    • M
      Bluetooth: btusb: Add support for Intel Bluetooth devices 9160/9260 [8087:0025] · de766142
      Marcel Holtmann 提交于
      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 <jaya.p.g@linux.intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Tested-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      de766142
    • T
      Bluetooth: Use switch statement for Intel hardware variants · 9268834b
      Tedd Ho-Jeong An 提交于
      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: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      9268834b
  17. 17 2月, 2017 6 次提交
    • D
      Bluetooth: Add another AR3012 04ca:3018 device · 441ad62d
      Dmitry Tunin 提交于
      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: NDmitry Tunin <hanipouspilot@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org
      441ad62d
    • W
      Bluetooth: btusb: Add support for 413c:8143 · fdfddc60
      Wen-chien Jesse Sung 提交于
      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: NWen-chien Jesse Sung <jesse.sung@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fdfddc60
    • R
      Bluetooth: btusb: Configure Marvell to use one of the pins for oob wakeup · a4ccc9e3
      Rajat Jain 提交于
      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: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a4ccc9e3
    • R
      Bluetooth: btusb: Add out-of-band wakeup support · fd913ef7
      Rajat Jain 提交于
      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: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fd913ef7
    • R
      Bluetooth: btusb: Use an error label for error paths · 10ab133b
      Rajat Jain 提交于
      Use a label to remove the repetetive cleanup, for error cases.
      Signed-off-by: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      10ab133b
    • C
      Bluetooth: btusb: add support for 0bb4:0306 · a57bac43
      Christoph Haag 提交于
      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: NChristoph Haag <haagch@frickel.club>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a57bac43
  18. 07 10月, 2016 1 次提交
    • E
      Bluetooth: btusb: Fix atheros firmware download error · c7e163fe
      Ethan Hsieh 提交于
      Move usb_autopm_get_interface() ahead of setup_on_usb() to prevent
      device from sending usb control message in usb suspend mode.
      
      The error message is as below:
      
      [   83.944103] btusb 1-2:1.1: usb_suspend_interface: status 0
      [   83.944107] btusb 1-2:1.0: usb_suspend_interface: status 0
      [   83.960132] usb 1-2: usb auto-suspend, wakeup 0
      [   83.976156] usb 1-2: usb_suspend_device: status 0
      [   83.976162] usb 1-2: usb_suspend_both: status 0
      [  298.689106] Bluetooth: hci0
      [  298.689399] Bluetooth: hci0: Failed to access otp area (-113)
      Signed-off-by: NEthan Hsieh <ethan.hsieh@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c7e163fe
  19. 06 10月, 2016 1 次提交
  20. 22 9月, 2016 1 次提交
  21. 20 9月, 2016 3 次提交
    • S
      Bluetooth: btusb: Mark CW6622 devices to have broken link key commands · 418678b0
      Szymon Janc 提交于
      Conwise CW6622 seems to have a problem with the stored link key
      commands so just mark it as broken.
      
      < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0
      > HCI Event: Command Complete (0x0e) plen 12
          Read Local Supported Features (0x04|0x0003) ncmd 1
          status 0x00
          Features: 0xff 0x3e 0x85 0x38 0x18 0x18 0x00 0x00
      < 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 0x00
          HCI Version: 2.0 (0x3) HCI Revision: 0x1f4
          LMP Version: 2.0 (0x3) LMP Subversion: 0x1f4
          Manufacturer: CONWISE Technology Corporation Ltd (66)
      ...
      < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0
      > HCI Event: Command Complete (0x0e) plen 68
          Read Local Supported Commands (0x04|0x0002) ncmd 1
          status 0x00
          Commands: 7fffef03cedfffffffffff1ff20ff8ff3f
      ...
      < HCI Command: Read Stored Link Key (0x03|0x000d) plen 7
          bdaddr 00:00:00:00:00:00 all 1
      > HCI Event: Command Complete (0x0e) plen 8
          Read Stored Link Key (0x03|0x000d) ncmd 1
          status 0x11 max 0 num 0
          Error: Unsupported Feature or Parameter Value
      Signed-off-by: NSzymon Janc <szymon.janc@codecoup.pl>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      418678b0
    • K
      Bluetooth: btusb: Add support for 0cf3:e009 · 93519934
      Kai-Heng Feng 提交于
      Device 0cf3:e009 is one of the QCA ROME family.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#=  4 Spd=12  MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0cf3 ProdID=e009 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: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      93519934
    • B
      Bluetooth: btusb, hci_intel: Fix wait_on_bit_timeout() return value checks · f0a70a04
      Bart Van Assche 提交于
      wait_on_bit_timeout() returns one of the following three values:
      * 0 to indicate success.
      * -EINTR to indicate that a signal has been received;
      * -EAGAIN to indicate timeout;
      Make the wait_on_bit_timeout() callers check for these values.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f0a70a04
  22. 12 7月, 2016 1 次提交
  23. 10 7月, 2016 1 次提交
    • M
      Bluetooth: Rename HCI_BREDR into HCI_PRIMARY · ca8bee5d
      Marcel Holtmann 提交于
      The HCI_BREDR naming is confusing since it actually stands for Primary
      Bluetooth Controller. Which is a term that has been used in the latest
      standard. However from a legacy point of view there only really have
      been Basic Rate (BR) and Enhanced Data Rate (EDR). Recent versions of
      Bluetooth introduced Low Energy (LE) and made this terminology a little
      bit confused since Dual Mode Controllers include BR/EDR and LE. To
      simplify this the name HCI_PRIMARY stands for the Primary Controller
      which can be a single mode or dual mode controller.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      ca8bee5d
  24. 08 7月, 2016 2 次提交
    • Y
      Bluetooth: btusb: add support for device 0489:e092 · 47ca5898
      Yvain THONNART 提交于
      With current btusb.ko kernel module, Bluetooth pretends to be active
      but there is no real activity.
      
      I'm using an Acer Aspire VN7-791.
      
      Output of lsusb:
      Bus 003 Device 007: ID 0489:e092 Foxconn / Hon Hai
      
      On my laptop, this device is actually used as a combo with wifi chipset
      Atheros Qualcomm Killer N1525 Wireless-AC [168c:003e],
      
      * Fix by adding a declaration in kernel sources drivers/bluetooth/btusb.c
      
              { USB_DEVICE(0x0489, 0xe092), .driver_info = BTUSB_QCA_ROME },
      
      * Compiled extra module /lib/modules/4.4.0-22-generic/extra/btusb.ko
      
      * Successfully tested against my phone (obex file transfer)
      Signed-off-by: NYvain THONNART <yvain.thonnart@m4x.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      47ca5898
    • T
      Bluetooth: Replace constant hw_variant from Intel Bluetooth firmware filename · 230b04ac
      Tedd Ho-Jeong An 提交于
      The format of Intel Bluetooth firmware filename for bootloader product
      is ibt-<hw_variant>-<device_revision_id>.sfi
      
      Currently the driver uses a constant value 11 (0x0b) for hw_variant
      to support LnP/SfP product. But new product like WsP product has
      a different value such as 12 (0x0c).
      
      To support the multiple products, this patch replaces the constant
      value of hw_variant to the actual hw_variant value read from
      the device.
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      230b04ac