This is a note to let you know that I've just added the patch titled
usb: typec: tcpm: Relax disconnect threshold during power negotiation
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 2b537cf877eae6d2f2f102052290676e40b74a1d Mon Sep 17 00:00:00 2001
From: Kyle Tso <kyletso(a)google.com>
Date: Wed, 16 Jun 2021 17:01:02 +0800
Subject: usb: typec: tcpm: Relax disconnect threshold during power negotiation
If the voltage is being decreased in power negotiation, the Source will
set the power supply to operate at the new voltage level before sending
PS_RDY. Relax the threshold before sending Request Message so that it
will not race with Source which begins to adjust the voltage right after
it sends Accept Message (PPS) or tSrcTransition (25~35ms) after it sends
Accept Message (non-PPS).
The real threshold will be set after Sink receives PS_RDY Message.
Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support")
Cc: stable <stable(a)vger.kernel.org>
Cc: Badhri Jagan Sridharan <badhri(a)google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri(a)google.com>
Acked-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
Signed-off-by: Kyle Tso <kyletso(a)google.com>
Link: https://lore.kernel.org/r/20210616090102.1897674-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/typec/tcpm/tcpm.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index e11e9227107d..5b22a1c931a9 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -2604,6 +2604,11 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
} else {
next_state = SNK_WAIT_CAPABILITIES;
}
+
+ /* Threshold was relaxed before sending Request. Restore it back. */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
+ port->pps_data.active,
+ port->supply_voltage);
tcpm_set_state(port, next_state, 0);
break;
case SNK_NEGOTIATE_PPS_CAPABILITIES:
@@ -2617,6 +2622,11 @@ static void tcpm_pd_ctrl_request(struct tcpm_port *port,
port->send_discover)
port->vdm_sm_running = true;
+ /* Threshold was relaxed before sending Request. Restore it back. */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
+ port->pps_data.active,
+ port->supply_voltage);
+
tcpm_set_state(port, SNK_READY, 0);
break;
case DR_SWAP_SEND:
@@ -3336,6 +3346,12 @@ static int tcpm_pd_send_request(struct tcpm_port *port)
if (ret < 0)
return ret;
+ /*
+ * Relax the threshold as voltage will be adjusted after Accept Message plus tSrcTransition.
+ * It is safer to modify the threshold here.
+ */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_USB, false, 0);
+
memset(&msg, 0, sizeof(msg));
msg.header = PD_HEADER_LE(PD_DATA_REQUEST,
port->pwr_role,
@@ -3433,6 +3449,9 @@ static int tcpm_pd_send_pps_request(struct tcpm_port *port)
if (ret < 0)
return ret;
+ /* Relax the threshold as voltage will be adjusted right after Accept Message. */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_USB, false, 0);
+
memset(&msg, 0, sizeof(msg));
msg.header = PD_HEADER_LE(PD_DATA_REQUEST,
port->pwr_role,
@@ -4196,6 +4215,10 @@ static void run_state_machine(struct tcpm_port *port)
port->hard_reset_count = 0;
ret = tcpm_pd_send_request(port);
if (ret < 0) {
+ /* Restore back to the original state */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
+ port->pps_data.active,
+ port->supply_voltage);
/* Let the Source send capabilities again. */
tcpm_set_state(port, SNK_WAIT_CAPABILITIES, 0);
} else {
@@ -4206,6 +4229,10 @@ static void run_state_machine(struct tcpm_port *port)
case SNK_NEGOTIATE_PPS_CAPABILITIES:
ret = tcpm_pd_send_pps_request(port);
if (ret < 0) {
+ /* Restore back to the original state */
+ tcpm_set_auto_vbus_discharge_threshold(port, TYPEC_PWR_MODE_PD,
+ port->pps_data.active,
+ port->supply_voltage);
port->pps_status = ret;
/*
* If this was called due to updates to sink
--
2.32.0
This is a note to let you know that I've just added the patch titled
usb: typec: tcpm: Ignore Vsafe0v in PR_SWAP_SNK_SRC_SOURCE_ON state
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From fed09e0bf9f0622a54f3963f959d914fa817f8a6 Mon Sep 17 00:00:00 2001
From: Kyle Tso <kyletso(a)google.com>
Date: Wed, 16 Jun 2021 01:32:06 +0800
Subject: usb: typec: tcpm: Ignore Vsafe0v in PR_SWAP_SNK_SRC_SOURCE_ON state
In PR_SWAP_SNK_SRC_SOURCE_ON state, Vsafe0v is expected as well so do
nothing here to avoid state machine going into SNK_UNATTACHED.
Fixes: 28b43d3d746b ("usb: typec: tcpm: Introduce vsafe0v for vbus")
Cc: stable <stable(a)vger.kernel.org>
Reviewed-by: Badhri Jagan Sridharan <badhri(a)google.com>
Reviewed-by: Guenter Roeck <linux(a)roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
Signed-off-by: Kyle Tso <kyletso(a)google.com>
Link: https://lore.kernel.org/r/20210615173206.1646477-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/typec/tcpm/tcpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 197556038ba4..e11e9227107d 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -5212,6 +5212,7 @@ static void _tcpm_pd_vbus_vsafe0v(struct tcpm_port *port)
}
break;
case PR_SWAP_SNK_SRC_SINK_OFF:
+ case PR_SWAP_SNK_SRC_SOURCE_ON:
/* Do nothing, vsafe0v is expected during transition */
break;
default:
--
2.32.0
This is a note to let you know that I've just added the patch titled
usb: typec: tcpci: Fix up sink disconnect thresholds for PD
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 4288debeaa4e21d8dd5132739ffba2d343892bbf Mon Sep 17 00:00:00 2001
From: Badhri Jagan Sridharan <badhri(a)google.com>
Date: Tue, 15 Jun 2021 10:43:23 -0700
Subject: usb: typec: tcpci: Fix up sink disconnect thresholds for PD
"Table 4-3 VBUS Sink Characteristics" of "Type-C Cable and Connector
Specification" defines the disconnect voltage thresholds of various
configurations. This change fixes the disconnect threshold voltage
calculation based on vSinkPD_min and vSinkDisconnectPD as defined
by the table.
Fixes: e1a97bf80a022 ("usb: typec: tcpci: Implement Auto discharge disconnect callbacks")
Cc: stable <stable(a)vger.kernel.org>
Acked-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri(a)google.com>
Link: https://lore.kernel.org/r/20210615174323.1160132-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/typec/tcpm/tcpci.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index 22862345d1ab..9858716698df 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -21,8 +21,12 @@
#define PD_RETRY_COUNT_DEFAULT 3
#define PD_RETRY_COUNT_3_0_OR_HIGHER 2
#define AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV 3500
-#define AUTO_DISCHARGE_PD_HEADROOM_MV 850
-#define AUTO_DISCHARGE_PPS_HEADROOM_MV 1250
+#define VSINKPD_MIN_IR_DROP_MV 750
+#define VSRC_NEW_MIN_PERCENT 95
+#define VSRC_VALID_MIN_MV 500
+#define VPPS_NEW_MIN_PERCENT 95
+#define VPPS_VALID_MIN_MV 100
+#define VSINKDISCONNECT_PD_MIN_PERCENT 90
#define tcpc_presenting_rd(reg, cc) \
(!(TCPC_ROLE_CTRL_DRP & (reg)) && \
@@ -351,11 +355,13 @@ static int tcpci_set_auto_vbus_discharge_threshold(struct tcpc_dev *dev, enum ty
threshold = AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV;
} else if (mode == TYPEC_PWR_MODE_PD) {
if (pps_active)
- threshold = (95 * requested_vbus_voltage_mv / 100) -
- AUTO_DISCHARGE_PD_HEADROOM_MV;
+ threshold = ((VPPS_NEW_MIN_PERCENT * requested_vbus_voltage_mv / 100) -
+ VSINKPD_MIN_IR_DROP_MV - VPPS_VALID_MIN_MV) *
+ VSINKDISCONNECT_PD_MIN_PERCENT / 100;
else
- threshold = (95 * requested_vbus_voltage_mv / 100) -
- AUTO_DISCHARGE_PPS_HEADROOM_MV;
+ threshold = ((VSRC_NEW_MIN_PERCENT * requested_vbus_voltage_mv / 100) -
+ VSINKPD_MIN_IR_DROP_MV - VSRC_VALID_MIN_MV) *
+ VSINKDISCONNECT_PD_MIN_PERCENT / 100;
} else {
/* 3.5V for non-pd sink */
threshold = AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV;
--
2.32.0
A change in clang 13 results in the __lwsync macro being defined as
__builtin_ppc_lwsync, which emits 'lwsync' or 'msync' depending on what
the target supports. This breaks the build because of -Werror in
arch/powerpc, along with thousands of warnings:
In file included from arch/powerpc/kernel/pmc.c:12:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: error: '__lwsync' macro redefined [-Werror,-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:308:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
1 error generated.
Undefine this macro so that the runtime patching introduced by
commit 2d1b2027626d ("powerpc: Fixup lwsync at runtime") continues to
work properly with clang and the build no longer breaks.
Cc: stable(a)vger.kernel.org
Link: https://github.com/ClangBuiltLinux/linux/issues/1386
Link: https://github.com/llvm/llvm-project/commit/62b5df7fe2b3fda1772befeda15598f…
Signed-off-by: Nathan Chancellor <nathan(a)kernel.org>
---
arch/powerpc/include/asm/barrier.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h
index 7ae29cfb06c0..f0e687236484 100644
--- a/arch/powerpc/include/asm/barrier.h
+++ b/arch/powerpc/include/asm/barrier.h
@@ -46,6 +46,8 @@
# define SMPWMB eieio
#endif
+/* clang defines this macro for a builtin, which will not work with runtime patching */
+#undef __lwsync
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
#define dma_rmb() __lwsync()
#define dma_wmb() __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")
base-commit: 97e5bf604b7a0d6e1b3e00fe31d5fd4b9bffeaae
--
2.32.0.rc0
This is the start of the stable review cycle for the 5.4.127 release.
There are 28 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 Fri, 18 Jun 2021 15:28:19 +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.127-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.127-rc1
Zheng Yongjun <zhengyongjun3(a)huawei.com>
fib: Return the correct errno code
Zheng Yongjun <zhengyongjun3(a)huawei.com>
net: Return the correct errno code
Zheng Yongjun <zhengyongjun3(a)huawei.com>
net/x25: Return the correct errno code
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
rtnetlink: Fix missing error code in rtnl_bridge_notify()
Rodrigo Siqueira <Rodrigo.Siqueira(a)amd.com>
drm/amd/display: Fix overlay validation by considering cursors
Bindu Ramamurthy <bindu.r(a)amd.com>
drm/amd/display: Allow bandwidth validation for 0 streams.
Josh Triplett <josh(a)joshtriplett.org>
net: ipconfig: Don't override command-line hostnames or domains
Hannes Reinecke <hare(a)suse.de>
nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
Hannes Reinecke <hare(a)suse.de>
nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
Hannes Reinecke <hare(a)suse.de>
nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
Ewan D. Milne <emilne(a)redhat.com>
scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V
Daniel Wagner <dwagner(a)suse.de>
scsi: qedf: Do not put host in qedf_vport_create() unconditionally
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
ethernet: myri10ge: Fix missing error code in myri10ge_probe()
Maurizio Lombardi <mlombard(a)redhat.com>
scsi: target: core: Fix warning on realtime kernels
Hillf Danton <hdanton(a)sina.com>
gfs2: Fix use-after-free in gfs2_glock_shrink_scan
Khem Raj <raj.khem(a)gmail.com>
riscv: Use -mno-relax when using lld linker
Bixuan Cui <cuibixuan(a)huawei.com>
HID: gt683r: add missing MODULE_DEVICE_TABLE
Andreas Gruenbacher <agruenba(a)redhat.com>
gfs2: Prevent direct-I/O write fallback errors from getting lost
Yongqiang Liu <liuyongqiang13(a)huawei.com>
ARM: OMAP2+: Fix build warning when mmc_omap is not built
Pavel Machek (CIP) <pavel(a)denx.de>
drm/tegra: sor: Do not leak runtime PM reference
Anirudh Rayabharam <mail(a)anirudhrb.com>
HID: usbhid: fix info leak in hid_submit_ctrl
Mark Bolhuis <mark(a)bolhuis.dev>
HID: Add BUS_VIRTUAL to hid_connect logging
Ahelenia Ziemiańska <nabijaczleweli(a)nabijaczleweli.xyz>
HID: multitouch: set Stylus suffix for Stylus-application devices, too
Saeed Mirzamohammadi <saeed.mirzamohammadi(a)oracle.com>
HID: quirks: Add quirk for Lenovo optical mouse
Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
HID: hid-sensor-hub: Return error for hid_set_field() failure
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
HID: hid-input: add mapping for emoji picker key
Nirenjan Krishnan <nirenjan(a)gmail.com>
HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65
Dan Robertson <dan(a)dlrobertson.com>
net: ieee802154: fix null deref in parse dev addr
-------------
Diffstat:
Makefile | 4 ++--
arch/arm/mach-omap2/board-n8x0.c | 2 +-
arch/riscv/Makefile | 9 +++++++++
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++++-
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +-
drivers/gpu/drm/tegra/sor.c | 14 ++++++++++----
drivers/hid/hid-core.c | 3 +++
drivers/hid/hid-debug.c | 1 +
drivers/hid/hid-gt683r.c | 1 +
drivers/hid/hid-ids.h | 2 ++
drivers/hid/hid-input.c | 3 +++
drivers/hid/hid-multitouch.c | 8 ++++----
drivers/hid/hid-quirks.c | 2 ++
drivers/hid/hid-sensor-hub.c | 13 +++++++++----
drivers/hid/usbhid/hid-core.c | 2 +-
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
drivers/nvme/target/loop.c | 5 ++++-
drivers/scsi/qedf/qedf_main.c | 20 +++++++++-----------
drivers/scsi/scsi_devinfo.c | 1 +
drivers/target/target_core_transport.c | 4 +---
fs/gfs2/file.c | 5 ++++-
fs/gfs2/glock.c | 2 +-
include/linux/hid.h | 3 +--
include/uapi/linux/input-event-codes.h | 1 +
net/compat.c | 2 +-
net/core/fib_rules.c | 2 +-
net/core/rtnetlink.c | 4 +++-
net/ieee802154/nl802154.c | 9 +++++----
net/ipv4/ipconfig.c | 13 ++++++++-----
net/x25/af_x25.c | 2 +-
30 files changed, 100 insertions(+), 50 deletions(-)
This is the start of the stable review cycle for the 5.12.12 release.
There are 48 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 Fri, 18 Jun 2021 15:28:19 +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.12.12-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.12.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.12.12-rc1
Zheng Yongjun <zhengyongjun3(a)huawei.com>
fib: Return the correct errno code
Zheng Yongjun <zhengyongjun3(a)huawei.com>
net: Return the correct errno code
Zheng Yongjun <zhengyongjun3(a)huawei.com>
net/x25: Return the correct errno code
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
rtnetlink: Fix missing error code in rtnl_bridge_notify()
Victor Zhao <Victor.Zhao(a)amd.com>
drm/amd/amdgpu:save psp ring wptr to avoid attack
Roman Li <roman.li(a)amd.com>
drm/amd/display: Fix potential memory leak in DMUB hw_init
Rodrigo Siqueira <Rodrigo.Siqueira(a)amd.com>
drm/amd/display: Fix overlay validation by considering cursors
Jiansong Chen <Jiansong.Chen(a)amd.com>
drm/amdgpu: refine amdgpu_fru_get_product_info
Bindu Ramamurthy <bindu.r(a)amd.com>
drm/amd/display: Allow bandwidth validation for 0 streams.
Josh Triplett <josh(a)joshtriplett.org>
net: ipconfig: Don't override command-line hostnames or domains
Hannes Reinecke <hare(a)suse.de>
nvme-loop: do not warn for deleted controllers during reset
Hannes Reinecke <hare(a)suse.de>
nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
Hannes Reinecke <hare(a)suse.de>
nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
Hannes Reinecke <hare(a)suse.de>
nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
Ewan D. Milne <emilne(a)redhat.com>
scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V
Larry Finger <Larry.Finger(a)lwfinger.net>
Bluetooth: Add a new USB ID for RTL8822CE
Daniel Wagner <dwagner(a)suse.de>
scsi: qedf: Do not put host in qedf_vport_create() unconditionally
Jiapeng Chong <jiapeng.chong(a)linux.alibaba.com>
ethernet: myri10ge: Fix missing error code in myri10ge_probe()
Maurizio Lombardi <mlombard(a)redhat.com>
scsi: target: core: Fix warning on realtime kernels
Hillf Danton <hdanton(a)sina.com>
gfs2: Fix use-after-free in gfs2_glock_shrink_scan
Felix Fietkau <nbd(a)nbd.name>
mt76: mt7921: remove leftover 80+80 HE capability
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: Add AlderLake-M PCI ID
Khem Raj <raj.khem(a)gmail.com>
riscv: Use -mno-relax when using lld linker
Ye Xiang <xiang.ye(a)intel.com>
HID: intel-ish-hid: ipc: Add Alder Lake device IDs
Bixuan Cui <cuibixuan(a)huawei.com>
HID: gt683r: add missing MODULE_DEVICE_TABLE
Hans de Goede <hdegoede(a)redhat.com>
HID: multitouch: Disable event reporting on suspend on the Asus T101HA touchpad
Bob Peterson <rpeterso(a)redhat.com>
gfs2: Clean up revokes on normal withdraws
Bob Peterson <rpeterso(a)redhat.com>
gfs2: fix a deadlock on withdraw-during-mount
Andreas Gruenbacher <agruenba(a)redhat.com>
gfs2: Prevent direct-I/O write fallback errors from getting lost
Yongqiang Liu <liuyongqiang13(a)huawei.com>
ARM: OMAP2+: Fix build warning when mmc_omap is not built
Maciej Falkowski <maciej.falkowski9(a)gmail.com>
ARM: OMAP1: Fix use of possibly uninitialized irq variable
Chu Lin <linchuyuan(a)google.com>
hwmon/pmbus: (q54sj108a2) The PMBUS_MFR_ID is actually 6 chars instead of 5
Thierry Reding <treding(a)nvidia.com>
drm/tegra: sor: Fully initialize SOR before registration
Thierry Reding <treding(a)nvidia.com>
gpu: host1x: Split up client initalization and registration
Pavel Machek (CIP) <pavel(a)denx.de>
drm/tegra: sor: Do not leak runtime PM reference
Felix Fietkau <nbd(a)nbd.name>
mt76: mt7921: fix max aggregation subframes setting
Anirudh Rayabharam <mail(a)anirudhrb.com>
HID: usbhid: fix info leak in hid_submit_ctrl
Mark Bolhuis <mark(a)bolhuis.dev>
HID: Add BUS_VIRTUAL to hid_connect logging
Ahelenia Ziemiańska <nabijaczleweli(a)nabijaczleweli.xyz>
HID: multitouch: set Stylus suffix for Stylus-application devices, too
Saeed Mirzamohammadi <saeed.mirzamohammadi(a)oracle.com>
HID: quirks: Add quirk for Lenovo optical mouse
Luke D Jones <luke(a)ljones.dev>
HID: asus: filter G713/G733 key event to prevent shutdown
Srinivas Pandruvada <srinivas.pandruvada(a)linux.intel.com>
HID: hid-sensor-hub: Return error for hid_set_field() failure
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
HID: hid-input: add mapping for emoji picker key
Mateusz Jończyk <mat.jonczyk(a)o2.pl>
HID: a4tech: use A4_2WHEEL_MOUSE_HACK_B8 for A4TECH NB-95
Hans de Goede <hdegoede(a)redhat.com>
HID: quirks: Add HID_QUIRK_NO_INIT_REPORTS quirk for Dell K15A keyboard-dock
Nirenjan Krishnan <nirenjan(a)gmail.com>
HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65
Luke D Jones <luke(a)ljones.dev>
HID: asus: Filter keyboard EC for old ROG keyboard
Dan Robertson <dan(a)dlrobertson.com>
net: ieee802154: fix null deref in parse dev addr
-------------
Diffstat:
Makefile | 4 +--
arch/arm/mach-omap1/pm.c | 10 ++++--
arch/arm/mach-omap2/board-n8x0.c | 2 +-
arch/riscv/Makefile | 9 +++++
drivers/bluetooth/btusb.c | 2 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 42 ++++++++++++----------
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 +
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 3 +-
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 3 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++--
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +-
drivers/gpu/drm/tegra/sor.c | 41 +++++++++++----------
drivers/gpu/host1x/bus.c | 30 ++++++++++++----
drivers/hid/Kconfig | 4 +--
drivers/hid/hid-a4tech.c | 2 ++
drivers/hid/hid-asus.c | 12 ++++++-
drivers/hid/hid-core.c | 3 ++
drivers/hid/hid-debug.c | 1 +
drivers/hid/hid-gt683r.c | 1 +
drivers/hid/hid-ids.h | 4 +++
drivers/hid/hid-input.c | 3 ++
drivers/hid/hid-multitouch.c | 36 +++++++++++++++----
drivers/hid/hid-quirks.c | 4 +++
drivers/hid/hid-sensor-hub.c | 13 ++++---
drivers/hid/intel-ish-hid/ipc/hw-ish.h | 2 ++
drivers/hid/intel-ish-hid/ipc/pci-ish.c | 2 ++
drivers/hid/usbhid/hid-core.c | 2 +-
drivers/hwmon/pmbus/q54sj108a2.c | 2 +-
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
drivers/net/wireless/mediatek/mt76/mt7921/init.c | 4 +--
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 3 +-
drivers/nvme/target/loop.c | 11 ++++--
drivers/scsi/qedf/qedf_main.c | 20 +++++------
drivers/scsi/scsi_devinfo.c | 1 +
drivers/target/target_core_transport.c | 4 +--
fs/gfs2/file.c | 5 ++-
fs/gfs2/glock.c | 26 +++++++++++---
fs/gfs2/log.c | 6 ++--
fs/gfs2/log.h | 1 +
fs/gfs2/lops.c | 7 +++-
fs/gfs2/lops.h | 1 +
fs/gfs2/util.c | 1 +
include/linux/hid.h | 3 +-
include/linux/host1x.h | 30 ++++++++++++----
include/uapi/linux/input-event-codes.h | 1 +
net/compat.c | 2 +-
net/core/fib_rules.c | 2 +-
net/core/rtnetlink.c | 4 ++-
net/ieee802154/nl802154.c | 9 ++---
net/ipv4/ipconfig.c | 13 ++++---
net/x25/af_x25.c | 2 +-
sound/hda/intel-dsp-config.c | 4 +++
sound/pci/hda/hda_intel.c | 3 ++
53 files changed, 297 insertions(+), 121 deletions(-)
This is a note to let you know that I've just added the patch titled
iio: light: tcs3472: do not free unallocated IRQ
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the staging-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 7cd04c863f9e1655d607705455e7714f24451984 Mon Sep 17 00:00:00 2001
From: frank zago <frank(a)zago.net>
Date: Mon, 26 Apr 2021 21:20:17 -0500
Subject: iio: light: tcs3472: do not free unallocated IRQ
Allocating an IRQ is conditional to the IRQ existence, but freeing it
was not. If no IRQ was allocate, the driver would still try to free
IRQ 0. Add the missing checks.
This fixes the following trace when the driver is removed:
[ 100.667788] Trying to free already-free IRQ 0
[ 100.667793] WARNING: CPU: 0 PID: 2315 at kernel/irq/manage.c:1826 free_irq+0x1fd/0x370
...
[ 100.667914] Call Trace:
[ 100.667920] tcs3472_remove+0x3a/0x90 [tcs3472]
[ 100.667927] i2c_device_remove+0x2b/0xa0
Signed-off-by: frank zago <frank(a)zago.net>
Link: https://lore.kernel.org/r/20210427022017.19314-2-frank@zago.net
Fixes: 9d2f715d592e ("iio: light: tcs3472: support out-of-threshold events")
Cc: <Stable(a)vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
---
drivers/iio/light/tcs3472.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c
index 90dc3fef59e6..371c6a39a165 100644
--- a/drivers/iio/light/tcs3472.c
+++ b/drivers/iio/light/tcs3472.c
@@ -535,7 +535,8 @@ static int tcs3472_probe(struct i2c_client *client,
return 0;
free_irq:
- free_irq(client->irq, indio_dev);
+ if (client->irq)
+ free_irq(client->irq, indio_dev);
buffer_cleanup:
iio_triggered_buffer_cleanup(indio_dev);
return ret;
@@ -563,7 +564,8 @@ static int tcs3472_remove(struct i2c_client *client)
struct iio_dev *indio_dev = i2c_get_clientdata(client);
iio_device_unregister(indio_dev);
- free_irq(client->irq, indio_dev);
+ if (client->irq)
+ free_irq(client->irq, indio_dev);
iio_triggered_buffer_cleanup(indio_dev);
tcs3472_powerdown(iio_priv(indio_dev));
--
2.32.0