Using channel mutex lock while accessing channel specific lists,
event_req_buffers and flush_event_req_buffers. This will avoid any
synchronization issues for these lists. Previously two different mutex
locks, global MHI lock and channel lock are used while accessing these
lists.
Removing MHI spin lock while accessing the above lists in
mhi_dev_process_reset_cmd, mhi_dev_queue_transfer_completion and
mhi_dev_flush_transfer_completion_events APIs as they are already
protected by channel mutex lock obtained from the APIs that are
calling these three APIs.
Removing MHI spin lock in mhi_dev_event_msi_cb and adding channel mutex
lock. In other instances where these lists are accessed they are already
protected by channel mutex lock.
Change-Id: I58b673be452a942ff946e07f17c96a0715805621
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
With the commit <1528bbe6b5> ("msm: mhi_dev: Keeping event req
memory without clearing in close channel"), we are avoiding freeing
of ereq memory in close channel API. New memory is not created again
as part of start/open channel since it is not released while closing
the channel. Idea is to hold the allocated memory and avoid
reallocating every time.
But during the reset command we are freeing some of the ereqs which we
need to hold without releasing.
This change avoids freeing of ereq memory as part of reset channel
command and adds the ereqs to the event_req_buffers list. This ensures
that the lists, event_req_buffers and flush_event_req_buffers are
updated with valid ereqs.
Change-Id: Ie29962f2bc8ef5a0c193d13a13118ae9b6044c0b
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
Check pcie channel status before call the close channel API, only
closed it when it in open state.
Change-Id: Ib3bee9575edfae0cc907baee4956d6e3a6c78d61
Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
Start channel commands from MHI Host are given for all the set of valid
channels during the initialization itself. Previously we are allocating
ereq memory as part of start channel command. But, many of these channels
may not be opened by the clients and the ereq memory allocated is not
useful here.
Here avoiding ereq memory allocation during start channel command and
allocating memory only as part of open channel call by the clients. This
will reduce the overall memory usage and avoid the memory allocation
failures.
Change-Id: I60eccd1d17c60e1108820e1532f2ae385455f336
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
With commit 8c194abb0e ("input: qcom-hv-haptics: delay hBoost turning
off"), the hBoost would be kept as enabled in the 2 seconds after stopping
play. If a new play is triggered in that 2 seconds, the hBoost will be
considered as working in open-loop mode so configure haptics open-loop
drive in such case.
Change-Id: Ibfa533f23a52bd609e2a8564f859ca8835a8fd67
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
This reverts commit b515d2637276a3810d6595e10ab02c13bfd0b63a.
Commit b515d2637276a3810d6595e10ab02c13bfd0b63a ("xfrm: xfrm_state_mtu
should return at least 1280 for ipv6") in v5.14 breaks the TCP MSS
calculation in ipsec transport mode, resulting complete stalls of TCP
connections. This happens when the (P)MTU is 1280 or slighly larger.
The desired formula for the MSS is:
MSS = (MTU - ESP_overhead) - IP header - TCP header
However, the above commit clamps the (MTU - ESP_overhead) to a
minimum of 1280, turning the formula into
MSS = max(MTU - ESP overhead, 1280) - IP header - TCP header
With the (P)MTU near 1280, the calculated MSS is too large and the
resulting TCP packets never make it to the destination because they
are over the actual PMTU.
The above commit also causes suboptimal double fragmentation in
xfrm tunnel mode, as described in
https://lore.kernel.org/netdev/20210429202529.codhwpc7w6kbudug@dwarf.suse.cz/
The original problem the above commit was trying to fix is now fixed
by commit 6596a0229541270fb8d38d989f91b78838e5e9da ("xfrm: fix MTU
regression").
Change-Id: Iefabad76eb1870f74b819f45e9d3a51cbc94549c
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Git-commit: a6d95c5a628a09be129f25d5663a7e9db8261f51
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
Signed-off-by: Sharath Chandra Vurukala<quic_sharathv@quicinc.com>
Use UBI_MAX_VOLUME_NAME length for printing ubi volume names
to avoid truncation of ubi volume name fields.
Change-Id: I0ab4577dcc1e4bb93d2bcef1b8e52da98f13ff15
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
Performance counter values need not be retained across contexts unless
specifically requested for debug. Zap the counters by initialising
perfcounter SRAM with 0's using GPU_RBBM_PERFCTR_SRAM_INIT_CMD.
Add pm4 packets during context switches and add a KMD postamble packet to
clear the counters during preemption. Do not enable perfcounter save and
restore unless requested.
Change-Id: I371779ce659c07a1cc664327f5ecdcf0374201d8
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
If packet size is set to invalid value by firmware, when driver
tries to copy property content to memory, it could cause buffer
overflow. To avoid this, packet size needs to be checked to make
sure it's valid.
Change-Id: Ic549f840db998385323e89b3f3dbe2e4349b932e
Signed-off-by: Jilai Wang <quic_jilaiw@quicinc.com>
Currently, only HS descriptors will be updated with endpoint address
during binding process. According to current max_speed in configfs,
this patch will also update SS/SSP descriptors with endpoint address.
Bug: 162562782
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I67983ef47df7ac567ec1d3af80921c39c98a545d
Git-commit: 41fe558317e9ffdc07326e8ef9ca6ea596d9a518
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pratham Pratap <ppratap@codeaurora.org>
Adds the necessary SuperSpeed Plus support for f_accessory.
[Not upstream as this file is not upstream].
Bug: 170925797
Signed-off-by: taehyun.cho <taehyun.cho@samsung.com>
Change-Id: Ia2a5f4a6cefac2418f8f29bf1a56355b96d80fc0
(cherry picked from commit 00572be28ec474d7953f1b9dd681cc2dd290d9bf)
[willmcvicker: only cherry-pick f_accessory from original patch]
Signed-off-by: Will McVicker <willmcvicker@google.com>
(cherry picked from commit 4d7ced0819d3f30acbde46991393249049cefa05)
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Git-commit: 9acdbad022c88c958ba69ab3f021f2e8a07cfc45
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pratham Pratap <ppratap@codeaurora.org>
dma_map_resource() API returns DMA_MAPPING_ERROR i.e -1 upon error.
The current code checks against NULL which makes it think that the
API returned successfully. The incorrect IOVA further results into
SMMU fault. To fix this, add proper error handling for mapping
failure of iova.
Change-Id: I080049029ce01be13c603a1d709e37189a09484e
Signed-off-by: Rohith Kollalsi <quic_rkollals@quicinc.com>
Cleanup the redundant configs from holi_GKI.config as they are
updated in gki_defconfig.
Change-Id: I9e1a3bc7800e9d1e56ba651a63ebab03dd52546e
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
Pass channel name as formmated string to device_create call in
spcom_create_channel_chardevto prevent memory access issues when using
formatted string as channel name.
Change-Id: I549087a49e97f0b1a66ea5816eabfe80a6f7f1f7
Signed-off-by: Liron Daniel <lirond@codeaurora.org>
* refs/heads/tmp-5d7a491:
UPSTREAM: lib/iov_iter: initialize "flags" in new pipe_buffer
Revert "ANDROID: incremental-fs: remove index and incomplete dir on umount"
Revert "ANDROID: incremental-fs: fix mount_fs issue"
FROMGIT: f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
UPSTREAM: usb: gadget: rndis: check size of RNDIS_MSG_SET command
UPSTREAM: USB: gadget: validate interface OS descriptor requests
Revert "tracefs: Have tracefs directories not set OTH permission bits by default"
UPSTREAM: tipc: improve size validations for received domain records
ANDROID: GKI: Enable CONFIG_SERIAL_8250_RUNTIME_UARTS=0
ANDROID: GKI: db845c: Update symbols list and ABI
ANDROID: Increase x86 cmdline size to 4k
UPSTREAM: cgroup-v1: Require capabilities to set release_agent
ANDROID: incremental-fs: remove index and incomplete dir on umount
UPSTREAM: binder: fix async_free_space accounting for empty parcels
UPSTREAM: tee: handle lookup of shm with reference count 0
UPSTREAM: bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc
Change-Id: Icb1c0295b7d7da25c37c21a2580ea4d246069039
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
GFP_ATOMIC flag is typically used in memory allocations inside
interrupt handlers or with spin locks. It is of high priority but it
does not allow the caller to reclaim the memory allocation request.
This may lead to memory allocation failures in low memory situations.
Since alloc_skb() is not called from interrupt handler or in spin lock
context, changing the GFP flag from GFP_ATOMIC to GFP_KERNEL.
Change-Id: I6c3a2b5b4674965cf1d4860e9072fa46cd4adddb
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
Consider a case where, during bus_reset or composition switch,
due to some reason ENDXFER command timed out. Now, gadget driver
won't be giving back the requests to function driver because of
the timeout since controller can still access those requests.
During function_disable gadget driver expects function driver to
dequeue the requests so that the lists maintained by both gadget
driver and function driver should free up all the request.
Currently u_serial driver is just freeing the requests from
read/write pool without any dequeue which is causing
inconsistencies.
Fix this by dequeueing requests from read/write pool on
gserial_disconnect.
Change-Id: I714c7fe681d42a68c864bf0e90748f117b258548
Signed-off-by: Pratham Pratap <quic_ppratap@quicinc.com>
The gadget->max_speed should not be changed dynamically as it can
mess up the descriptor preparation. Let it be the max supported
by the hardware and changed the dwc3->maximum_speed to force
the controller to enumerate at lower speed when needed. This makes
sure that the descriptors for all speeds are cached during bind
of the function drivers.
Change-Id: Id7fd8f23bb84f7396a6e3b62c5e61c4536522d82
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
commit 9d2231c5d74e13b2a0546fee6737ee4446017903 upstream.
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 87c575d2a2)
Bug: 220741611
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I91076a0b6327ee8dd87e75fc875062b6adf2de4c
Currently performance counters are global and can be read by anyone. Change
the behaviour to disable reading global counters as default and add a sysfs
node to enable/disable reads.
Change-Id: Ic3785acd9bd7425c2a844ed103d7b870d9f80adf
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
This reverts commit fe0c18d0f0.
This is follow up cleanup after revert of:
"Revert "ANDROID: incremental-fs: fix mount_fs issue"
Bug: 220805927
Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
Change-Id: I7749401484d87b9d519bd7b9600cd02f91a18090
Clean up the lucid_5lpe_sdx_cpu ops as it is not in use.
Change-Id: I2a154be710b2a36f2a00eb689212cc39f57c284d
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
This reverts commit 013b7ed754.
Test: Can now install the same apk twice, and repeated installs are
stable
Bug: 217661925
Bug: 219731048
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I86871c364c17a0d1107b3891a574b72edcf04ea2
(cherry picked from commit d107cd06f26b4d45b1079c7eb857815905198076)
Signed-off-by: Howard Chen <howardsoc@google.com>