kernel-hacking-2024-linux-s.../drivers
Marcel Holtmann ce6bb9297c Bluetooth: btusb: Handle out of order firmware loading complete event
When loading the Intel firmware it can happen that the firmware loading
complete vendor event arrives before the command complete event for the
last firmware fragment.

< HCI Command: Vendor (0x3f|0x0009) plen 7
        01 02 fc 03 00 00 00
> HCI Event: Vendor (0xff) plen 5
        06 00 00 00 00
> HCI Event: Command Complete (0x0e) plen 4
      Vendor (0x3f|0x0009) ncmd 31
        Status: Success (0x00)

This is mainly caused by the fact that the vendor command and its
command complete event are transported over the bulk endpoints. The
firmware loading complete event however is send over the interrupt
endpoint. So with just bad timing one event arrives before the other.

Currently the code does not account for it. There are precautions for
receiving firmware loading complete event quickly, but not for receiving
it before the command complete.

Introduce an extra flag that tracks when the firmware sending has
completed from the driver point of view and track the completion of
the firmware loading procedure with a different flag. That way the
wakeup can be handled properly.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2015-01-28 21:26:21 +01:00
..
accessibility
acpi netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
amba Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
android
ata More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
atm atm: remove deprecated use of pci api 2015-01-18 00:28:41 -05:00
auxdisplay
base Merge branches 'pm-domains', 'powercap' and 'pm-tools' 2014-12-29 21:24:00 +01:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
block NVMe: Fix locking on abort handling 2015-01-08 09:02:23 -07:00
bluetooth Bluetooth: btusb: Handle out of order firmware loading complete event 2015-01-28 21:26:21 +01:00
bus Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
cdrom
char ipmi: Fix compile warning with tv_usec 2014-12-30 13:34:36 -06:00
clk GMAC: modify CRU config for Rockchip RK3288 SoCs integrated GMAC 2014-12-31 19:14:18 -05:00
clocksource Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-06 22:29:20 -05:00
connector
coresight
cpufreq Merge branches 'pm-cpufreq' and 'pm-cpuidle' 2014-12-29 21:23:41 +01:00
cpuidle Merge branches 'pm-cpufreq' and 'pm-cpuidle' 2014-12-29 21:23:41 +01:00
crypto Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dca
devfreq
dio
dma Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dma-buf
edac Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
eisa
extcon Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
firewire firewire: sbp2: replace card lock by target lock 2014-12-10 20:53:21 +01:00
firmware Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fmc
gpio gpio: dln2: use bus_sync_unlock instead of scheduling work 2015-01-09 07:57:35 +01:00
gpu Merge tag 'amdkfd-fixes-2015-01-06' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes 2015-01-08 10:36:37 +10:00
hid HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-01-09 14:41:01 +01:00
hsi * misc. fixes in omap-ssi and nokia-modem drivers 2014-12-15 17:33:47 -08:00
hv Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
hwmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-12-17 10:16:27 -08:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-12-20 13:52:52 -08:00
ide Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
idle
iio Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
infiniband iw_cxgb4: Cleanup register defines/MACROS defined in t4fw_ri_api.h 2015-01-16 01:07:02 -05:00
input Revert "Input: atmel_mxt_ts - use deep sleep mode when stopped" 2014-12-31 12:59:34 -08:00
iommu iommu/rockchip: Drop owner assignment from platform_drivers 2015-01-05 12:40:06 +01:00
ipack
irqchip Merge branch 'irq-irqdomain-arm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-15 17:30:09 -08:00
isdn Drivers: Isdn: sc: Fixed coding style & spelling mistakes. 2015-01-18 00:27:53 -05:00
leds leds: netxbig: fix oops at probe time 2015-01-13 13:49:01 -08:00
lguest virtio: allow finalize_features to fail 2014-12-09 16:32:32 +02:00
macintosh macintosh: therm_pm72: delete deprecated driver 2014-12-19 19:32:47 +01:00
mailbox Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mcb
md dm: fix missed error code if .end_io isn't implemented by target_type 2014-12-17 12:31:13 -05:00
media More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
memory MTD updates for 3.19: 2014-12-17 09:59:26 -08:00
memstick
message
mfd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-30 16:59:59 -08:00
misc powerpc updates for 3.19 batch 2 2014-12-19 12:57:45 -08:00
mmc mmc: sdhci-pci: Add support for Intel SPT 2015-01-12 10:14:58 +01:00
mtd MTD updates for 3.19: 2014-12-17 09:59:26 -08:00
net Some further updates for net-next: 2015-01-19 16:22:19 -05:00
nfc More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
ntb
nubus
of ARM: SoC/iommu configuration for 3.19 2014-12-16 14:53:01 -08:00
oprofile
parisc
parport Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
pci Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-19 14:02:02 -08:00
pcmcia Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
phy phy: miphy365x: Pass sysconfig register offsets via syscfg dt property. 2015-01-11 18:53:34 -05:00
pinctrl pinctrl: st: Add irq_disable hook to st_gpio_irqchip 2015-01-07 10:44:39 +01:00
platform platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
pnp
power More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
powercap powercap / RAPL: add IDs for future Xeon CPUs 2014-12-17 02:35:42 +01:00
pps
ps3
ptp
pwm pwm: Changes for v3.19-rc1 2014-12-17 10:10:51 -08:00
rapidio
ras
regulator regulator: Fix for v3.19 2014-12-29 13:24:38 -08:00
remoteproc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
reset Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rpmsg
rtc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
s390 qeth: Remove unneeded structure member 2015-01-17 23:55:00 -05:00
sbus
scsi csiostor:Removed file csio_hw_t4.c 2015-01-19 15:30:02 -05:00
sfi
sh drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 03:08:24 +01:00
sn
soc Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
spi Merge remote-tracking branches 'spi/fix/img-spfi' and 'spi/fix/msiof' into spi-linus 2014-12-24 12:57:54 +00:00
spmi
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
staging Here's a big pile of changes for this round. 2015-01-15 19:16:56 -05:00
target netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
tc
thermal netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
thunderbolt
tty tty: 8250_omap: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-19 15:27:58 +01:00
uio Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
usb SCSI for-linus on 20141220 2014-12-20 13:42:57 -08:00
uwb
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-07 10:29:11 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-15 00:53:17 -05:00
video OMAPDSS: SDI: fix output port_num 2014-12-30 11:18:30 +02:00
virt
virtio virtio_pci: document why we defer kfree 2015-01-06 16:35:36 +02:00
vlynq
vme
w1 Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
watchdog watchdog: imx2_wdt: Fix the argument of watchdog_active() 2014-12-18 16:01:20 +01:00
xen Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-18 05:56:29 -08:00
zorro
Kconfig Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
Makefile drivers: Move iommu/ before gpu/ in Makefile 2014-12-22 11:47:37 +02:00