This is the start of the stable review cycle for the 5.4.168 release.
There are 71 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 22 Dec 2021 14:30:09 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.168-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.168-rc1
Juergen Gross <jgross(a)suse.com>
xen/netback: don't queue unlimited number of packages
Juergen Gross <jgross(a)suse.com>
xen/netback: fix rx queue stall detection
Juergen Gross <jgross(a)suse.com>
xen/console: harden hvc_xen against event channel storms
Juergen Gross <jgross(a)suse.com>
xen/netfront: harden netfront against event channel storms
Juergen Gross <jgross(a)suse.com>
xen/blkfront: harden blkfront against event channel storms
Magnus Karlsson <magnus.karlsson(a)intel.com>
Revert "xsk: Do not sleep in poll() when need_wakeup set"
Leon Romanovsky <leonro(a)nvidia.com>
net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info
Felix Fietkau <nbd(a)nbd.name>
mac80211: fix regression in SSN handling of addba tx
Paul E. McKenney <paulmck(a)kernel.org>
rcu: Mark accesses to rcu_state.n_force_qs
George Kennedy <george.kennedy(a)oracle.com>
scsi: scsi_debug: Sanity check block descriptor length in resp_mode_select()
Miklos Szeredi <mszeredi(a)redhat.com>
ovl: fix warning in ovl_create_real()
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: annotate lock in fuse_reverse_inval_entry()
Pavel Skripkin <paskripkin(a)gmail.com>
media: mxl111sf: change mutex_init() location
Magnus Karlsson <magnus.karlsson(a)intel.com>
xsk: Do not sleep in poll() when need_wakeup set
Fabio Estevam <festevam(a)gmail.com>
ARM: dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name
Nathan Chancellor <nathan(a)kernel.org>
Input: touchscreen - avoid bitwise vs logical OR warning
Nathan Chancellor <natechancellor(a)gmail.com>
mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO
Johannes Berg <johannes.berg(a)intel.com>
mac80211: validate extended element ID is present
Le Ma <le.ma(a)amd.com>
drm/amdgpu: correct register access for RLC_JUMP_TABLE_RESTORE
George Kennedy <george.kennedy(a)oracle.com>
libata: if T_LENGTH is zero, dma direction should be DMA_NONE
Yu Liao <liaoyu15(a)huawei.com>
timekeeping: Really make sure wall_to_monotonic isn't positive
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN990 compositions
Johan Hovold <johan(a)kernel.org>
USB: serial: cp210x: fix CP2105 GPIO registration
Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah(a)amd.com>
usb: xhci: Extend support for runtime power management for AMD's Yellow carp.
Stefan Roese <sr(a)denx.de>
PCI/MSI: Mask MSI-X vectors only on success
Thomas Gleixner <tglx(a)linutronix.de>
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
Jimmy Wang <wangjm221(a)gmail.com>
USB: NO_LPM quirk Lenovo USB-C to Ethernet Adapher(RTL8153-04)
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
USB: gadget: bRequestType is a bitfield, not a enum
Eric Dumazet <edumazet(a)google.com>
sit: do not call ipip6_dev_free() from sit_init_net()
Florian Fainelli <f.fainelli(a)gmail.com>
net: systemport: Add global locking for descriptor lifecycle
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: Prevent smc_release() from long blocking
Gal Pressman <gal(a)nvidia.com>
net: Fix double 0x prefix print in SKB dump
Willem de Bruijn <willemb(a)google.com>
net/packet: rx_owner_map depends on pg_vec
Haimin Zhang <tcs.kernel(a)gmail.com>
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
Cyril Novikov <cnovikov(a)lynx.com>
ixgbe: set X550 MDIO speed before talking to PHY
Letu Ren <fantasquex(a)gmail.com>
igbvf: fix double free in `igbvf_probe`
Karen Sornek <karen.sornek(a)intel.com>
igb: Fix removal of unicast MAC filters of VFs
Nathan Chancellor <nathan(a)kernel.org>
soc/tegra: fuse: Fix bitwise vs. logical OR warning
Hangyu Hua <hbh25y(a)gmail.com>
rds: memory leak in __rds_conn_create()
Baowen Zheng <baowen.zheng(a)corigine.com>
flow_offload: return EOPNOTSUPP for the unsupported mpls action type
Vlad Buslov <vladbu(a)mellanox.com>
net: sched: lock action when translating it to flow_action infra
Johannes Berg <johannes.berg(a)intel.com>
mac80211: fix lookup when adding AddBA extension element
Johannes Berg <johannes.berg(a)intel.com>
mac80211: accept aggregation sessions on 6 GHz
Johannes Berg <johannes.berg(a)intel.com>
mac80211: agg-tx: don't schedule_and_wake_txq() under sta->lock
Mordechay Goodstein <mordechay.goodstein(a)intel.com>
mac80211: agg-tx: refactor sending addba
Hangbin Liu <liuhangbin(a)gmail.com>
selftest/net/forwarding: declare NETIFS p9 p10
Alyssa Ross <hi(a)alyssa.is>
dmaengine: st_fdma: fix MODULE_ALIAS
David Ahern <dsahern(a)kernel.org>
selftests: Fix IPv6 address bind tests
David Ahern <dsahern(a)kernel.org>
selftests: Fix raw socket bind tests with VRF
Eric Dumazet <edumazet(a)google.com>
inet_diag: fix kernel-infoleak for UDP sockets
Eric Dumazet <edumazet(a)google.com>
inet_diag: use jiffies_delta_to_msecs()
Eric Dumazet <edumazet(a)google.com>
sch_cake: do not call cake_destroy() from cake_init()
Philipp Rudo <prudo(a)redhat.com>
s390/kexec_file: fix error handling when applying relocations
Jie2x Zhou <jie2x.zhou(a)intel.com>
selftests: net: Correct ping6 expected rc from 2 to 1
Mike Tipton <quic_mdtipton(a)quicinc.com>
clk: Don't parent clks until the parent is fully registered
Dinh Nguyen <dinguyen(a)kernel.org>
ARM: socfpga: dts: fix qspi node compatible
Randy Dunlap <rdunlap(a)infradead.org>
hv: utils: add PTP_1588_CLOCK to Kconfig to fix build
Johannes Berg <johannes.berg(a)intel.com>
mac80211: track only QoS data frames for admission control
Alex Bee <knaerzche(a)gmail.com>
arm64: dts: rockchip: fix audio-supply for Rock Pi 4
John Keeping <john(a)metanate.com>
arm64: dts: rockchip: fix rk3399-leez-p710 vcc3v3-lan supply
Artem Lapkin <email2tema(a)gmail.com>
arm64: dts: rockchip: remove mmc-hs400-enhanced-strobe from rk3399-khadas-edge
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix use-after-free due to delegation race
Fabrice Gasnier <fabrice.gasnier(a)foss.st.com>
iio: adc: stm32: fix a current leak by resetting pcsel before disabling vdda
Paul Moore <paul(a)paul-moore.com>
audit: improve robustness of the audit queue handling
Joe Thornber <ejt(a)redhat.com>
dm btree remove: fix use after free in rebalance_children()
Jerome Marchand <jmarchan(a)redhat.com>
recordmcount.pl: look for jgnop instruction as well as bcrl on s390
Will Deacon <will(a)kernel.org>
virtio_ring: Fix querying of maximum DMA mapping size for virtio device
Sudeep Holla <sudeep.holla(a)arm.com>
firmware: arm_scpi: Fix string overflow in SCPI genpd driver
Felix Fietkau <nbd(a)nbd.name>
mac80211: send ADDBA requests using the tid/queue of the aggregation session
Johannes Berg <johannes.berg(a)intel.com>
mac80211: mark TX-during-stop for TX in in_reconfig
Vitaly Kuznetsov <vkuznets(a)redhat.com>
KVM: selftests: Make sure kvm_create_max_vcpus test won't hit RLIMIT_NOFILE
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/imx6ull-pinfunc.h | 2 +-
arch/arm/boot/dts/socfpga_arria10_socdk_qspi.dts | 2 +-
arch/arm/boot/dts/socfpga_arria5_socdk.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_sodia.dts | 2 +-
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 4 +-
.../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts | 2 +-
arch/s390/kernel/machine_kexec_file.c | 7 +-
drivers/ata/libata-scsi.c | 15 ++-
drivers/block/xen-blkfront.c | 15 ++-
drivers/clk/clk.c | 15 ++-
drivers/dma/st_fdma.c | 2 +-
drivers/firmware/scpi_pm_domain.c | 10 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +-
drivers/hv/Kconfig | 1 +
drivers/iio/adc/stm32-adc.c | 1 +
drivers/input/touchscreen/of_touchscreen.c | 18 +--
drivers/md/persistent-data/dm-btree-remove.c | 2 +-
drivers/media/usb/dvb-usb-v2/mxl111sf.c | 16 ++-
drivers/net/ethernet/broadcom/bcmsysport.c | 5 +-
drivers/net/ethernet/broadcom/bcmsysport.h | 1 +
drivers/net/ethernet/intel/igb/igb_main.c | 28 ++---
drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +
drivers/net/netdevsim/bpf.c | 1 +
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 4 +-
drivers/net/wireless/marvell/mwifiex/fw.h | 8 +-
drivers/net/xen-netback/common.h | 1 +
drivers/net/xen-netback/rx.c | 77 ++++++++-----
drivers/net/xen-netfront.c | 125 ++++++++++++++++-----
drivers/pci/msi.c | 15 ++-
drivers/scsi/scsi_debug.c | 4 +-
drivers/soc/tegra/fuse/fuse-tegra.c | 2 +-
drivers/soc/tegra/fuse/fuse.h | 2 +-
drivers/tty/hvc/hvc_xen.c | 30 ++++-
drivers/usb/core/quirks.c | 3 +
drivers/usb/gadget/composite.c | 6 +-
drivers/usb/gadget/legacy/dbgp.c | 6 +-
drivers/usb/gadget/legacy/inode.c | 6 +-
drivers/usb/host/xhci-pci.c | 6 +-
drivers/usb/serial/cp210x.c | 6 +-
drivers/usb/serial/option.c | 8 ++
drivers/virtio/virtio_ring.c | 2 +-
fs/fuse/dir.c | 2 +-
fs/nfsd/nfs4state.c | 9 +-
fs/overlayfs/dir.c | 3 +-
fs/overlayfs/overlayfs.h | 1 +
fs/overlayfs/super.c | 12 +-
include/net/tc_act/tc_tunnel_key.h | 7 +-
kernel/audit.c | 21 ++--
kernel/rcu/tree.c | 10 +-
kernel/time/timekeeping.c | 3 +-
net/core/skbuff.c | 2 +-
net/ipv4/inet_diag.c | 19 ++--
net/ipv6/sit.c | 1 -
net/mac80211/agg-rx.c | 8 +-
net/mac80211/agg-tx.c | 80 ++++++++-----
net/mac80211/driver-ops.h | 5 +-
net/mac80211/mlme.c | 13 ++-
net/mac80211/sta_info.h | 1 +
net/mac80211/util.c | 2 +
net/packet/af_packet.c | 5 +-
net/rds/connection.c | 1 +
net/sched/act_sample.c | 2 -
net/sched/cls_api.c | 18 ++-
net/sched/sch_cake.c | 6 +-
net/smc/af_smc.c | 4 +-
scripts/recordmcount.pl | 2 +-
tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 30 +++++
tools/testing/selftests/net/fcnal-test.sh | 23 ++--
.../net/forwarding/forwarding.config.sample | 2 +
76 files changed, 525 insertions(+), 250 deletions(-)
This is the start of the stable review cycle for the 4.4.296 release.
There are 23 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 22 Dec 2021 14:30:09 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.296-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.4.296-rc1
Juergen Gross <jgross(a)suse.com>
xen/netback: don't queue unlimited number of packages
Juergen Gross <jgross(a)suse.com>
xen/console: harden hvc_xen against event channel storms
Juergen Gross <jgross(a)suse.com>
xen/netfront: harden netfront against event channel storms
Juergen Gross <jgross(a)suse.com>
xen/blkfront: harden blkfront against event channel storms
Nathan Chancellor <nathan(a)kernel.org>
Input: touchscreen - avoid bitwise vs logical OR warning
Nicolas Pitre <nicolas.pitre(a)linaro.org>
ARM: 8805/2: remove unneeded naked function usage
Nathan Chancellor <natechancellor(a)gmail.com>
net: lan78xx: Avoid unnecessary self assignment
Florian Fainelli <f.fainelli(a)gmail.com>
net: systemport: Add global locking for descriptor lifecycle
Yu Liao <liaoyu15(a)huawei.com>
timekeeping: Really make sure wall_to_monotonic isn't positive
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit FN990 compositions
Thomas Gleixner <tglx(a)linutronix.de>
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
USB: gadget: bRequestType is a bitfield, not a enum
Letu Ren <fantasquex(a)gmail.com>
igbvf: fix double free in `igbvf_probe`
Nathan Chancellor <nathan(a)kernel.org>
soc/tegra: fuse: Fix bitwise vs. logical OR warning
J. Bruce Fields <bfields(a)redhat.com>
nfsd: fix use-after-free due to delegation race
Joe Thornber <ejt(a)redhat.com>
dm btree remove: fix use after free in rebalance_children()
Jerome Marchand <jmarchan(a)redhat.com>
recordmcount.pl: look for jgnop instruction as well as bcrl on s390
Felix Fietkau <nbd(a)nbd.name>
mac80211: send ADDBA requests using the tid/queue of the aggregation session
Armin Wolf <W_Armin(a)gmx.de>
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Harshit Mogalapalli <harshit.m.mogalapalli(a)oracle.com>
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Ondrej Jirman <megous(a)megous.com>
i2c: rk3x: Handle a spurious start completion interrupt flag
Helge Deller <deller(a)gmx.de>
parisc/agp: Annotate parisc agp init functions with __init
Tadeusz Struk <tadeusz.struk(a)linaro.org>
nfc: fix segfault in nfc_genl_dump_devices_done
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mm/copypage-fa.c | 35 ++++----
arch/arm/mm/copypage-feroceon.c | 98 ++++++++++-----------
arch/arm/mm/copypage-v4mc.c | 19 ++--
arch/arm/mm/copypage-v4wb.c | 41 +++++----
arch/arm/mm/copypage-v4wt.c | 37 ++++----
arch/arm/mm/copypage-xsc3.c | 71 +++++++--------
arch/arm/mm/copypage-xscale.c | 71 ++++++++-------
drivers/block/xen-blkfront.c | 12 ++-
drivers/char/agp/parisc-agp.c | 6 +-
drivers/hwmon/dell-smm-hwmon.c | 7 +-
drivers/i2c/busses/i2c-rk3x.c | 4 +-
drivers/input/touchscreen/of_touchscreen.c | 18 ++--
drivers/md/persistent-data/dm-btree-remove.c | 2 +-
drivers/net/ethernet/broadcom/bcmsysport.c | 5 ++
drivers/net/ethernet/broadcom/bcmsysport.h | 1 +
drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
drivers/net/usb/lan78xx.c | 6 +-
drivers/net/xen-netback/netback.c | 13 ++-
drivers/net/xen-netfront.c | 125 ++++++++++++++++++++-------
drivers/pci/msi.c | 2 +-
drivers/soc/tegra/fuse/fuse-tegra.c | 2 +-
drivers/soc/tegra/fuse/fuse.h | 2 +-
drivers/tty/hvc/hvc_xen.c | 30 ++++++-
drivers/usb/gadget/composite.c | 6 +-
drivers/usb/gadget/legacy/dbgp.c | 6 +-
drivers/usb/gadget/legacy/inode.c | 6 +-
drivers/usb/serial/option.c | 8 ++
fs/nfsd/nfs4state.c | 9 +-
kernel/time/timekeeping.c | 3 +-
net/mac80211/agg-tx.c | 2 +-
net/netlink/af_netlink.c | 5 ++
net/nfc/netlink.c | 6 +-
scripts/recordmcount.pl | 2 +-
34 files changed, 388 insertions(+), 277 deletions(-)
The patch titled
Subject: mm/damon/dbgfs: protect targets destructions with kdamond_lock
has been added to the -mm tree. Its filename is
mm-damon-dbgfs-protect-targets-destructions-with-kdamond_lock.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-dbgfs-protect-targets-de…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-dbgfs-protect-targets-de…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: SeongJae Park <sj(a)kernel.org>
Subject: mm/damon/dbgfs: protect targets destructions with kdamond_lock
DAMON debugfs interface iterates current monitoring targets in
'dbgfs_target_ids_read()' while holding the corresponding 'kdamond_lock'.
However, it also destructs the monitoring targets in
'dbgfs_before_terminate()' without holding the lock. This can result in a
use_after_free bug. This commit avoids the race by protecting the
destruction with the corresponding 'kdamond_lock'.
Link: https://lkml.kernel.org/r/20211221094447.2241-1-sj@kernel.org
Reported-by: Sangwoo Bae <sangwoob(a)amazon.com>
Fixes: 4bc05954d007 ("mm/damon: implement a debugfs-based user space interface")
Signed-off-by: SeongJae Park <sj(a)kernel.org>
Cc: <stable(a)vger.kernel.org> [5.15.x]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/damon/dbgfs.c | 2 ++
1 file changed, 2 insertions(+)
--- a/mm/damon/dbgfs.c~mm-damon-dbgfs-protect-targets-destructions-with-kdamond_lock
+++ a/mm/damon/dbgfs.c
@@ -650,10 +650,12 @@ static void dbgfs_before_terminate(struc
if (!targetid_is_pid(ctx))
return;
+ mutex_lock(&ctx->kdamond_lock);
damon_for_each_target_safe(t, next, ctx) {
put_pid((struct pid *)t->id);
damon_destroy_target(t);
}
+ mutex_unlock(&ctx->kdamond_lock);
}
static struct damon_ctx *dbgfs_new_ctx(void)
_
Patches currently in -mm which might be from sj(a)kernel.org are
mm-damon-dbgfs-protect-targets-destructions-with-kdamond_lock.patch
mm-damon-remove-some-no-need-func-definitions-in-damonh-file-fix.patch
mm-damon-convert-macro-functions-to-static-inline-functions.patch
docs-admin-guide-mm-damon-usage-update-for-scheme-quotas-and-watermarks.patch
docs-admin-guide-mm-damon-usage-remove-redundant-information.patch
docs-admin-guide-mm-damon-usage-mention-tracepoint-at-the-beginning.patch
docs-admin-guide-mm-damon-usage-update-for-kdamond_pid-and-mkrm_contexts.patch
mm-damon-remove-a-mistakenly-added-comment-for-a-future-feature.patch
mm-damon-schemes-account-scheme-actions-that-successfully-applied.patch
mm-damon-schemes-account-how-many-times-quota-limit-has-exceeded.patch
mm-damon-reclaim-provide-reclamation-statistics.patch
docs-admin-guide-mm-damon-reclaim-document-statistics-parameters.patch
mm-damon-dbgfs-support-all-damos-stats.patch
docs-admin-guide-mm-damon-usage-update-for-schemes-statistics.patch
This driver is intended to be used exclusively for suspend to idle
so callbacks to send OS_HINT during hibernate and S5 will set OS_HINT
at the wrong time leading to an undefined behavior.
Cc: stable(a)vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello(a)amd.com>
---
drivers/platform/x86/amd-pmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index 841c44cd64c2..230593ae5d6d 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -508,7 +508,8 @@ static int __maybe_unused amd_pmc_resume(struct device *dev)
}
static const struct dev_pm_ops amd_pmc_pm_ops = {
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(amd_pmc_suspend, amd_pmc_resume)
+ .suspend_noirq = amd_pmc_suspend,
+ .resume_noirq = amd_pmc_resume,
};
static const struct pci_device_id pmc_pci_ids[] = {
--
2.25.1
From: Aditya Garg <redecorating(a)protonmail.com>
Some devices have a bug causing them to not work if they query LE tx power on startup. Thus we add a quirk in order to not query it and default min/max tx power values to HCI_TX_POWER_INVALID.
Signed-off-by: Aditya Garg <gargaditya08(a)live.com>
Tested-by: Aditya Garg <gargaditya08(a)live.com>
---
include/net/bluetooth/hci.h | 9 +++++++++
net/bluetooth/hci_core.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 63065bc01b766c..383342efcdc464 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -246,6 +246,15 @@ enum {
* HCI after resume.
*/
HCI_QUIRK_NO_SUSPEND_NOTIFIER,
+
+ /*
+ * When this quirk is set, LE tx power is not queried on startup
+ * and the min/max tx power values default to HCI_TX_POWER_INVALID.
+ *
+ * This quirk can be set before hci_register_dev is called or
+ * during the hdev->setup vendor callback.
+ */
+ HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
};
/* HCI device flags */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8d33aa64846b1c..434c6878fe9640 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -619,7 +619,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
}
- if (hdev->commands[38] & 0x80) {
+ if (hdev->commands[38] & 0x80 &&
+ !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {
/* Read LE Min/Max Tx Power*/
hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER,
0, NULL);