1. 30 4月, 2018 1 次提交
  2. 02 4月, 2018 1 次提交
  3. 01 4月, 2018 1 次提交
    • V
      Bluetooth: btusb: Add USB ID 7392:a611 for Edimax EW-7611ULB · a41e0796
      Vicente Bergas 提交于
      This WiFi/Bluetooth USB dongle uses a Realtek chipset, so, use btrtl for it.
      
      Product information:
      https://wikidevi.com/wiki/Edimax_EW-7611ULB
      
      From /sys/kernel/debug/usb/devices
      T:  Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
      D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=7392 ProdID=a611 Rev= 2.00
      S:  Manufacturer=Realtek
      S:  Product=Edimax Wi-Fi N150 Bluetooth4.0 USB Adapter
      S:  SerialNumber=00e04c000001
      C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
      A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01
      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= 512 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 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#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8723bu
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=500us
      E:  Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Tested-by: NVicente Bergas <vicencb@gmail.com>
      Signed-off-by: NVicente Bergas <vicencb@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a41e0796
  4. 16 3月, 2018 1 次提交
    • T
      Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174 · f44cb4b1
      Takashi Iwai 提交于
      The Atheros 1525/QCA6174 BT doesn't seem working properly on the
      recent kernels, as it tries to load a wrong firmware
      ar3k/AthrBT_0x00000200.dfu and it fails.
      
      This seems to have been a problem for some time, and the known
      workaround is to apply BTUSB_QCA_ROM quirk instead of BTUSB_ATH3012.
      
      The device in question is:
      
      T: Bus=01 Lev=01 Prnt=01 Port=09 Cnt=03 Dev#=  4 Spd=12   MxCh= 0
      D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P: Vendor=0cf3 ProdID=3004 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
      
      Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1082504Reported-by: NIvan Levshin <ivan.levshin@microfocus.com>
      Tested-by: NIvan Levshin <ivan.levshin@microfocus.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f44cb4b1
  5. 02 3月, 2018 2 次提交
  6. 26 2月, 2018 1 次提交
    • H
      Bluetooth: btusb: Use DMI matching for QCA reset_resume quirking · 1fdb9269
      Hans de Goede 提交于
      Commit 61f5acea ("Bluetooth: btusb: Restore QCA Rome suspend/resume fix
      with a "rewritten" version") applied the USB_QUIRK_RESET_RESUME to all QCA
      USB Bluetooth modules. But it turns out that the resume problems are not
      caused by the QCA Rome chipset, on most platforms it resumes fine. The
      resume problems are actually a platform problem (likely the platform
      cutting all power when suspended).
      
      The USB_QUIRK_RESET_RESUME quirk also disables runtime suspend, so by
      matching on usb-ids, we're causing all boards with these chips to use extra
      power, to fix resume problems which only happen on some boards.
      
      This commit fixes this by applying the quirk based on DMI matching instead
      of on usb-ids, so that we match the platform and not the chipset.
      
      Here is the /sys/kernel/debug/usb/devices for the Bluetooth module:
      
      T:  Bus=01 Lev=01 Prnt=01 Port=07 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=0cf3 ProdID=e300 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
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
      Fixes: 61f5acea ("Bluetooth: btusb: Restore QCA Rome suspend/resume..")
      Cc: stable@vger.kernel.org
      Cc: Brian Norris <briannorris@chromium.org>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Reported-and-tested-by: NKevin Fenzi <kevin@scrye.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      1fdb9269
  7. 12 2月, 2018 1 次提交
  8. 07 2月, 2018 1 次提交
    • T
      Bluetooth: btusb: Add support for Intel Bluetooth device 22560 [8087:0026] · 1ce0cec1
      Tedd Ho-Jeong An 提交于
      The Intel Bluetooth device 22560 family (HarrisonPeak, QnJ, and IcyPeak)
      use the same firmware loading mechanism as previous generation,
      so include new USB product ID and whitelist the hardware variant.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0026 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=  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
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      1ce0cec1
  9. 25 1月, 2018 4 次提交
  10. 09 1月, 2018 2 次提交
    • H
      Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version · 61f5acea
      Hans de Goede 提交于
      Commit 7d06d589 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"")
      removed the setting of the BTUSB_RESET_RESUME quirk for QCA Rome devices,
      instead favoring adding USB_QUIRK_RESET_RESUME quirks in usb/core/quirks.c.
      
      This was done because the DIY BTUSB_RESET_RESUME reset-resume handling
      has several issues (see the original commit message). An added advantage
      of moving over to the USB-core reset-resume handling is that it also
      disables autosuspend for these devices, which is similarly broken on these.
      
      But there are 2 issues with this approach:
      1) It leaves the broken DIY BTUSB_RESET_RESUME code in place for Realtek
         devices.
      2) Sofar only 2 of the 10 QCA devices known to the btusb code have been
         added to usb/core/quirks.c and if we fix the Realtek case the same way
         we need to add an additional 14 entries. So in essence we need to
         duplicate a large part of the usb_device_id table in btusb.c in
         usb/core/quirks.c and manually keep them in sync.
      
      This commit instead restores setting a reset-resume quirk for QCA devices
      in the btusb.c code, avoiding the duplicate usb_device_id table problem.
      
      This commit avoids the problems with the original DIY BTUSB_RESET_RESUME
      code by simply setting the USB_QUIRK_RESET_RESUME quirk directly on the
      usb_device.
      
      This commit also moves the BTUSB_REALTEK case over to directly setting the
      USB_QUIRK_RESET_RESUME on the usb_device and removes the now unused
      BTUSB_RESET_RESUME code.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514836
      Fixes: 7d06d589 ("Revert "Bluetooth: btusb: fix QCA...suspend/resume"")
      Cc: stable@vger.kernel.org
      Cc: Leif Liddy <leif.linux@gmail.com>
      Cc: Matthias Kaehlcke <mka@chromium.org>
      Cc: Brian Norris <briannorris@chromium.org>
      Cc: Daniel Drake <drake@endlessm.com>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      61f5acea
    • A
      Bluetooth: btusb: Add support for 0cf3:e010 · e5a49ee9
      AceLan Kao 提交于
      Device 0cf3:e010 is one of the QCA ROME family.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=13 Cnt=03 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=e010 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: NAceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e5a49ee9
  11. 27 12月, 2017 2 次提交
    • K
      Revert "Bluetooth: btusb: fix QCA Rome suspend/resume" · 7d06d589
      Kai-Heng Feng 提交于
      This reverts commit fd865802.
      
      This commit causes a regression on some QCA ROME chips. The USB device
      reset happens in btusb_open(), hence firmware loading gets interrupted.
      
      Furthermore, this commit stops working after commit
      ("a0085f25 Bluetooth: btusb: driver to
      enable the usb-wakeup feature"). Reset-resume quirk only gets enabled in
      btusb_suspend() when it's not a wakeup source.
      
      If we really want to reset the USB device, we need to do it before
      btusb_open(). Let's handle it in drivers/usb/core/quirks.c.
      
      Cc: stable@vger.kernel.org
      Cc: Leif Liddy <leif.linux@gmail.com>
      Cc: Matthias Kaehlcke <mka@chromium.org>
      Cc: Brian Norris <briannorris@chromium.org>
      Cc: Daniel Drake <drake@endlessm.com>
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Tested-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7d06d589
    • 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 01 8月, 2017 1 次提交
  20. 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
  21. 22 7月, 2017 1 次提交
  22. 20 7月, 2017 2 次提交
  23. 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
  24. 14 6月, 2017 1 次提交
  25. 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
  26. 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