* This fixes an issue with stuck scrolling specifically on fod area.
Test: Open chrome, search for a long website, scroll through
fod area and check that it doesn't get stuck.
This has been a thing for months and it constantly bothered me, while not really being an issue. The problem is just that this log keeps spamming every time you put the finger down and up. Please don't murder me for this
commit feee70f4568650cf44c573488798ffc0a2faeea3 upstream.
While doing my research to improve the xpad device names I noticed
that the 1532:0037 VID/PID seems to be used by the DeathAdder 2013,
so that Razer Sabertooth instance looked wrong and very suspect to
me. I didn't see any mention in the official drivers, either.
After doing more research, it turns out that the xpad list
is used by many other projects (like Steam) as-is [1], this
issue was reported [2] and Valve/Sam Lantinga fixed it [3]:
[1]: dcc5eef0e2/src/joystick/controller_type.h (L251)
[2]: https://steamcommunity.com/app/353380/discussions/0/1743392486228754770/
[3]: https://hg.libsdl.org/SDL/rev/29809f6f0271
(With multiple Internet users reporting similar issues, not linked here)
After not being able to find the correct VID/PID combination anywhere
on the Internet and not receiving any reply from Razer support I did
some additional detective work, it seems like it presents itself as
"Razer Sabertooth Gaming Controller (XBOX360)", code 1689:FE00.
Leaving us with this:
* Razer Sabertooth (1689:fe00)
* Razer Sabertooth Elite (24c6:5d04)
* Razer DeathAdder 2013 (1532:0037) [note: not a gamepad]
So, to sum things up; remove this conflicting/duplicate entry:
{ 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 },
As the real/correct one is already present there, even if
the Internet as a whole insists on presenting it as the
Razer Sabertooth Elite, which (by all accounts) is not:
{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
Actual change in SDL2 referencing this kernel issue:
e5e5416975
For more information of the device, take a look here:
https://github.com/xboxdrv/xboxdrv/pull/59
You can see a lsusb dump here: https://github.com/xboxdrv/xboxdrv/files/76581/Qa6dBcrv.txt
Fixes: f554f619b7 ("Input: xpad - sync device IDs with xboxdrv")
Signed-off-by: Ismael Ferreras Morezuelas <swyterzone@gmail.com>
Reviewed-by: Cameron Gutman <aicommander@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/5c12dbdb-5774-fc68-5c58-ca596383663e@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit a85fbd6498441694475716a4d5c65f9d3e073faf ]
As can be seen in elants_i2c_power_off(), we want the reset GPIO
asserted when power is off. The reset GPIO is active low so we need
the reset line logic low when power is off to avoid leakage.
We have a problem, though, at probe time. At probe time we haven't
powered the regulators on yet but we have:
devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
While that _looks_ right, it turns out that it's not. The
GPIOD_OUT_LOW doesn't mean to init the GPIO to low. It means init the
GPIO to "not asserted". Since this is an active low GPIO that inits it
to be high.
Let's fix this to properly init the GPIO. Now after both probe and
power off the state of the GPIO is consistent (it's "asserted" or
level low).
Once we fix this, we can see that at power on time we no longer to
assert the reset GPIO as the first thing. The reset GPIO is _always_
asserted before powering on. Let's fix powering on to account for
this.
Fixes: afe10358e4 ("Input: elants_i2c - wire up regulator support")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20221117123805.1.I9959ac561dd6e1e8e1ce7085e4de6167b27c574f@changeid
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Upstream commit ac5408991ea6b06e29129b4d4861097c4c3e0d59 ]
The device works fine in native RMI mode, there is no reason to use legacy
PS/2 mode with it.
Signed-off-by: Aman Dhoot <amandhoot12@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
commit a17b9841152e7f4621619902b347e2cc39c32996 upstream.
Suspending and resuming the system can sometimes cause the out
URB to get hung after a reset_resume. This causes LED setting
and force feedback to break on resume. To avoid this, just drop
the reset_resume callback so the USB core rebinds xpad to the
wireless pads on resume if a reset happened.
A nice side effect of this change is the LED ring on wireless
controllers is now set correctly on system resume.
Cc: stable@vger.kernel.org
Fixes: 4220f7db1e ("Input: xpad - workaround dead irq_out after suspend/ resume")
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Link: https://lore.kernel.org/r/20220818154411.510308-3-rojtberg@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Squashed commit of the following:
commit 3b9d24a9265b0c4211950f39ee5bc21261410db6
Author: Kazuki Hashimoto <kazukih@tuta.io>
Date: Sun Jun 19 10:44:11 2022 +0900
ipa: Allocate page with __GFP_RETRY_MAYFAIL and __GFP_NOWARN
Taken from Google.
5c90cf2148
Signed-off-by: Kazuki Hashimoto <kazukih@tuta.io>
commit 07beb1e16313d84eb6239e8d007a9414f1d17ce9
Author: Luan Cachoroski Halaiko <luhalaiko@gmail.com>
Date: Wed Feb 9 21:14:31 2022 -0300
[1/5] drivers: platform: msm: ipa: add a switch to disable DEBUG_FS
--> User builds don't need debugfs, this is the first of 5 patches
that add a switch disabling DEBUG_FS on user builds, bringing
kernel size a bit down and providing less spamming on kernel log
Signed-off-by: Luan Cachoroski Halaiko <luhalaiko@gmail.com>
commit 74c16e08c078ca3ac5f0d2d7af691ed10f0e5a53
Author: Pooja Kumari <kumarip@codeaurora.org>
Date: Wed Mar 11 19:15:04 2020 +0530
msm: ipa3: increase rmnet_ipa timeout value
With current timeout value rmnet_ipa driver is
getting watchdog timeout. Increase timeout value
to avoid timeout error.
Bug: 134918361
Test: Browsing/Speedtest/SST
Change-Id: I76b35948968114c6540294fe1b560003bed5e1fb
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
commit e5d5511b3c2b3a5e1cddd39d058488e5c9d4f0cd
Author: Andrzej Perczak <linux@andrzejperczak.com>
Date: Thu Jul 7 21:29:27 2022 +0200
msm: ipa: Cast enums to fix compiler warnings
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit 24e6f2b99953b50b60ef998fec8010eececa439e
Author: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Date: Mon Jul 4 15:56:28 2022 +0200
msm: ipa3: Fix to avoid gsi/sys len stats mismatch
In suspend just before stopping the channel possible to receive
the IEOB interrupt and xfer pointer will not be processed in this
mode but gsi stats are updated. In resume after starting the channel
will receive the IEOB interrupt and xfer pointer will be overwritten
because of this observing the gsi/sys len stats are not matching and
buffers won't be replinished properly leading to HW stall.
To avoid this process all data in polling context, gsi/sys len
stats are updated properly.
Change-Id: Id665448165b6aa51b251cddd72573c6df64ee541
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit e9bf5fcaa70735ad327431a8a8131a505807a2b7
Author: Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Date: Sun Dec 19 13:43:23 2021 +0100
msm: ipa: use detach/attach netif instead of stop/wakeup
To make sure detach and attach netif instead of stop
and wakeup and also to update transfer timer update.
Change-Id: I9d589b7f9f6fe98f778df509d3c16f339dfdeea1
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit 96053803d70c48e3dbc2e986dc0ec78bc9129aa4
Author: Andrzej Perczak <linux@andrzejperczak.com>
Date: Sun Dec 19 13:41:39 2021 +0100
Revert "msm: ipa: Fix to avoid NETDEV WATCHDOG warning logs"
This reverts commit 7f6c43f620.
commit a9becf6c3ae3e78ac51872b4c1f61c7fed6f0e11
Author: Amir Levy <alevy@codeaurora.org>
Date: Sun Dec 12 22:58:00 2021 +0100
msm: ipa: added likely/unlikely branch prediction to the lan dp
Added branch prediction in an effort to make
the data path more efficent.
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Change-Id: I3bd2157ee6c263d89de9425c7a0249370ab918fc
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit 1f411db6f9962c991120c26b6f7aba0afc316122
Author: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Date: Thu Apr 2 22:26:35 2020 +0530
msm: ipa3: Fix to use paired PM operation for IPA
Becauase of using wrong pair of PM operation device
was not resuming if suspend fails. Adding changes to
use correct set of PM operations.
Change-Id: Ib9fdea8f93f0a6dafbd5908dc8fc2bbf4f1e0904
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit 5719e064761ead0ed048127bc3144ff10ad592f1
Author: Kailash <kailash.sudhakar@gmail.com>
Date: Thu Apr 16 01:38:29 2020 +0530
drivers: msm: ipa_v3: Return operation unsupported when CONFIG_PCI is unset
From 100.10.107.46 source drop
commit 2a9bf475119b27b56fda73f9e8c432f6e894c19a
Author: Bojun Pan <bojunp@codeaurora.org>
Date: Fri Jan 31 22:24:47 2020 +0530
msm: ipa: Fix the force_coals command stuck issue on AP suspend
IPA force_coals command stuck due to not getting the gsi interrupt.
The suspend on IPA AP/RMNET_IPA driver was registered as noirq type,
gsi interrupt handler won't be called because of this.
The fix is to change the suspend cb from suspend_noirq to suspend.
Change-Id: I148c981b0edb28c414a30b991294b2683b198399
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
commit cb9c06b83fd9957ac8d63a990847076dd34aa559
Author: Alex Naidis <alex.naidis@paranoidandroid.co>
Date: Tue Jul 31 16:37:16 2018 -0400
msm: ipa_v3: Mitigate usleep_range calls
Calling usleep_range with identical min and max values,
results in a delta of 0us.
This causes the issue that the scheduler gets no chance to re-use an already
scheduled interrupt for this wait which results in a negative performance
impact by adding uninterruptible sleep.
Fix the issue by allowing the delay to take 20% longer than requested.
This should be good enough for these cases.
Signed-off-by: Alex Naidis <alex.naidis@paranoidandroid.co>
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
commit 0ec1247d32dd39a8b4a0b2da78c58c2537c4ead3
Author: Sultan Alsawaf <sultan@kerneltoast.com>
Date: Tue Jan 12 00:08:29 2021 -0800
msm: ipa3: Fix non-atomic read on atomic_t variable
Accessing an atomic variable without the atomic_*() helpers is illegal.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
commit 891f71a631b08746b7070c0f35a06be03e1784fe
Author: Sultan Alsawaf <sultan@kerneltoast.com>
Date: Tue Jan 12 00:07:19 2021 -0800
msm: ipa3: Fix format specifier warnings
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
commit 68fba094615efc7c1131d8e6df0be7863a0938ad
Author: Sultan Alsawaf <sultan@kerneltoast.com>
Date: Thu Dec 24 22:53:54 2020 -0800
msm: ipa: Refactor buffer size check in ipa3_write()
This confuses GCC's FORTIFY_SOURCE check for the copy_from_user() in
this function. Simplify it to resolve the GCC warning.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
commit 883cd9e245955fcdd8ed1c4166b8f4324d3ac090
Author: Sami Tolvanen <samitolvanen@google.com>
Date: Fri Jan 19 11:19:11 2018 -0800
msm: ipa3: fix callback function type for ndo_start_xmit
Bug: 117299373
Change-Id: Iad7ed493bd29e2da85e2d6bc0f1dc0fbdac8a41d
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
commit 98d90c2ac07a802751b31b0afff300dce17ad511
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:50:52 2022 +0300
\Revert "drivers: ipa_v3: Conditionally compile out ipa wakelock code"
This reverts commit e46958360f.
commit 314eab9899967ab6487bd8163ef6404106cbd602
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:50:49 2022 +0300
Revert "[1/5] drivers: platform: msm: ipa: add a switch to disable DEBUG_FS"
This reverts commit 9f9dc2f45c.
commit 090ab7d9400bba97b2fc0d68cb5b5cc3a986376a
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:50:06 2022 +0300
Revert "msm: ipa_v3: Mitigate usleep_range calls"
This reverts commit df2ea99946.
commit 23234070df088d9b08ae61bb1b99f1749e2b76cb
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:49:59 2022 +0300
Revert "drivers: msm-ipa: Only include emulation init with CONFIG_IPA_EMULATION"
This reverts commit c827afff53.
commit 550cb7c2a4eccb3aa8452399d3311aa2a4825dfd
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:49:47 2022 +0300
Revert "msm: ipa: Fix the force_coals command stuck issue on AP suspend"
This reverts commit a7d75b5f3e.
commit 510b440d3df7ea9c3f6b5537b60cac0c39269912
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:49:38 2022 +0300
Revert "msm: ipa3: Fix to use paired PM operation for IPA"
This reverts commit 00cbc4db2c.
commit 245f9a9d555c6b0488c6031fd2d3cbfda38651c2
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:49:23 2022 +0300
Revert "rmnet_ipa: Fix netdev watchdog triggering on suspend"
This reverts commit d42f2391da.
commit d385eb5a1e8c65231edf8b3b73953e952b560038
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:48:57 2022 +0300
Revert "ipa: Allocate page with __GFP_RETRY_MAYFAIL and __GFP_NOWARN"
This reverts commit 75f9a8c6b4.
commit 119731ad74ac2cb0228d5571020e37a0cf67784b
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:48:47 2022 +0300
Revert "msm: ipa: Cast enums to fix compiler warnings"
This reverts commit 9eaf6d119f.
commit 91aaadc7d9d66819f26490899abfa0ace5c014c8
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:48:06 2022 +0300
Revert "msm: ipa3: increase rmnet_ipa timeout value"
This reverts commit 4503a36ec7.
commit 1a88043379494ba9c343a8736e4921c44d40252c
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:48:00 2022 +0300
Revert "msm: ipa3: fix callback function type for ndo_start_xmit"
This reverts commit a25522ebfe.
commit 0a2748e422c0aa56be9d07bd5effc50ff05d7874
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:47:50 2022 +0300
Revert "platform: msm: ipa: Correctly allocate memory for copy_from_user"
This reverts commit c18f8ff38c.
commit c032130a46746b3e4b6e0ae41cb96c58f11521da
Author: kondors1995 <normandija1945@gmail.com>
Date: Mon Oct 17 13:47:42 2022 +0300
Revert "platform: msm: ipav3: Correct smallest ipa3_write string to 1."
This reverts commit 2fff1651ec.
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct foo {
int stuff;
void *entry[];
};
instance = kmalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL);
This patch makes the changes for kmalloc()-family (and kvmalloc()-family)
uses. It was done via automatic conversion with manual review for the
"CHECKME" non-standard cases noted below, using the following Coccinelle
script:
// pkey_cache = kmalloc(sizeof *pkey_cache + tprops->pkey_tbl_len *
// sizeof *pkey_cache->table, GFP_KERNEL);
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
identifier VAR, ELEMENT;
expression COUNT;
@@
- alloc(sizeof(*VAR) + COUNT * sizeof(*VAR->ELEMENT), GFP)
+ alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
// mr = kzalloc(sizeof(*mr) + m * sizeof(mr->map[0]), GFP_KERNEL);
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
identifier VAR, ELEMENT;
expression COUNT;
@@
- alloc(sizeof(*VAR) + COUNT * sizeof(VAR->ELEMENT[0]), GFP)
+ alloc(struct_size(VAR, ELEMENT, COUNT), GFP)
// Same pattern, but can't trivially locate the trailing element name,
// or variable name.
@@
identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
expression GFP;
expression SOMETHING, COUNT, ELEMENT;
@@
- alloc(sizeof(SOMETHING) + COUNT * sizeof(ELEMENT), GFP)
+ alloc(CHECKME_struct_size(&SOMETHING, ELEMENT, COUNT), GFP)
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Release I2C session lock before releasing IO regions in TVM
during trusted touch scenario.
Change-Id: If943165b687318eac6c5f7b734bc6dea4c0efa46
Signed-off-by: ppadasal <quic_ppadasal@quicinc.com>
Toggle reset gpio of touch controller during an error scenario
on Secondary Virtual Machine(SVM).
Change-Id: Id5fdbb8e0106e636676060edfb05b6219f7400c8
Signed-off-by: ppadasal <quic_ppadasal@quicinc.com>