Commit graph

899,647 commits

Author SHA1 Message Date
qctecmdr
20e78130d6 Merge "serial: msm_geni_serial: Fix deadlock scenario with rx_lock" 2021-09-03 04:59:00 -07:00
qctecmdr
6860a12e0a Merge "dmaengine: gpi: Add support to dump GPI registers by clients" 2021-09-03 04:59:00 -07:00
qctecmdr
52d4b09f35 Merge "msm: kgsl: Fix list corruption in worker initialization of mem_entry" 2021-09-03 04:59:00 -07:00
qctecmdr
a129649871 Merge "soc: qcom: sdx_ext_ipc: Change GPIO configuration" 2021-09-03 04:58:59 -07:00
qctecmdr
41a30cb9e4 Merge "serial: msm_geni_serial: Avoid manual RFR flow control for OBS" 2021-09-03 04:58:59 -07:00
qctecmdr
3ab0300a3d Merge "defconfig: Disable RTL8152 config on sdxlemur" 2021-09-03 04:58:57 -07:00
qctecmdr
21c7ca2b0a Merge "i2c: i2c-msm-geni: Skip BW vote for PMIC used I2C SE node" 2021-09-03 01:09:54 -07:00
qctecmdr
bb4838a3dc Merge "defconfig: sdxlemur: Enable cnss2 driver as module" 2021-09-03 01:09:53 -07:00
Taniya Das
6d39fb3bdc clk: smd: rpm: Add a qup active only vote for HOLI
The pm8008 regulator is connected over I2C and the I2C device configures
its BW vote in runtime_resume and runtime_suspend. These callbacks are
triggered from the pm8008 driver's regmap calls. This means regulator
framework requests for pm8008 call into the ICC framework which in turn
calls into clock framework.
The qcom rpm smd clock providers calls into RPM message with the
the regulator framework, ICC framework and  clock framework locks held.

To prevent these deadlocks, enable the I2C qup clocks required for pm8008
by default during probe and stop requesting for clock enable/rate from the
framework.

Change-Id: Ifd486bec85a46139ccb15f4b5dbd2d43c33f3fda
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-09-02 18:16:10 -07:00
Mukesh Kumar Savaliya
90e0b5fd60 dmaengine: gpi: Add support to dump GPI registers by clients
This is to add gpi register dump support where clients can directly
call the API to dump GSI registers. This helps debug when GSI transfer
has any issue like timeout, no callback etc at the client driver and
want to dump register directly based on the need.

Change-Id: I1d9fadd51ccea166f2a486e84a8de47c134e435b
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-09-02 03:33:28 -07:00
Chandana Kishori Chiluveru
ae7aa712f4 serial: msm_geni_serial: Fix deadlock scenario with rx_lock
In one core msm_geni_serial driver acquiring port->rx_lock in
stop_rx_sequencer function in process context by calling handle_rx_dma_xfer
and this process is preempted becz of core interrupt is
fired on same core and then same lock is trying to acquire
from interrupt context. This is resulting in deadlock issue.

Below are the core call stack of deadlock.

Core 0 LR: _raw_spin_lock[jt]+40 <ffffffe973336e14>
[<ffffffe971f1df5c>] handle_rx_dma_xfer+0x44
[<ffffffe971f1ec70>] msm_geni_serial_handle_isr+0x6fc
[<ffffffe971f1f6ec>] msm_geni_serial_isr+0x40
[<ffffffe9721634a8>] __handle_irq_event_percpu+0x158
[<ffffffe9721637d8>] handle_irq_event+0x60
[<ffffffe972169548>] handle_fasteoi_irq+0x128
[<ffffffe972162364>] __handle_domain_irq+0xa0
[<ffffffe971e81b64>] gic_handle_irq$7f58c51dd0f0d487d89dbb027abc57c5+0xb8
[<ffffffe971e83f84>] el1_irq+0x104
[<ffffffe971f1df68>] handle_rx_dma_xfer+0x50
[<ffffffe971f1d9ac>] stop_rx_sequencer+0x118
[<ffffffe971f20f94>] msm_geni_serial_set_termios+0x114
[<ffffffe9726dbd30>] uart_change_speed+0x58
[<ffffffe9726ddf40>] uart_set_termios$ecf561cdccc9a487f79dc2d4825d91c7+0xd4
[<ffffffe9726d033c>] tty_set_termios[jt]+0x1c0
[<ffffffe9726d0c2c>] set_termios+0x124
[<ffffffe9726d0894>] tty_mode_ioctl+0x468
[<ffffffe9726d117c>] n_tty_ioctl_helper+0xac
[<ffffffe9726cc498>] n_tty_ioctl$31461d4e731178606d28313f43c714a4[jt]+0x318
[<ffffffe9726c80cc>] tty_ioctl+0x37c
[<ffffffe9723185fc>] do_vfs_ioctl+0x384
[<ffffffe97231923c>] __arm64_sys_ioctl+0x78
[<ffffffe9720be588>] el0_svc_common[jt]+0xd8
[<ffffffe9720be4c8>] el0_svc_handler+0x68
[<ffffffe971e84e88>] ret_to_user[jt]+0x0.

Change-Id: I7e1392cd82a93b1da6b19f05dbe67b66d46193f1
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2021-09-02 01:41:45 -07:00
Mukesh Kumar Savaliya
417537107c i2c: i2c-msm-geni: Skip BW vote for PMIC used I2C SE node
This change is a workaround change to fix the PMIC race condition
with the clock enablement. In case of PMIC txfer over i2c, I2C driver
resumes and votes for BW and clocks. The BW vote goes to RPM and that
in turn waiting for the global PMIC mutex causing race condition in
rare cases.

Hence as a workaroun, do not vote for the BW vote only for PMIC used
I2C SE instance.

Change-Id: I94c57427200a71dd2792533b1af249940b0bf03f
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
2021-09-01 02:20:28 -07:00
Will Huang
62b58f4ac2 defconfig: sdxlemur: Enable cnss2 driver as module
Enable cnss2 driver as module as requested on sdxlemur.

CRs-Fixed: 3016737
Change-Id: I0d8971c60d765fbfbee55ba1d215a2eb1ebc5659
Signed-off-by: Will Huang <wilhuang@codeaurora.org>
2021-09-01 15:19:05 +08:00
Prasanna Kumar Thoorvas Samyrao Muralidharan
0106d8287c soc: qcom: sdx_ext_ipc: Change GPIO configuration
Changing GPIO output value is not reflecting. Change GPIO pull up
configuration from pull up to no pull to reflect state change.

Change-Id: Iac636b9b601b9819ee7aac2118c1af3b0f864e86
Signed-off-by: Prasanna Kumar Thoorvas Samyrao Muralidharan <ptsm@codeaurora.org>
2021-09-01 11:43:11 +05:30
Prateek Raj Singh
528dad421a FM: mutex changes modified
Removed unrequired mutexes, and conditions.

CRs-Fixed: 3026494
Change-Id: Ib216567e80c8bf29257d11f4565865eebb8d2585
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-08-31 20:19:54 +05:30
qctecmdr
af0f012029 Merge "icnss2: Enable PHY processor SSR along with WPSS SSR" 2021-08-30 16:30:45 -07:00
Raihan Haider
24557c6da1 net: stmmac: Add CONFIG_IPV6 check
Add CONFIG_IPV6 check to ipv6 specific early eth code

Change-Id: Ib1b266e6da7243e4a1b2d3507b0d19b119e2ebdc
Signed-off-by: Raihan Haider<rhaider@codeaurora.org>
2021-08-30 03:46:07 -07:00
Naman Padhiar
047f485e92 icnss2: Enable PHY processor SSR along with WPSS SSR
Register notifier to get notification for restart_level
change of WPSS and send SMP2P command to FW to enable
PHY processor SSR.

Change-Id: Id0edb6ab6a44fbca83b2dbe6bad7c86e2540d865
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-30 02:25:51 -07:00
Pankaj Gupta
ff332e83f2 msm: kgsl: Fix list corruption in worker initialization of mem_entry
While deferring mem_entry_put, we are doing INIT_WORK for entry.
When mem_entry_put get called again for the same entry before
execution of previous work finishes, there is a chance of corruption
in the list and cause a crash. Update kgsl_mem_entry_put_deferred
to put refcount on mem entry and trigger deferred mem entry destroy
only when refcount on entry is the last refcount.

Change-Id: I2a8533fd26e776d49ab128bdb484053ce3bc82dc
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
2021-08-30 12:51:32 +05:30
Yogesh Lal
a72d52e9ec arm: defconfig: Enable SDX_EXT_IPC external ipc driver
This enables the module to help modem communicate
with external Application processor.

Change-Id: I839f00a28f668fac062157bf24437cf7605a9482
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
Signed-off-by: Rohit Agarwal <rohiagar@codeaurora.org>
2021-08-30 08:50:38 +05:30
Pavankumar Vijapur
445f77d01d drivers: qcom: sdx_ext_ipc: keep wakeup irq always on
When suspend is in progress on local processor, if
remote processor toggles GPIO to indicate a resume
event to local processor, this event may get lost.
This commit addresses this situation.

1. Add IRQF_NO_SUSPEND flag so that wakeup_irq is
not disabled during suspend on local processor.

2. Install primary handler that inform pm core
that a system wakeup event has happened. The pm
core can then abort a suspend in progress.

Change-Id: I8d84f15a118c4630bde7b9db35ffadddeb937cb9
Signed-off-by: Pavankumar Vijapur <pvijapur@codeaurora.org>
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-08-30 08:49:58 +05:30
Rishi Gupta
15614d336d drivers: qcom: sdx_ext_ipc: notify remote processor wokeup
When the remote processor wants to wake up local processor
it toggles one of the GPIO. The IRQ handler at local
end will notify registered listeners about it.

Change-Id: Iccbfb7c86538c1e111c97bbe438ef5846182405e
Signed-off-by: Rishi Gupta <rishgupt@codeaurora.org>
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
2021-08-30 08:48:39 +05:30
qctecmdr
8e9243189d Merge "clk: qcom: gcc: Lower the frequency for sdxlemur from 200 to 171MHz" 2021-08-27 09:16:15 -07:00
qctecmdr
187e9a162b Merge "ARM: gic: Add support for logging interrupts in RTB" 2021-08-27 09:16:15 -07:00
qctecmdr
5581c905ea Merge "drivers: thermal: Update Ibat scaling factor for Mando" 2021-08-27 09:16:14 -07:00
qctecmdr
fb84cc3a1e Merge "usb: dwc3: debugfs: Add suppot for Enabling L1 in HS through debugfs" 2021-08-27 09:16:14 -07:00
qctecmdr
8b8860e43d Merge "icnss2: Properly handle SOC_WAKE req stuck in QMI" 2021-08-27 09:16:13 -07:00
Kamal Agrawal
097e7abad2 msm: kgsl: Print map count instead of map size
/sys/kernel/debug/kgsl/proc/<pid>/mem prints incorrect map size
in some cases. Currently, memdesc size is printed as map size.
Because of this, map size shows non-zero value even for unmapped
buffers. Since kgsl buffers can be mapped multiple times, update
the print to map count instead of map size.

Change-Id: I7970580bc3b1c9a30ca0d72d9caf89af1ce09740
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-27 05:13:36 -07:00
Taniya Das
047b20cc26 clk: qcom: gcc: Lower the frequency for sdxlemur from 200 to 171MHz
Update the sdcc clock frequency from 200MHz to 171MHz.

Change-Id: Ibada53598071e84ab600aeba9d3418d41d811357
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-08-27 01:53:03 -07:00
Gopala Krishna Nuthaki
6d64c3d3ed drivers: thermal: Update Ibat scaling factor for Mando
Update ibat conversion scaling factor for mando pmic.

Change-Id: Ie7ec584fd1205ff2ddda7848320e2ed54f14321a
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-08-26 23:42:44 +05:30
Subbaraman Narayanamurthy
6975081f29 ARM: gic: Add support for logging interrupts in RTB
To help with the debug of interrupt storms and problems during IRQ
handling, log the IRQ number in RTB for each interrupt that fires.

Change-Id: Icea5ded0f7d66ba3c7608793e7c25218e2a64e0c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[aiquny: resolve trivial merge conflicts]
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2021-08-26 08:41:08 -07:00
qctecmdr
52838777d3 Merge "msm: kgsl: Free the memory allocated for pages array in failure case" 2021-08-26 08:40:21 -07:00
Puranam V G Tejaswi
29204b2e9e msm: kgsl: Free the memory allocated for pages array in failure case
kgsl_system_alloc_pages and kgsl_pool_alloc_pages allocate memory for
pages array. This memory is not freed in kgsl_alloc_secure_pages in
some failure cases. Free the allocated memory in case of failure to
avoid memory leak issues.

Change-Id: Ifed2573506d549f60d01f8d3ba06cbabdc9878e0
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
2021-08-26 13:13:49 +05:30
Fenglin Wu
5d7d9d76f6 input: qcom-hv-haptics: ignore pattern_src when checking hBoost ready
Commit b610aa2d70a3 ("input: qcom-hv-haptics: Ignore checking HBoost status
when SWR is playing") is added to ignore checking hBoost ready status when
triggering a non-FIFO play with SWR playing in the background. This should
be also applicable when triggering a FIFO play, so remove the pattern_src
check as the HBoost should be always ready when triggering the play with
SWR playing in the background.

Change-Id: If3d5ff7138e189c81991775d7814229c4d0e8c0a
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-08-26 11:29:34 +08:00
qctecmdr
07071b6c92 Merge "PCI: Disable L0s and L1 support 0x1104" 2021-08-25 08:01:32 -07:00
qctecmdr
102be7c17f Merge "usb: f_fs: Prevent race between ep0_release & reset_work" 2021-08-25 08:01:31 -07:00
qctecmdr
149a269cff Merge "usb: gadget: gsi: Avoid accessing an uninitialized variable" 2021-08-25 08:01:31 -07:00
qctecmdr
fa98c03b65 Merge "msm: mhi-dev: Flush ereqs from dev close to avoid OOS transfers" 2021-08-25 08:01:31 -07:00
qctecmdr
e5122a163d Merge "USB: configfs: Send DISCONNECT uevent during UDC bind" 2021-08-25 08:01:30 -07:00
qctecmdr
4283f88031 Merge "fuse: fix bad inode" 2021-08-25 08:01:30 -07:00
qctecmdr
62446f7f66 Merge "msm: kgsl: Change data type for ret in kgsl_mmap" 2021-08-25 08:01:30 -07:00
qctecmdr
6934438ea2 Merge "defconfig: sdxlemur: disable panic on oom on sdxlemur" 2021-08-25 08:01:29 -07:00
Udipto Goswami
759851525d usb: dwc3: debugfs: Add suppot for Enabling L1 in HS through debugfs
Currently the kernel implementation disables L1 in HS since
there are target which does not support gadget L1.
However, implementing this leads to Ch9 compliance
failures.
Therefore implementing a debugfs parameter through which
this can be controlled, when testing for compliance it can
be set to true and carry out the tests.

Change-Id: I9cf9c49737b18ca889fcc1dbe8232a7bb999f35c
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:42:01 -07:00
Thinh Nguyen
62ff8c0acd usb: dwc3: gadget: Check for disabled LPM quirk
If the device doesn't support LPM, make sure to disable the LPM
capability and don't advertise to the host that it supports it.

Change-Id: I29ceac849220b06d2a01fa14f00483b10d7acfc0
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9e68527ff932b1646f92a7593d4092a903754666.1618366071.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-Commit: 475e8be53d0496f9bc6159f4abb3ff5f9b90e8de
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:38:53 -07:00
Udipto Goswami
286f4af0df Revert "usb: dwc3: Add support of disable L1 in HS mode"
This reverts commit c3de8d2179 ("usb: dwc3: Add support
of disable L1 in HS mode") since the patch had implemented
the functionality by changing the bcdUSB to 2.0.
Eventhough it solves the problem, this results in compliance
failures.
Fix this by reverting the implementation. This will allow
the compliance to detect the DUT as L1 supported device.

Change-Id: I30894618584ebedf697dd98e0c94a42c961bc49d
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:38:28 -07:00
Vijayanand Jitta
c03822d0c0 defconfig: sdxlemur: disable panic on oom on sdxlemur
sdx targets rely on oom killer to kill the processes as there is
no lmk. so, disable panic_on_oom on sdxlemur.

Change-Id: I4f06a0f4d6e45384d048bb5b9c61bee76d751896
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-08-24 21:35:00 -07:00
Kamal Agrawal
b7e04c58bc msm: kgsl: Change data type for ret in kgsl_mmap
ret variable is meant to store the return value which can be negative.
Change the data type from unsigned int to int.

Change-Id: I6ea46c40d22dfc6474bbfda9b0e7791d39798520
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-24 19:39:53 -07:00
Gauri Joshi
1f3617efcc msm: mhi-dev: Flush ereqs from dev close to avoid OOS transfers
Currently there is a race condition where during the flushing of ereqs
the channel is closed from the client on the EP side, which is causing
the flush function to access null memory. To avoid that call the flush
from dev close which ensures all the pending ereqs are closed before
closing the channel and freeing the memory.

Change-Id: Id81d8cb8b326340d28f6cfe9d48dcd685a8038f9
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-08-24 10:45:55 -07:00
Krishna Kurapati
f7df4abffe usb: gadget: gsi: Avoid accessing an uninitialized variable
Prevent dereferencing an uninitialized f_gsi pointer.
Return a valid gsi context only after finding a valid
gsi_opts instance. Else return NULL.

Change-Id: I75578c0bc3f4673ec66cb80bcb7a6ae328489253
Signed-off-by: Krishna Kurapati <kriskura@codeaurora.org>
2021-08-24 07:37:55 -07:00
Udipto Goswami
f431a2bae3 usb: f_fs: Prevent race between ep0_release & reset_work
When ffs_func_disable is called the driver will call set_alt
as part of which if FFS_DEACTIVATED is set then it schedules
reset_work. It further goes and tries to call epfile_destroy
where kfree is done. If within the same time, if ep0_release
is also called, it will also go forward and call epfiles_destroy.
This is because although the driver did kfree, but did't mark NULL,
which is why the if check for epfile equals NULL will fail to prevent
and will still be able to proceed. At this point the epfile instance
is corrupted therefore when in epfile_destroy it goes into the if
check which will trigger the BUG_ON check causing crash.
Following is the illustration:

                 CPU1                      CPU2
ffs_ep0_release
ffs_data_closed
ffs->state = FFS_DEACTIVATED        (atomic context)
                                    ffs_func_disable
                                    ffs_func_set_alt
                                    schedule_work(&ffs->reset_work)
ffs_epfiles_destroy(ffs->epfiles)
(running for loop not finished)

ffs_reset_work (preempts)
ffs_data_reset
ffs_data_clear
ffs_epfiles_destroy(ffs->epfiles)

Fix this by protecting the epfile_destroy calls with mutex_lock
and also ensuring to mark epfiles NULL within it.

Change-Id: I452c61ba9f404676e08550d12cb7096b8d449706
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 05:34:53 -07:00