Commit graph

899,712 commits

Author SHA1 Message Date
qctecmdr
9bf32d7027 Merge "Revert "icnss2: Enable PHY processor SSR along with WPSS SSR"" 2021-09-19 07:09:27 -07:00
qctecmdr
aa07adacf1 Merge "input: qcom-hv-haptics: Update "get_fifo_length_us" with T_LRA_X" 2021-09-17 16:15:25 -07:00
Naman Padhiar
c06d158bdb Revert "icnss2: Enable PHY processor SSR along with WPSS SSR"
This reverts commit 047f485e92.

Change-Id: I2125637403cd445066a849a8913d02e4897b2a8f
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-09-17 12:58:43 +05:30
Kiran Gunda
3cb186f032 input: qcom-hv-haptics: Update "get_fifo_length_us" with T_LRA_X
Update "get_fifo_length_us" function to support the T_LRA_X_2/4/8
periods. So that the FIFO mode can work for all T_LRA periods.

Change-Id: I5d6b2c95eff66cddcec9388082c4d540493f2c86
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2021-09-16 05:53:27 -07:00
qctecmdr
adc03f0e9a Merge "usb: dwc3: Don't perform pm rt sync operations in atomic context" 2021-09-16 04:04:07 -07:00
qctecmdr
15d558c6d7 Merge "USB: u_ether: Prevent unclocked access when running rndis interface down" 2021-09-15 16:23:47 -07:00
qctecmdr
c7c6e9717f Merge "arm64: defconfig: lahaina_QGKI: Enable CONFIG_PRINTK_CALLER" 2021-09-15 16:23:46 -07:00
Rohith Kollalsi
b269576798 usb: dwc3: Don't perform pm rt sync operations in atomic context
For mass storage function driver ep_disable will be called in worker
thread context. Making sure controller is active and then calling
ep_disable and then putting controller back to lpm is very difficult
to achieve in mass storage driver. The reason is that fsg_disable
raises an exception which actaully waits for the completion
callback to come from gadget driver and if for some reason (like
command timeout error) if it doesn't, then do_set_iterface will
not be called which will do put_sync. This can prevent controller
from going to lpm.

To solve above problem, commit ad8d260c33 ("usb: dwc3: gadget: Check
controller status with endpoint enable/disable") moved pm_runtime_sync
operations from mass storage driver to gadget driver. But there is a
chance that pm_runtime get_sync and put sync operations in gadget
driver can be called in atomic context (taking spin_lock in function
driver and then calling) and lead to crash. Adding in_lpm check and
performing these operations only if controller is in lpm will ensure
that these operations will be done only for mass storage driver and
not be done in atomic context. For other function drivers where
ep_disable will be called in atomic context, there is no chance that
ep_disable will be called when controller is in lpm as bh_work or
resume work will be called and will ensure controller to be out of
LPM before ep_disable is called.

Change-Id: I37635fd75e44a67deadbd4796b757d85d604aed4
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-09-15 09:25:14 -07:00
Rohith Kollalsi
da0ce57aed USB: u_ether: Prevent unclocked access when running rndis interface down
When in rndis composition, if device is disabled in device manager,
usb enters low power mode. Then if rndis interface is put down,
ep_disable is called leading to crash due to unclocked access as
clocks are turned off when usb enters lpm. Fix this by waking up
the controller, then performing ep_disable operation and then
putting controller back to lpm.

Change-Id: I45d29ef2e2678a3d6383d3fdd5550c8b8e156875
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-09-15 09:22:37 -07:00
Manu Gautam
7b0acdb1b0 USB: f_fs: Disable USB LPM on bus_suspend with ADB
ADB function is mainly used for debugging, hence it is
not expected to allow USB LPM followed by system suspend
in device bus suspend. Driver also doesn't handle
usb_ep_dequeue failure in LPM when adbd is interrupted
by signal as buffer is left queued to the hardware after
usb_ep_dequeue failure and can cause memory corruption.

In addition to above comments, when controller is in lpm
there is a chance that ffs_ioctl can issue clear halt as
a part of which send_gadget_ep_cmd will be called where
registers are accessed with clock's turned off leading
to crash due to unclocked access. Hence do not allow usb
lpm with adb.

Change-Id: Ib89c80318dcdd0dbb35d122a2ab77fb61f83518e
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2021-09-15 09:22:02 -07:00
Vivek Pernamitta
130b3b8d8f msm: pci: Release spinlock before notifying client
Release spinlock before notifying client driver and acquire
spinlock once done because once host notifies client driver with
an event, client can schedule an recovery in same context before
returning and expects an new event which could cause an race
condition if spinlock is acquired.
Also use list_for_each_entry_safe() while travesing the list of
registered clients for notification.

Change-Id: I6ae55032acdb1a5b14f473eadacb7a009a8df753
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-09-15 16:06:21 +05:30
satyanarayan kamasali
26248c0b87 arm64: defconfig: lahaina_QGKI: Enable CONFIG_PRINTK_CALLER
Enablig CONFIG_PRINTK_CALLER, causes printk to add a caller "thread id"
or a caller "processor id" to the  message.

Change-Id: Ifd0a2a151df71156d57344d819ce3d5583c60e53
Signed-off-by: satyanarayan kamasali <kamasali@codeaurora.org>
2021-09-15 11:29:12 +05:30
Prakruthi Deepak Heragu
8bbe418836 qcom_wdt_core: Validate the input parameters of qcom_wdt_register
Ensure that the input parameters of qcom_wdt_register is checked before
proceeding as this could cause NULL pointer dereferences.

Change-Id: I29e7eee946fb9fe0ba7fe75b96acedff7deab4bd
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2021-09-14 01:22:30 -07:00
qctecmdr
2c5e9303bf Merge "Sched: Improve the scheduler" 2021-09-13 18:03:27 -07:00
qctecmdr
e4e6533cb4 Merge "haven: hh_rm_iface: Avoid integer overflow for req_payload_size calculation" 2021-09-13 18:03:26 -07:00
Prakruthi Deepak Heragu
b59a9f3479 haven: hh_rm_iface: Avoid integer overflow for req_payload_size calculation
There is a possibility for the calculation to overflow when size is large
enough to overflow when added to the size of payload. Ensure that this
overflow is caught early.

Change-Id: I876fbaa704ba51dc4a9e4eb4d3f7f0eaa749e06d
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2021-09-13 09:57:03 -07:00
qctecmdr
07005fd0c6 Merge "icnss2: Improve IPC logging" 2021-09-13 08:48:11 -07:00
Lingutla Chandrasekhar
3282382a54 Sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I78a13f15f7b95d7b6583222fbc68b828e651b802
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2021-09-13 05:53:43 -07:00
Mohammed Siddiq
ea4e19c280 cnss2: Send host reset req when mhi_force_rddm_mode fails
Add code to send host reset request when mhi_force_rddm_mode fails.

Change-Id: I47c94e009c9c21415bcf859de2fab887f1414b71
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-09-13 02:40:12 -07:00
Naman Padhiar
d867e28bf4 icnss2: Improve IPC logging
Changed “icnss_long1” to “icnss_smp2p” as it contain
only SMP2P logs. Created “icnss_soc_wake” IPC to separate
SOC_WAKE logs from “icnss”.

Change-Id: I073868e4954903fbb780bec44d8172bbf7e4393c
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-09-13 11:27:28 +05:30
qctecmdr
b4f4115eae Merge "msm: mhi: Provide an API to perform host reset request" 2021-09-12 21:56:49 -07:00
qctecmdr
9ab39a992d Merge "cnss2: return -EBUSY in cnss_pci_link_down if link already down" 2021-09-12 15:41:27 -07:00
qctecmdr
cd9b565ed5 Merge "haven: hh_rm_core: Correct copyright year marking" 2021-09-11 05:15:35 -07:00
qctecmdr
0299e8adad Merge "defconfig: Enable USB link layer tests on sdxlemur" 2021-09-11 05:15:35 -07:00
qctecmdr
06e0a08cf9 Merge "msm: ipa: Add change to support 32 clients for Mac based filtering" 2021-09-11 05:15:34 -07:00
qctecmdr
16c10b79ca Merge "usb: xhci: Avoid NULL pointer access of sec event ring" 2021-09-11 05:15:34 -07:00
qctecmdr
869d6b0ba8 Merge "uapi: Add UAPI headers for slatecom_interface driver" 2021-09-11 05:15:34 -07:00
qctecmdr
f9aaf8d583 Merge "power: supply: qcom: Add 40ms delay before updating 5V VBUS allowance" 2021-09-11 05:15:34 -07:00
Guru Das Srinagesh
462b20a14b haven: hh_rm_core: Correct copyright year marking
Retain the old copyright year which was dropped during propagation of
a recent change.

Fixes: dd473e6c28 ("haven: hh_rm_core: Change datatype of
num_fragments").

Change-Id: If8d66b096403ae1c54c072ef86a1bfbda828f50f
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2021-09-09 11:15:09 -07:00
Elson Roy Serrao
eefaca9ebb defconfig: Enable USB link layer tests on sdxlemur
This change enables the framework needed to run the link layer
tests on sdxlemur.

Change-Id: I05975750d84cdbb6583bd314cce6912c8b1e9599
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
2021-09-09 10:06:57 -07:00
Praveen Kurapati
49470b8a8d msm: ipa: Add change to support 32 clients for Mac based filtering
Change done to support 32 clients for mac based filtering.

Change-Id: I69e652f2962dc94025dbb0b1936236214034c2d5
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-09-09 19:29:09 +05:30
Pratham Pratap
c93446712a usb: xhci: Avoid NULL pointer access of sec event ring
Consider a case where DUT is in a low memory condition and
it is switching between host and none frequently. This can
lead the driver to fail the allocation of primary event ring
and go into error path where it will try to cleanup the event
ring. Since secondary event ring was not even initialized, while
fetching the entries to cleanup, it will lead to NULL pointer
dereference.

Avoid this by adding a NULL check for secondary event ring before
fetching the entries and bailing out early from cleanup function.

Change-Id: I21488d0e0a02347a392d890918c5c874b704795f
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2021-09-09 04:14:53 -07:00
Fenglin Wu
d58fae4751 power: supply: qcom: Add 40ms delay before updating 5V VBUS allowance
When charging with some fixed voltage USBPD adapters and when VBUS voltage
is moving from 9V to 5V, usbin-ov interrupt is triggered because of the
VBUS voltage is not settled before updating 5V VBUS allowance. To avoid
this, adding 40ms delay before updating 5V VBUS allowance.

Change-Id: I1a439210e7ceb46bf59f900f3c72e71715c590d3
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-09-09 09:28:03 +08:00
qctecmdr
cc3bd056e5 Merge "drivers: thermal: Add support to scale ibat current using range factor" 2021-09-08 03:46:44 -07:00
Gopala Krishna Nuthaki
88a9b4ea32 drivers: thermal: Add support to scale ibat current using range factor
Add support to read ibat range factor from nvmem and use it to
scale ibat current for greater than default max supported
ibat range.

Change-Id: Iee83be8d6663920d4df0b792417820d222e3ff46
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-09-08 12:56:48 +05:30
qctecmdr
c772e33e8f Merge "clk: qcom: gcc: Update the fmax frequency for SDXLEMUR" 2021-09-08 00:24:46 -07:00
qctecmdr
6487e4ba11 Merge "haven: hh_rm_core: Change datatype of num_fragments" 2021-09-08 00:24:46 -07:00
Kiran Gunda
d0bd65b0a8 uapi: Add UAPI headers for slatecom_interface driver
Add slatecom_interface header file in gen_headers to make it
accessible from userspace modules who uses Android.bp files
for compilation.

Change-Id: Ie298ec28983c16999d941ee8667e2dd7b5c3db22
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2021-09-07 23:57:54 -07:00
Guru Das Srinagesh
dd473e6c28 haven: hh_rm_core: Change datatype of num_fragments
Integer overflow can occur for a large value of req_buff_size because
num_fragments is declared as u8. Declare it as int in order to prevent
this from occurring.

Change-Id: I9e3655af13134ec57d123317ebb7b287a7470a19
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2021-09-07 20:22:53 -07:00
Taniya Das
cbe4471833 clk: qcom: gcc: Update the fmax frequency for SDXLEMUR
Update the fmax frequency to 200MHz for SDCC clock.

Change-Id: If77e30d586e3b33c35a7ccf3cd67eb98b6dac101
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-09-07 14:39:23 +05:30
Hareesh Gundu
05670e6bd0 msm: kgsl: Avoid cx gdsc off timeout if SMMU driver has a vote
Smmu driver keeps a vote on cx gdsc to block cx gdsc collapse
when CONFIG_ARM_SMMU_POWER_ALWAYS_ON is enabled. So don't bother
polling for cx gdsc collapse during the slumber sequence when this
config is enabled.

Change-Id: Iacbbfcc76600e0e567610265d5da87146946df66
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2021-09-06 22:37:15 +05:30
qctecmdr
3b06ec126c Merge "dma-buf: WARN on dmabuf release with pending attachments" 2021-09-06 06:07:41 -07:00
Vivek Pernamitta
cc50116c06 msm: mhi: Provide an API to perform host reset request
Adding new API to perform host reset request to device
to collect device side dumps.

Use mhi_soc_reset() API in place of register write

Currently, a direct register write is used when ramdump collection
in panic path occurs. Replace that with new mhi_soc_reset() API
such that a controller defined reset() function is exercised if
one is present and the regular SOC reset is done if it is not.

Change-Id: Ibd15b231072a9b811ced0031387d605184806e9a
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2021-09-06 17:23:53 +05:30
Vivek Pernamitta
ce4a25729b bus: mhi: core: Add device hardware reset support
The MHI specification allows to perform a hard reset of the device
when writing to the SOC_RESET register. It can be used to completely
restart the device (e.g. in case of unrecoverable MHI error).

This is up to the MHI controller driver to determine when this hard
reset should be used, and in case of MHI errors, should be used as
a reset of last resort (after standard MHI stack reset).

This function is a stateless function, the MHI layer do nothing except
triggering the reset by writing into the right register(s), this is up
to the caller to ensure right mhi_controller state (e.g. unregister the
controller if necessary).

Change-Id: I84a7c02b243301fd6e7d61fe8d23443aa4f8a171
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Git-commit: b5a8d233a588b3acf2a7a3a8da30f8f68f376626
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-09-06 17:21:47 +05:30
qctecmdr
92972b0281 Merge "net: qrtr: mhi_dev: unblock any tx on mhi disconnect" 2021-09-05 22:42:26 -07:00
Charan Teja Reddy
a453bdb6a8 dma-buf: WARN on dmabuf release with pending attachments
It is expected from the clients to follow the below steps on an imported
dmabuf fd:
a) dmabuf = dma_buf_get(fd) // Get the dmabuf from fd
b) dma_buf_attach(dmabuf); // Clients attach to the dmabuf
   o Here the kernel does some slab allocations, say for
dma_buf_attachment and may be some other slab allocation in the
dmabuf->ops->attach().
c) Client may need to do dma_buf_map_attachment().
d) Accordingly dma_buf_unmap_attachment() should be called.
e) dma_buf_detach () // Clients detach to the dmabuf.
   o Here the slab allocations made in b) are freed.
f) dma_buf_put(dmabuf) // Can free the dmabuf if it is the last
reference.

Now say an erroneous client failed at step c) above thus it directly
called dma_buf_put(), step f) above. Considering that it may be the last
reference to the dmabuf, buffer will be freed with pending attachments
left to the dmabuf which can show up as the 'memory leak'. This should
at least be reported as the WARN().

Change-Id: Ia58b41500be943fe3c2da3eb0f5480ae99715de2
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1627043468-16381-1-git-send-email-charante@codeaurora.org
Signed-off-by: Christian König <christian.koenig@amd.com>
2021-09-05 22:11:56 -07:00
qctecmdr
2116ac0ac7 Merge "drivers: pinctrl: qcom: Update GPIO to PDC mapping for shima" 2021-09-04 15:05:49 -07:00
qctecmdr
566940b7dd Merge "drivers: pinctrl: qcom: Update GPIO to PDC mapping for lahaina" 2021-09-04 15:05:49 -07:00
qctecmdr
1c5a6f6f48 Merge "defconfig: Enable host mode compliance config on sdxlemur" 2021-09-04 08:49:29 -07:00
qctecmdr
680693843c Merge "BACKPORT: blk-mq: fix is_flush_rq" 2021-09-04 08:49:28 -07:00