Commit graph

893,362 commits

Author SHA1 Message Date
Maulik Shah
f889ae2a8c ANDROID: ABI: Update allowed list for QCOM
Add the following symbols to QCOM allowed-list:
-- __irq_set_handler
-- irq_set_handler_data

Bug: 172879351
Change-Id: I6869b60b4893a3f9447d0fb6e7977e0685477386
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2020-11-10 12:01:05 +05:30
Namjae Jeon
5868025897 exfat: add Kconfig and Makefile
This adds the Kconfig and Makefile for exfat.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: b9d1e2e6265f5dc25e9f5dbfbde3e53d8a4958ac
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
Change-Id: I8730b0a0eb0d7d55f58cdf79094962540cc8d874
Signed-off-by: lixiang <lixiang@codeaurora.org>
2020-11-10 14:30:28 +08:00
Monika Singh
687cc9a52e kernel: arch: Enable qcedev as gki module
Enabling qcedev and msm_qce modules as gki module.

Change-Id: I583363213f229ec5a166d91af4a1424548ede335
Signed-off-by: Monika Singh <monising@codeaurora.org>
2020-11-09 20:58:37 -08:00
Hemant Kumar
2e0103145d pci: msm: Move rpmsg lock after command completion
If multiple rpmsg are sent, it is possible there will be a
mismatch of completions. If requester sends rpmsg A and B,
it is possible the completer sees only rpmsg B. Once completer
sends ACK/NACK for rpmsg B, the requester may interpret, it is
for rpmsg A if the timeout for it has not expired. Therefore,
serialize the send of rpmsg and its completion to avoid this
possible race by moving rpmsg lock after command completion.

Change-Id: Id2ac8a03da2dd941ac9ea9d5c556a108af5faecd
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-11-09 19:20:14 -08:00
Shashank Babu Chinta Venkata
7a0ea40cb7 input: touchscreen: st: cancel pending firmware update
Cancel pending firmware delayed work during the disable
sequence since hardware is already released to PVM.

Change-Id: Ie66c4a5dfe81219e034ae1aea01c0e2a76fa4903
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2020-11-09 18:01:20 -08:00
Yue Ma
a7958f33a3 cnss2: Avoid suspending PCIe after QMI send get is called
Introduce usage count for QMI send get/put APIs. Make sure PCIe link
will not be suspended from runtime PM path if the usage count is not 0.
That means PCIe link should be always up when host driver starts to
proceed stats query from upper layer.

Change-Id: I0ff62874d62c4db2292236d8b4b5c2e09e439a5b
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-11-09 17:37:10 -08:00
Nitin Rawat
d05664f31f scsi: ufs: update UFS initialization sequence
During UFS host init, we calibrate the UFS host PHY with
HS-Gear4 Rate-B settings by default. After UFS device is
initialized but before it switched to HS mode, if it
found as UFS 2.x device we re-init the UFS host PHY
with its HS-Gear3 Rate-B settings, then start over
the UFS device initialization again.

Change-Id: I854a34b2e5d76103d447508cf2137427def93d17
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2020-11-10 01:32:06 +05:30
Paul Zhang
c9813c8358 net: cnss2: Add second element to avoid OOB issue
The struct coex_antenna_switch_to_mdm_resp_msg_v01_ei is
missing with second element and causing OOB issue with
KASAN.

Change-Id: Iac53f5b4883a620f5179fe2caa7e2169d487c619
CRs-Fixed: 2814572
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-11-09 10:11:44 -08:00
qctecmdr
92efb2ac5a Merge "Correct the FM port numbers for Chk 3.x" 2020-11-09 09:59:53 -08:00
qctecmdr
259cc85af8 Merge "msm: kgsl: Do not fail after drawobj is added to context queue" 2020-11-09 09:59:52 -08:00
qctecmdr
a3b4c5531f Merge "msm: kgsl: Add support for voting vdd parent supply voltage" 2020-11-09 09:59:52 -08:00
qctecmdr
96509a115e Merge "rpmsg: rpm-smd: Add null check for irq_chip affinity callback" 2020-11-09 09:59:51 -08:00
Mayank Rana
940ae309aa dwc3: Don't perform set xfer resource from EP_OP_CONFIG for GSI endpoint
By default when ep0 gets enable, current code SET XFER resource command
for all USB endpoints excluding USB GSI endpoint. SET XFER resource
command shall fail if all resources are allocated. All allocated transfer
resources are resets in controller when DEPXFERCFG cmd is send with ep0
with value as 2 OR when controller is being peformed power on reset or
being restarted (i.e. device initiated disconnect and reconnect).
Consider case as below:
a. USB enumerated
b. USB bus suspend
c. USB bus reset
d. USB connect done
e. USB set_config() (set_alt())
f. Reenable all USB endpoint and resize tx fifo for it except ep0 and ep1
g. USB GSI endpoint operation (EP_OP_CONFIG) is sending SET XFER RESOURCE
which is failing as all resources are already allocated.

ep0 is disabled while clearing run stop and re-enabled when setting run
stop. For USB device mode we know that ep0 enabling is prerequisite before
setting run stop. Hence let ep0 enabling takes care of reallocating
transfer resources for all endpoint including USB GSI endpoints.

Change-Id: Ic5ab7558fadc636aaf255d62f91abf7842460659
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2020-11-09 09:43:34 -08:00
Deepak Kumar
bda766cd68 msm: kgsl: Check for gmu prealloc failure only in case of prealloc request
Check for gmu prealloc failure only in case of prealloc request to avoid
use of uninitialized ret variable.

Change-Id: Ie0718f17fb9517e3e7659c277ff6f2fc3ef07f53
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2020-11-09 21:49:56 +05:30
qctecmdr
ca7e73792c Merge "f2fs: fix a race condition between f2fs_write_end_io and f2fs_del_fsync_node_entry" 2020-11-09 04:48:55 -08:00
qctecmdr
30db81ccfa Merge "ANDROID: scsi: ufs: Handle double release of clocks" 2020-11-09 04:48:54 -08:00
qctecmdr
014cedbc8b Merge "gki: Adding GKI_VERSION to fetch corresponding images" 2020-11-09 04:48:54 -08:00
Konstantin Dorfman
117a9ea276 soc: spcom: fix race during spcom channel create
spcom_register_rpmsg_drv() can hit race from different contexts:
when create channel occurs for uefi loaded sp application
and spdaemon uses the cryptoapp channel early, and at the same
time sec_nvm channel also creates new channel.

This change locks globally access to the channel table for
spcom_create_channel_chardev() command.

Change-Id: Ic4daee06591427146602f41227e77b3ccc3f3151
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
2020-11-09 12:17:58 +02:00
Jaegeuk Kim
971d48f9e9 f2fs: should avoid inode eviction in synchronous path
https://bugzilla.kernel.org/show_bug.cgi?id=208565

PID: 257    TASK: ecdd0000  CPU: 0   COMMAND: "init"
  #0 [<c0b420ec>] (__schedule) from [<c0b423c8>]
  #1 [<c0b423c8>] (schedule) from [<c0b459d4>]
  #2 [<c0b459d4>] (rwsem_down_read_failed) from [<c0b44fa0>]
  #3 [<c0b44fa0>] (down_read) from [<c044233c>]
  #4 [<c044233c>] (f2fs_truncate_blocks) from [<c0442890>]
  #5 [<c0442890>] (f2fs_truncate) from [<c044d408>]
  #6 [<c044d408>] (f2fs_evict_inode) from [<c030be18>]
  #7 [<c030be18>] (evict) from [<c030a558>]
  #8 [<c030a558>] (iput) from [<c047c600>]
  #9 [<c047c600>] (f2fs_sync_node_pages) from [<c0465414>]
 #10 [<c0465414>] (f2fs_write_checkpoint) from [<c04575f4>]
 #11 [<c04575f4>] (f2fs_sync_fs) from [<c0441918>]
 #12 [<c0441918>] (f2fs_do_sync_file) from [<c0441098>]
 #13 [<c0441098>] (f2fs_sync_file) from [<c0323fa0>]
 #14 [<c0323fa0>] (vfs_fsync_range) from [<c0324294>]
 #15 [<c0324294>] (do_fsync) from [<c0324014>]
 #16 [<c0324014>] (sys_fsync) from [<c0108bc0>]

This can be caused by flush_dirty_inode() in f2fs_sync_node_pages() where
iput() requires f2fs_lock_op() again resulting in livelock.

Change-Id: I5d7ef35a21cdb074e7bf5288371f579bfc0eb19d
Reported-by: Zhiguo Niu <Zhiguo.Niu@unisoc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Git-commit: b0f3b87fb3abc42c81d76c6c5795f26dbdb2f04b
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
2020-11-09 14:58:02 +05:30
Raghavendra Kakarla
20a7398ee0 rpmsg: rpm-smd: Add null check for irq_chip affinity callback
Add the null checks for irq_chip callback while calling
affinity call of glink interrupt.

Change-Id: I62cec6ade0233094ef9a821185677b703d3ba1a3
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-11-09 14:45:58 +05:30
Prakash Gupta
b2c3e3287a mm/oom_kill: defer panic_on_oom for a timeout
It takes sometime for complete memory reclaimed by oom kills to be
available, specifically ion allocations. This either require FDs to be
closed which is not covered by oom reaper or released by another process
not being kiled. So defer panic_on_oom to avoid panic trigger before memory
become available.

Change-Id: I9f3312c780e4d8444f58de5f781c9c8dfec9b2c7
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-11-09 12:48:44 +05:30
Tushar Nimkar
c05285f9c1 defconfig: Added PM configs for sdxlemur
This change adds power config changes for sdxlemur.

Change-Id: Icb09b5361cfda42c18c316e0a0d79aeee3d18b97
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2020-11-09 10:33:05 +05:30
Prakash Gupta
a25275e2bd mm: do not shrink pages marked for reclaim by MADV_FREE
MADV_FREE clears pte dirty bit and then marks the page lazyfree (clear
SwapBacked). PPR increments ISOLATE_FILES count, then isolates page and
invokes a reclaim. Inbetween if this lazyfreed page is touched by user then
it becomes dirty.  PPR in shrink_page_list in try_to_unmap finds the page
dirty, marks it back as PageSwapBacked and skips reclaim. As PageSwapBacked
set, PPR identifies the page as anon and decrements ISOLATED_ANON, thus
creating isolated count mismatch.

This results in too_many_isolated() check causing delay in reclaim. Skip
reclaiming lazyfreed pages in PPR path.

Change-Id: I87223c4fa492c5e373ac48f116384b5de03da9fa
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2020-11-09 09:04:50 +05:30
Linyu Yuan
8d61117a97 f_fs: fix scheduling while atomic issue of ffs_epfile_io()
move wait_for_completion() outside of spinlock.

Change-Id: Ib4cb7058aa96a55be40e757434ac64327264f104
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2020-11-09 11:02:55 +08:00
Fenglin Wu
8faff2497b power: supply: qti_battery_charger: run usb_type_work during probe
Currently, updating USB type only depends on USB status change
notification from the charger firmware. During a reboot with USB
connected, there is a chance that a USB power supply notification would
have been sent by the charger firmware little earlier even before the
battery charger driver was ready to handle it. Hence it would've got
missed and USB type is not updated properly. Fix it by scheduling
usb_type_work once the driver probes.

Change-Id: I0ae482e90a76a0b2128fcc45561adb77a2ca017c
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-11-09 07:57:34 +08:00
Mohammed Siddiq
c9bb2df718 defconfig: Remove CONFIG_CNSS_QCA6490
Remove QCA driver dependency from kernel configuration. Supported
chipset will be auto detected at run time.

Change-Id: Ifbf1cb0df6ff96b2bb62416f86de0ca4167b15d6
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2020-11-09 02:53:25 +05:30
Amir Levy
7d0bf74852 msm: ipa: create ipa_client for ethernet
Create the ipa_client interface for ethernet offloading.

Change-Id: I8120b0cca9e42a75153fb1468dc1b8bcbd43484c
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-11-08 10:44:48 +02:00
Michael Adisumarta
043cae74b2 msm: ipa: device assisted low power states support in IPA
This change supports device assisted low power modes -M1/M2 states
in IPA. For M1/M2 states, GSI is continued to be in poll mode where
as for M3 state GSI is moved to doorbell mode.

Change-Id: I48a7c9f2c27da0be69a6bb50dfec0a542e46caec
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-11-06 17:24:34 -08:00
Sushmita Susheelendra
2a242c5d09 msm: kgsl: Increase GMU log size to 16 KB
The GMU log is currently very small at 4 KB.
Increase size to 16 KB to accommodate more event history.

Change-Id: Iba86f28573d6f5224e07834be9acc9765beef79f
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2020-11-06 15:45:44 -07:00
Sushmita Susheelendra
db97984e20 msm: kgsl: Add sysfs node to enable GMU log streaming
GMU log entries are not streamed out to the host by default.
The log_stream_enable sysfs node allows that.

Change-Id: I8e532cbb059f98652d2bf72842245625549002f1
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2020-11-06 15:43:02 -07:00
Chris Lew
f2197a20e8 soc: qcom: smp2p: Add memory barrier for irq_pending
There is a very tight race where the irq_retrigger function is run
on one cpu and the actual retrigger softirq is running on a second
cpu. When this happens, there may be a chance that the second cpu
will not see the updated irq_pending value from first cpu.

Add a memory barrier to ensure that irq_pending is read correctly.

Change-Id: I3dd185decc4f050bd57c0b6558f417ead2a3aa5a
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-11-06 14:37:02 -08:00
Chris Lew
9d099b501a mailbox: msm_qmp: Enhance debug logging
There are an increasing amount of reports where the tx timeout is
being asserted. Add logging to mark the enter and exit of the qmp
worker thread in ipc logs to correlate with the rx interrupts.

Change-Id: Ie24ab7ac761b16abfeeef78bbb3907e781b6f79d
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-11-06 14:29:31 -08:00
Chris Lew
8ee7ea64d6 arm64: defconfig: Set qrtr wakeup for genericarmv8
Set the wakeup timeout for qrtr to 500 ms for genericarmv8. This change
will help ensure the TUI client thread gets a chance to run before the
system is suspended again.

Change-Id: Iaaa84e99c0e1f8c29b6e80746440b7d960887193
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-11-06 11:56:22 -08:00
Tony Truong
b9347c809b msm: pcie: support EQ preset request vector configuration
Provide the option to configure the request of preset during
the initial part of the equalization master phase.

Change-Id: Ib33e84b3d333bc7c7275dd7108ef37067d92abbd
Signed-off-by: Tony Truong <truong@codeaurora.org>
2020-11-06 10:34:18 -08:00
Siddartha Mohanadoss
e7ff4a4ecf msm: ep_pcie: Clear PERST_RAW_RESET_STATUS after link training
Clear AOSS_CC_RESET_STATUS::PERST_RAW_RESET_STATUS
after PCIe link training in HLOS. Failure to clear it in
HLOS will result in PBL to consider it a controller reset
pending state during warm reset and initiate a controller
reset even if the PCIe link is up.

Change-Id: I3e5b89181be29062f79e4c5ace1863124367c72c
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2020-11-06 09:23:23 -08:00
Siddartha Mohanadoss
b3b4878e49 msm: ep_pcie: Add support to control pipe clock mux
Toggle between tcxo and phy pipe clock as part of
LPM sequence. Switch the source to XO before disabling
PCIe gdsc to avoid PCIe gdsc to be stuck until source
is switched to XO.

Change-Id: Ie2044da622962ff316319e7891974621e5c0ee92
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2020-11-06 09:23:17 -08:00
Vivek Pernamitta
e9dfb77350 msm: pcie: Disable access to PARF register when link is disabled
Disable access to PCIE PARF registers when link is disabled.

Change-Id: I2496edbfecb5f67571138fea1b4edfa5df3f030b
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2020-11-06 19:28:34 +05:30
Taniya Das
33ad25b8b2 clk: qcom: gcc: Register the DFS clocks for HOLI
QUPV3 clocks could be under DFS control, thus register them with DFS
clock ops.

Change-Id: Iefac3479490fbcca8de4bbf151d82d8e6c7d3ca7
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-11-06 16:15:32 +05:30
Kavya Nunna
a00317108c power: smblite-lib/smb5-lib: Fix partner registration for microusb
Typec attach_detach handler gets executed which is not
expected for micro-usb design. Return from type-C attach-detach
handler for micro-usb stack.

Change-Id: Ia7bfe6b407757663be4f7d143ccd88a60079657b
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
2020-11-06 10:24:04 +05:30
Kavya Nunna
325d5f396f power: smblite-lib/smb5-lib: Add partner registration for microusb otg
Add partner registration for otg to provide UX. USB_HAL expects
power_role and data_role to be updated for the notification to UI.
Update power_role and data_role for microusb otg.

Change-Id: I741df638e18a400c862845bddd5bb19130adecd7
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
2020-11-06 10:23:49 +05:30
Mayank Grover
4e7a62687a ANDROID: modules: cfi cleanup for module load failure
Cleanup cfi shadow for failure in module loading,
to avoid causing warnings.

Bug: 172542186
Change-Id: I1de7ffa7d884c8e46891b8bbc8196ec0d2cef0d6
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
2020-11-06 10:09:05 +05:30
Jishnu Prakash
90035c5969 dt-bindings: iio: Add scale function for PM2250 S3 die temp
Add scale function macro for selecting correct scale function for S3
die temp ADC channel on PM2250 V2, as the channel is mapped to the
default voltage scaling function otherwise.

Change-Id: I6c4905100a19adcc0cf9d6beb9cb3471cc4d232b
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-11-05 20:07:56 -08:00
Jishnu Prakash
9c1f029e51 iio: adc: spmi-adc5: Add support for PM2250 S3 die temp channel
Add support for reading S3 die_temp channel on PM2250 by
specifying the scaling function.

Change-Id: I1e8fcba0058851a540bc39adc7606d4f0ad8f6db
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-11-06 09:30:00 +05:30
Yuanfang Zhang
266445be4d coresight: byte-cnter: limit error log output
Limit error log output in usb_bypass_notify().

Change-Id: I74e7635d10bc273cd378a62ca90874e73c9c856b
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2020-11-06 10:08:41 +08:00
Yuanfang Zhang
9f43924256 coresight: byte-cnter: Add ETR status check in bypass notifier
when usb_bypass_notify is called by ush_qdss_close(), no need to
response to USB_QDSS_DISCONNECT event. so add etr status check to
avoid exception.

Change-Id: I4ab5d7f4ba054b0d1ecc7026b5662ddc1c8b5ca1
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
2020-11-06 10:08:01 +08:00
Isaac J. Manjarres
81bccbcba8 arm64: defconfig: Enable CONFIG_ARM_SMMU_POWER_ON_ALWAYS for GKI targets
Enable CONFIG_ARM_SMMU_POWER_ON_ALWAYS for all GKI targets, and only
in the GKI configuration. This feature should not be enabled in
the QGKI/production configurations.

Change-Id: Ifa16169b2595408d4f5c2142f6fddb9aa941eb2a
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-11-05 15:40:43 -08:00
Isaac J. Manjarres
8ffa6450ba iommu/arm-smmu: Add support for not removing SMMU power votes
The SMMU driver will vote for the resources it needs before performing
a particular operation, and will remove its votes after the operation
is complete.

When power resources are not currently enabled by other drivers,
the SMMU driver's requests to enable its devices' power resources
go through the slow paths where the hardware power resources
get turned on. So, in a scenario where the SMMU driver is constantly
performing work and having to toggle the state of the power resources,
the SMMU driver operations take more time.

On GKI, the upstream implementation of the IOMMU page table management
code is used, which doesn't have the optimizations we have downstream,
which improve the performance of the SMMU driver when unmapping memory.

The GPU can go into slumber if it is not active, and can relinquish its
votes for the power resources that the SMMU driver votes for when
unmapping memory. This requires the SMMU driver to take the slowpath
of enabling all of these power resources and then disabling them
on every call to unmap memory, which can incur a considerable amount
of delay.

This delay, along with the usage of the unoptimized IOMMU page table
management code in GKI results in slow unmap calls.

Thus, add support for the SMMU driver to never remove its power votes,
so that it doesn't have to spend time voting for power resources while
it is operating.

Change-Id: Id93aafef18f69e377391875e2a7b340b34b4b3e8
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-11-05 15:36:09 -08:00
Hemant Kumar
a6f6095845 mhi: uci: Add channel mutex lock for read and write file ops
In case of two readers trying to read buffer one acquires spin
lock and populates uci_chan cur_buf and rx_size and local uci_buf.
After first one releases the spin lock other reader populates local
uci_buf with same cur_buf used by first reader. Second reader queues
the buffer to a TRE and releases the spinlock. Now first reader get
the spin lock and ends up copying 0 byte to user space buffer as the
rx_size becomes zero when second reader queues the buffer to transfer
ring. Now first reader queues the same buffer to a different TRE.
When dl xfer completion comes for both TREs, same buffer gets freed up
twice causes the double free. In case of a write it is possible that
two writers can race in case only one TRE is available to transfer the
request, although it does not result into any invalid access issue as in
case of read. Hence acquire channel mutex lock for both read and write
file operations to make sure read and write are done atomically.

Change-Id: I63bccedb28e1bfd59801ccdf642e4f70eb81021d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-11-05 13:57:15 -08:00
Chris Lew
6804f89049 net: qrtr: Make wakeup timeout configurable
The qrtr driver can guarantee that the packet gets queued to the socket
but cannot guarantee the client process will get time to run if auto
sleep is enabled. This config will help mitigate missed packets on
systems where auto sleep is too aggressive.

Use the pm_wakeup_ws_event() api so a hard wakeup can be specified.
This will ensure a resume occurs if the data coming in happens while
the device is going into suspend.

Change-Id: Ic596e06e585b3479a6faa1d0210c016fc9138c6e
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-11-05 13:45:07 -08:00
Alistair Delva
6f6b3fb470 ANDROID: Temporarily disable XFRM_USER_COMPAT filtering
Before 5.10-rc1, the upstream kernel blocked any compat calls into XFRM
code with EOPNOTSUPP, however Android kernels had been patching this
check out and made userspace match the 64-bit kernel netlink format
instead.

When the new XFRM_USER_COMPAT feature landed, it added a similar check
in two places which returns EOPNOTSUPP only if the XFRM_USER_COMPAT
feature is disabled, however that is currently always the case for
Android kernels and we do not want to filter these callers.

While we work to remove the userspace compatibility mess, disable the
filtering of compat calls when XFRM_USER_COMPAT is disabled. If the
XFRM_USER_COMPAT feature is enabled, nothing changes.

Bug: 163141236
Bug: 172541864
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifbea109070650dfcb4f93a3cc692c18a8d11ab44
2020-11-05 21:08:28 +00:00