Commit graph

903,725 commits

Author SHA1 Message Date
Siddartha Mohanadoss
b62866e622 pci: msm: Fix out of bound error with find_next_bit()
Existing api msm_pcie_write_reg_field() calls find_next_bit()
and results in a KASAN out of bounds error for taking in
the first parameter by typecasting as unsigned long type.
To avoid the KASAN error use __ffs() instead.

Change-Id: I9e155248e1233bbcb04ac5e2d1d6d512b3fa5387
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2021-08-11 12:50:03 -07:00
Sarthak Garg
1faebd2859 mmc: sdhci-msm: Restore CMDQ_VENDOR_SPECIFIC_CFG register correctly
Restoring CMDQ_SEND_STATUS_TRIGGER field after XO or hardware reset can
lead to CMD13 being send as soon as CQE is turned on which can lead to
below unnecessary warnings followed by register dumps.

[   82.554113] mmc: sdhci_cmd_irq: Got command interrupt 0x00000001 even
though no command operation was in progress.

Unset that bit before restoring CMDQ_VENDOR_SPECIFIC_CFG register.

Change-Id: Id5961ecdd68b0d7cbc1c48c116f9e862a1dfc573
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-08-11 11:51:13 -07:00
Naman Padhiar
7c5394f2c8 icnss2: Send WLAN_EN delay value in Host Cap
For low temperature (< -25 degrees) WLAN FW need to keep
delay between WLAN EN low and HIGH. Read WLAN_EN delay
set by "wlan_en_delay" sysfs file and send it through
Host Cap request. Increase MODE_ON and TARGET_CAP QMI request
timeout to WLAN_EN delay value to accommodate delay kept
in FW for WCN6750.

Change-Id: Ic52cc94183984200f4cc3d893756bf7abeddad6d
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-12 00:09:06 +05:30
qctecmdr
45e5597f7b Merge "arm64: Add TLB conflict fault handler" 2021-08-11 08:20:47 -07:00
qctecmdr
fa867b3c87 Merge "cnss2: Add code to do PCIe L2 suspend during shutdown" 2021-08-11 08:20:47 -07:00
Pankaj Gupta
0a3f1ec4e9 msm: kgsl: Add CX_MISC registers in a6xx gpu snapshot
Add CX_MISC registers in a6xx gpu snapshot dump.

Change-Id: I03e12db450327d26f976c8d45296eecb08b7e040
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
2021-08-11 20:37:28 +05:30
Naina Mehta
5fcf71be7e defconfig: msm: enable tlb_conflict_handler for holi
Enable TLB conflict handling for QGKI image of holi.

Change-Id: Idbb5476c2495add61c3c659494c60f368a2e3e42
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-11 06:07:06 -07:00
Naina Mehta
c57a71bf5a defconfig: msm: enable tlb_conflict_handler for lahaina
Enable TLB conflict handling for QGKI image of lahaina.

Change-Id: I55f2ef3f98676b64d3a3b05f6a1ef694dbf384fc
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-11 04:51:50 -07:00
Naina Mehta
f056b8a329 arm64: Add TLB conflict fault handler
Add TLB conflict fault handler and try to handle
gracefully. Check whether TLB fault can be handled
by EL2 and cause panic if EL2 is not able to handle.

Change-Id: I276ec5413411932bd8a67ed4c85ebbf66f4affcf
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-11 14:56:32 +05:30
Kamal Agrawal
f5266ee4d4 msm: kgsl: Fail import if secure buffer is not accessible to CP_PIXEL
It is possible that userspace can request import for secure dma buffer
that is not accessible to CP_PIXEL. There is no need to import such
buffers in KGSL. Go through the list of VMIDs for secure dma buffer
and fail import if it is not accessible to CP_PIXEL.

Change-Id: I7584ad00a964c9c40ac4c0c9b1c83a21c03c48fd
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-11 01:38:26 -07:00
Naman Padhiar
26f3eb1a49 icnss2: Add proper debug logs
Add proper debug logs to print return value of subsytem_get.

Change-Id: I5e210e7b32fe35ecf9688a84776385ba6e382df8
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-10 23:17:43 -07:00
Alistair Delva
d09f0a4e23 ANDROID: GKI: Disable X86_MCE drivers
Android does not use these drivers and enabling them causes additional
and unwanted epoll wakeups due to uevents at suspend/resume time.

Bug: 195607946
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id3d58dc695c0cd6d2a65503a421de1afebd83784
2021-08-10 15:54:22 +00:00
Nobutaka Matsuo
aa64559e55 ANDROID: GKI: Add FCNT KMI symbol list
No new symbols added that are not already in the .xml file.

Bug: 194979426
Change-Id: I5fad2df65c189bf0afbefeff2aeab19c500552dd
Signed-off-by: Nobutaka Matsuo <matsuo.nobu@fcnt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-08-10 15:36:50 +00:00
qctecmdr
1cda180ca1 Merge "soc: qcom: Dump stack in case of SSR failure for wpss" 2021-08-10 03:21:50 -07:00
Biao Li
498eb6780a ANDROID: fuse: Allocate zeroed memory for canonical path
The page used to contain the fuse_dentry_canonical_path to be handled in
fuse_dev_do_write is allocated using __get_free_pages(GFP_KERNEL).
The returned page may contain undefined data, that by chance may be
considered as a valid path name that is not in the cache. In that case,
if the FUSE daemon mistakenly doesn't fill the canonical path buffer,
the FUSE driver may fall into two blocking

  request_wait_answer(fuse_dev_write->kern_path->fuse_lookup_name)

causing a deadlock condition.

The stack is as follows:
find            S    0 20511  20117 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833c1a8>] fuse_dentry_canonical_path+0xb8/0x104
[<ffffff800820b14c>] do_sys_open+0x1b4/0x260
[<ffffff800820b27c>] SyS_openat+0x3c/0x4c
[<ffffff8008083540>] el0_svc_naked+0x34/0x38
mount.ntfs-3g   S    0  5845      1 0x00000000
Call trace:
[<ffffff8008085e78>] __switch_to+0xb8/0xd4
[<ffffff8008a0cac4>] __schedule+0x458/0x714
[<ffffff8008a0ce0c>] schedule+0x8c/0xa8
[<ffffff800833865c>] request_wait_answer+0x74/0x220
[<ffffff8008339f70>] __fuse_request_send+0x8c/0xa0
[<ffffff8008339fe4>] fuse_request_send+0x60/0x6c
[<ffffff800833bdb0>] fuse_simple_request+0x128/0x16c
[<ffffff800833dddc>] fuse_lookup_name+0x104/0x1b0
[<ffffff800833dee4>] fuse_lookup+0x5c/0x11c
[<ffffff800821861c>] lookup_slow+0xfc/0x174
[<ffffff800821b474>] walk_component+0xf0/0x290
[<ffffff800821bbac>] path_lookupat+0xa0/0x128
[<ffffff800821c7f4>] filename_lookup+0x84/0x124
[<ffffff800821c8d8>] kern_path+0x44/0x54
[<ffffff800833b0c8>] fuse_dev_do_write+0x828/0xa0c
[<ffffff800833b610>] fuse_dev_write+0x90/0xb4
[<ffffff800820b770>] do_iter_readv_writev+0xf4/0x13c
[<ffffff800820cc88>] do_readv_writev+0xec/0x220
[<ffffff800820d05c>] vfs_writev+0x60/0x74
[<ffffff800820d0ec>] do_writev+0x7c/0x100
[<ffffff800820e348>] SyS_writev+0x38/0x48
[<ffffff8008083540>] el0_svc_naked+0x34/0x38

Fix by ensuring that the page allocated for the canonical path is zeroed.

Bug: 194856119
Fixes: 24ab59f6bb ("ANDROID: fuse: Add support for d_canonical_path")
Signed-off-by: Biao Li <libiao@allwinnertech.com>
Signed-off-by: Shuosheng Huang <huangshuosheng@allwinnertech.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I400815dc1049d90c308f5cf87ce60de97ff82131
2021-08-10 11:03:55 +01:00
Prateek Raj Singh
eda3f6aaa7 FM: Fix for no sound issue in FM Audio
Updated mutex_lock during tune/seek operation

Change-Id: I699f0a208ea7f9009226ebff962a5ef38f197d73
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-08-10 00:49:16 -07:00
Naina Mehta
086639c2a4 soc: qcom: Dump stack in case of SSR failure for wpss
Dump stack in case of SSR failure when ignore_ssr_failure
flag is enabled for wpss on Yupik platform.

Change-Id: I98fd294b12fe7bd9b52deb15edb8d83a5113acd8
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-10 12:11:25 +05:30
Armaan Siddiqui
e2936a7222 msm: ipa: Add vlan id field for ip collision
Add vlan id field for ip collison struct to
handle mdpn.

Change-Id: Idf593a55781fdc727fb33924c29d1387b6489625
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-08-09 01:45:08 -07:00
qctecmdr
93cba141aa Merge "cnss2: Add prealloc slots to accommodate WLAN host DP memory" 2021-08-06 21:01:57 -07:00
qctecmdr
4abc6114d9 Merge "drivers: pinctrl-msm: Move setting mpm_wake_ctl during .irq_enable" 2021-08-06 07:59:44 -07:00
qctecmdr
c4bb61e257 Merge "mmc: sdhci-msm: Avoid overiding of vendor_specific_func register" 2021-08-06 07:59:44 -07:00
Maulik Shah
9d978c7198 drivers: pinctrl-msm: Move setting mpm_wake_ctl during .irq_enable
Setting mpm_wake_ctl after enabling irq at parent PDC/GIC may cause
a false irq sometimes. Move setting mpm_wake_ctl during .irq_enable
before enabling irq at parent PDC/GIC. Since first irq is cleared
and then enabled it may clear any false irq received and pending at
GIC before enabling same.

While at this also add missing flags IRQCHIP_MASK_ON_SUSPEND and
IRQCHIP_SET_TYPE_MASKED for msmgpio irqchip.

Change-Id: I4801dd984ae5607f87045abc233dfd2d76fcadd1
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-06 01:10:12 -07:00
Yeshwanth Sriram Guntuka
ee2fa95f9e cnss2: Add prealloc slots to accommodate WLAN host DP memory
Add four 8k, two 32k, six 64k, and one 128k prealloc slots
to accommodate memory requirements for various WLAN host DP
structures.

CRs-Fixed: 3007544
Change-Id: I6f8fcb46ad84016d9ccc5ca22a9ee9d74d8bbfea
Signed-off-by: Yeshwanth Sriram Guntuka <ysriramg@codeaurora.org>
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
2021-08-05 05:44:29 -07:00
Dmitry Antipov
e588439d0c ANDROID: ABI: Update allowed list for Microsoft
Leaf changes summary: 6 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

6 Added functions:

[A] 'function int hid_add_device(hid_device*)'
[A] 'function hid_device* hid_allocate_device()'
[A] 'function void hid_destroy_device(hid_device*)'
[A] 'function int hid_input_report(hid_device*, int, unsigned char*, unsigned int, int)'
[A] 'function int hid_parse_report(hid_device*, unsigned char*, unsigned int)'
[A] 'function int spi_async(spi_device*, spi_message*)'

Bug: 194673479
Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7af3139b3670ac6d4eb87b0774362aaf79160e76
2021-08-05 12:30:11 +02:00
qctecmdr
f6962f8ac1 Merge "msm: kgsl: Fix memory leak for anonymous buffers" 2021-08-05 02:06:40 -07:00
qctecmdr
18e4111736 Merge "msm: kgsl: Dump cx regulator consumer list in case disable timeouts" 2021-08-05 02:06:40 -07:00
Greg Kroah-Hartman
8afacb8faf ANDROID: GKI: add padding to struct hid_device
struct hid_device was not being tracked as a "stable" symbol in the
past, but that looks to change with some future abi requirements.  So
add needed padding now, to ensure that we can support this over the
long-term.

This does not change the existing api at all as this symbol was not
supported yet.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8c3064fb7a19006a29dabbaf25c9ed1737f62e75
2021-08-05 09:04:13 +02:00
Lynus Vaz
5eafefa5f1 msm: kgsl: Keep the context alive until its fences signal
The context is currently kept alive until all its fences are
released. This means that we do not destroy a context until all
the fence fds associated with it are closed by userspace, which may
be a long time. Instead, remove the timeline's refcount on its
context when it is detached. This permits the context to be freed
once all its fences signal.

Change-Id: Ifc5dd55980358ddbb4d3f6220d8b5d9f725aed1b
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2021-08-05 12:25:12 +05:30
qctecmdr
3d295b860d Merge "leds: aw2016: update breath sysfs node name" 2021-08-04 20:54:32 -07:00
qctecmdr
c3adef29ad Merge "smcinvoke: release lock before sleep" 2021-08-04 20:54:32 -07:00
qctecmdr
2bef9ce63f Merge "mmc: host: Do not include standard key support for QTI crypto" 2021-08-04 20:54:31 -07:00
qctecmdr
141944971c Merge "msm: mhi-dev: Check to avoid null pointer dereference" 2021-08-04 20:54:31 -07:00
qctecmdr
e2f066d983 Merge "kernel: msm-5.4: Update kconfig for qps615 driver" 2021-08-04 20:54:31 -07:00
Manuel Gomez
25018a71b0 kernel: msm-5.4: Update kconfig for qps615 driver
Chane the default state of QPS615 driver and update
description.

Change-Id: I87832f17898f9a57ad77959cb4eb7a0620cf3af3
Signed-off-by: Manuel Gomez <gomez@codeaurora.org>
2021-08-04 17:21:41 -07:00
Mohammed Siddiq
d87467913d cnss2: retry mhi fast suspend if mhi returns EBUSY
Add code to retry mhi fast suspend if mhi layer has pending
packets and returns EBUSY.

Change-Id: Ifb9ee8371c092db3fd7bece2de1e7166ac6f303f
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-08-04 03:02:19 -07:00
Srinivasarao P
4b5d70962e Merge android11-5.4.86+ (8eb8412) into msm-5.4
* refs/heads/tmp-8eb8412:
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: GKI: Add KMI symbol list for Sony Android Walkman products
  ANDROID: ABI: Update allowed list for QCOM

Change-Id: I2644f48f4c0e94e91def6a35296321c12e1eaca5
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2021-08-04 13:06:17 +05:30
qctecmdr
bca4e894c5 Merge "soc: qcom: hab: Updating return value for function attributed to kobject" 2021-08-03 23:48:00 -07:00
Monika Singh
e8e63e2a6e smcinvoke: release lock before sleep
Release g_smcinvoke_lock before sleep, to avoid
LLKD crash for holding lock for longer period of
time if TZ is busy.

Change-Id: Ie9523bc81f3aa03497836f06180c9d3f8a8efc9f
Signed-off-by: Monika Singh <monising@codeaurora.org>
2021-08-03 23:00:47 -07:00
Vaibhav Agrawal
9b74609f23 mmc: host: Do not include standard key support for QTI crypto
Do not include standard key support while creating a keyslot
manager because current implementation does not support standard
keys with hardware key manager. This leads to per file key test
failure, which tries generate standard keys and performs operations
using it. Per file keys should by default use fallback mechanism in
block crypto.

Test: Verified bootup and vts_kernel_encryption_test. Also verified
by customers.

Change-Id: I4aaf532028374e2729868a82e970572e6e6985e0
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-08-03 22:06:19 -07:00
Gauri Joshi
0b5165ee1a msm: mhi-dev: Check to avoid null pointer dereference
If mhi is not enabled the channels ring remain uninitialized. The host
might reset mhi which will result in device crash due to
null pointer dereference for the channel ring. Check if the pointer is
NULL before dereferencing it to avoid the crash.

Change-Id: I582f9a8a6c9bdca8d5f57e1800b566cca389b830
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-08-03 16:45:42 -07:00
qctecmdr
0a69438bf7 Merge "mmc: host: Reprogram keys after enabling cqhci crypto" 2021-08-03 08:23:56 -07:00
qctecmdr
dd21eda939 Merge "soc: qcom: sys_pm_vx: Print LPM exit log and correct timestamp" 2021-08-03 08:23:55 -07:00
qctecmdr
41a5acae7a Merge "msm: ethernet: Remove IOSS v1 driver" 2021-08-03 08:23:55 -07:00
Maulik Shah
991475c10b soc: qcom: sys_pm_vx: Print LPM exit log and correct timestamp
Print the LPM enter/exit alternative for only timestamp lines and
no DRV vote present.

While at this also print the timestamp shifted by time shift given.

Change-Id: I03c6e45d49a6c7c0af17dc7dad4f42f8806939a6
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-02 23:46:00 -07:00
Hui Liu
ad6bf018e2 leds: aw2016: update breath sysfs node name
Update the blink sysfs node name to "breath"
to make sure the userspace code can access it
correctly. Meanwhile, replace msleep() with
usleep_range() for better sleeping delay precision,
and update the device sysfs node permission to 0644.

Change-Id: I0957087747fcf01f5a036f25c44ce83787b071a9
Signed-off-by: Hui Liu <huliu@codeaurora.org>
2021-08-02 23:35:55 -07:00
Vaibhav Agrawal
5192a8a20d mmc: host: Reprogram keys after enabling cqhci crypto
Call cqhci_crypto_recovery_finish() method during cqhci
enable in order to reprogram all keys into ice.
This is needed to cover the case of mmc reset followed
by cqhci recovery, which leads to all keys being cleared.
This causes an invalid crypto config error during
read/write of data after recovery is done.

Test: Verfied by storage team as part of mmc reset and
cqhci recovery testing.

Change-Id: I8deaf52158af223ec9b9a0a1069340467c7dc48a
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-08-02 22:44:22 -07:00
Mohammed Siddiq
3ebe41df9a cnss2: Add code to do PCIe L2 suspend during shutdown
During mhi resume if mhi detects link down then it posts link
recover event where cnss platform driver goes for self recovery,
as part of recovery the shutdown & powerup sequence is done.
During shutdown the PCIe link is suspended, the link suspend
should be L2 suspend. But in current scenario, it goes for DRV
suspend as the drv_connected_last flag is still set because
resume is initiated by host driver to get qmi stats via
cnss_pci_resume_bus. So on power up the link does not come up
as it tries for DRV resume instead of L2 resume. To fix this,
during shutdown the link suspend should be L2 suspend, so
add code to always do PCIe L2 suspend during shutdown.

Change-Id: I748d2e243bf4491ec31bc42027514a73c3d945b4
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-08-02 06:14:30 -07:00
Vivek Pernamitta
71edd842d8 msm: pci: Notify client for recovery on reading invalid config
Notify client driver to recover link on reading PCIE endpoint
config registers as FF's.

Change-Id: Ibf283003f3470c783e17c05ce790512cc8ea8366
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-08-02 05:09:40 -07:00
Mohammed Siddiq
93cbb8df23 cnss2: WAR to trigger self-recovery for link recover callback
Add WAR to trigger self-recovery on receiving event callback
MSM_PCIE_EVENT_LINK_RECOVER. Skip call to force assert when
mhi resume -ETIMEDOUT.

Change-Id: I05d3b2889e1983bab2509c1db2a3e45fdfe484d3
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-08-02 05:00:26 -07:00
Kamal Agrawal
3121593f88 msm: kgsl: Fix memory leak for anonymous buffers
Currently, clean up is not done properly for anonymous buffer
(KGSL_MEM_ENTRY_USER). Fix it by freeing up resources allocated
during memdesc_sg_virt.

Change-Id: I75bff2e718b494c102a8075a5f27323e1823b212
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-07-30 23:25:52 -07:00