Commit graph

916,461 commits

Author SHA1 Message Date
Vasily Averin
08db6056f8 netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6
Could you please push this patch into stable@?
it fixes memory corruption in kernels  v3.5 .. v4.10

Lost .data_len definition leads to write beyond end of
struct nf_ct_h323_master. Usually it corrupts following
struct nf_conn_nat, however if nat is not loaded it corrupts
following slab object.

In mainline this problem went away in v4.11,
after commit 9f0f3ebeda ("netfilter: helpers: remove data_len usage
for inkernel helpers") however many stable kernels are still affected.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2020-14305
Bug: 174904512

Change-Id: Ib96d3374766eecef01e92a4407ceca3f8e7c192e
Fixes: 1afc56794e ("netfilter: nf_ct_helper: implement variable length helper private data") # v3.5
cc: stable@vger.kernel.org
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/1957505
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
fuxm1
e6157fa890 hpb: disable HPB feature for 4G ram
Remark:
parse share memory get ram size to distinguish if is 4G ram
if yes, disable HPB feature(Due to 4G ram size is too
senstive for camera).

Change-Id: Icb8575dec742c248586e11bf4ebcc0d2bbac0d9e
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1939239
SME-Granted: SME Approvals Granted
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
fuxm1
3a2623539e defconfig: enable hpb/tw for corfup and cypfg
Remark:
enable hpb and tw feature for corfu-5g and cypfg on mot4350
family.
disable for ibiza and denver, further project if reuse
currently baseline need define it accordingly.

Change-Id: I96b86b584521a88ba241b678f89332705e88e741
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1944778
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
fuxm1
d4bbff0602 scsi/ufs: porting Samsung TW + HPB feature
Remark:
proting samsung hpb + tw driver to msm-5.4 br-4350 branch

Change-Id: Ie964195e3b9bc1ef7d5ba585e839239b4aa1c761
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1885583
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
wangyq13
b2c751350a deconfig: corfup: disable fts touch configs, move to ko
defconfig/corfup:
Disable fts touch configs, move fts driver to ko.

Change-Id: I267acf79228137fa91f5eff593cd3ed5d5c9bf07
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1954462
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
huangzq2
632683b8f1 mm: zram: use rw_page for zram page but submit_bio for zram wb page
Since reading zram wb page is an async operation, we can not immediately
free the slot here. So we need to read the page via submit_bio and free
the slot in end_swap_bio_read. (bio chain will be used to handle bio here
and bio in zram driver for wb page).

Change-Id: I71b88c4a2388c086bd7e0cd63b8c632b93217a95
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1933720
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1952123
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:03 +08:00
zhangly19
ffaa6c5aad fix r1.0_00026 rebase error
++++++++++
ld.lld: error: undefined symbol: smblib_get_prop_usb_voltage_max
>>> referenced by qpnp-smb5.c:939
++++++++++

move "#ifdef QCOM_BASE"  to correct location

Change-Id: I099e7f607e190d3ec3ce17a7a1ede8a7bd1c0005
Reviewed-on: https://gerrit.mot.com/1945042
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Lianlu Chen <chenll4@lenovo.com>
2024-04-18 14:45:03 +08:00
jixj
baa5f17656 Change device name from cyprus to cypfg for Cyprus 5G
device name "cyprus" was already used by ODM1 project.
So need change device name from cyprus to cypfg for Cyprus 5G project.

Change-Id: I7b4ce66495d3232b928e0b6fdcfaa44d0e16e7f7
Reviewed-on: https://gerrit.mot.com/1940602
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
jixj
2378f761ef defconfig: initial cyprus defconfig
Cyprus 5G:
SM4350, initial configs cloned from corfup.

Change-Id: I4bcfe484944cc42f0bca56639c9dcd910af652ee
Reviewed-on: https://gerrit.mot.com/1933497
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
Yonghui Jia
0ad3cfe7d0 Revert "kernel5.4: mm zram:free the swap slot when swap in"
Reason, the changes may cause panic problem
  Fix, revert the change

This reverts commit 147db8784085f8456da0c2870e626da4c25f1778.

Change-Id: Ia4cfda84125c5d06af363e6a2d685d0c94c26c5f
Reviewed-on: https://gerrit.mot.com/1930858
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Zhongsheng Xia <xiazs1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
weimh1
7bbd9267e3 kernel/config: adjust factory defconfig
1.factory support only userdebug build,so it will include
       many debug configs which lead to boot slowly.
    2.remove qcom debug files as perf when factory build.

Change-Id: I7be5d0ba2379d61051b2e3c9d9b2cab4b5c36445
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1932024
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Shicheng Gong <gongsc1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
Mike SU
26b7fe96b7 MOTODESK-3077 Change the NCM default interface name to ncm0
The NCM default interface name "usb0" is confused.
Use "ncm0" better.

Change-Id: I361074b9a3b04968f477d78e7c5a4fd6fe418fdc
Reviewed-on: https://gerrit.mot.com/1916424
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Xuejin Wang <wangxjn@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:03 +08:00
Yiwen Liu
946ecab487 defconfig: initial corfup defconfig
Corfup:
SM4350, initial configs cloned from Ibiza.

Change-Id: I6dabff415665c81c03c74718ab5f3ae39ed5a5fe
Signed-off-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1908449
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
jiayh2
c2ff69edcc Ibiza enable zram-writeback kernel config on main line
set CONFIG_ZRAM_WRITEBACK to y
  This config will split zram-writeback features in zram driver

Change-Id: Id6bffe9a1f42909cd2154b68751ae6198a4040c6
Reviewed-on: https://gerrit.mot.com/1902519
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
jiayh2
a067e6085f Denver enable zram-writeback kernel config on main line
set CONFIG_ZRAM_WRITEBACK to y
  This config will split zram-writeback features in zram driver

Change-Id: I74013e18a1ec8d8245fab72f471456a4707a9f02
Reviewed-on: https://gerrit.mot.com/1902517
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
Mark Reed-MREED1
d0402a631e - Disable reboot to EDL mode (blankflash)
QCOM allows us to boot into EDL mode, however, there is no reason
to do so outside the bootloader. Disabling is good security practice and
required for tracfone security submission.

Change-Id: Id859e88e1140f68521c0fd146444b2f7af34aaa5
Reviewed-on: https://gerrit.mot.com/1900249
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Joel Voss <jvoss@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
huangzq2
0daa6e1781 mm: zram: free the swap slot when swap in
The zram pages on backing store can not be freed when swap in,
becase they have swap cache. So before these pages become drity,
they will be always read from swap cache or backing store. If
these pages happens to be swap out again, the swap cahce will be
deleted, then they can only be loaded from backing store, not zram.

Change-Id: I59a4ef1f7b6fb4ce803a56a7eaae7693a69780d4
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1900258
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1902453
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:02 +08:00
huangzq2
1c3fe4abfa mm: zram: skip readahead for sync io pages
Zram is a ram based swap, but Zram with writeback is ram + IO
based swap, so we still need readhead for the pages on backing
store, the page-cluster should be tuned on each chipset if we
enabled zram wb, beside this, we made this patch to skip readahead
on the page which has not been writebacked.

Change-Id: Ia219baf888cfc6ef4865f7c4d682ab4384de893c
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1900257
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1902452
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:02 +08:00
huangzq2
824502c8d1 mm: zram: fix swapcached issue on kernel 5.4
Afer Zram backing dev setuped, zram will be treated as a ASYNC IO
swap device, no longer SYNC IO device, because WB pages do have IO
operation on swap in, so the optimization on skiping swapcache
for fast swap device will no longer be applyed on such case.

Now we refactor this optimization, skip the swapcache by checking
SYNC IO state on each swap page via ioctl. Reuse ioctl because we
should not break the GKI.

Change-Id: Ia1dc351eafc7c0b62126a3864a6da9136c2bfe6d
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898090
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
quebs2
3d90262b58 qcom_scm: Retry T-Base smc call when TZ is busy.
We cannot guarantee the Trustonic nq kthread is always uninterruptable,
atomic and SMP safe, so that we will send the command to the SCM and
wait for the command to finish processing from secure world in case
the QSEE might be busy at that point. This can be used in pre-emptible
context when the Trustonic fast call is invoked to run whereby the scm
handler happens to be owned by other threads.

Change-Id: I0aac105684c7b8b7bed7ab2146b8ef62dab42837
Signed-off-by: quebs2 <quebs2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1902496
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jefferson Rodrigo Capovilla <jeffecap@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
houdz1
a428f55af0 wled: set the brightness to "low_bl_remap_percent" when disable cabc
When enable"low-bl-disable-cabc" function,We must set the brightness to
"low_bl_remap_percent" when under the low-bl.

Change-Id: Ie4b17b0a46479726059af686c6cc5503141a6b49
Reviewed-on: https://gerrit.mot.com/1900712
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
houdz1
408ab273a2 wled: initial value of low_bl_delay_ms to 0
When "mmi,low-bl-delay-ms" is not defined, the value of
low_bl_delay_ms is uncertain.

Change-Id: I7c2c2d185a31d6a7db9e39960532ca65f49cf6a9
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1899598
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
mahj8
e6f4e4aa6f kernel: unit power off failed when removed charger
unit power off failed when removed charger in factory mode.
Because google android R define CONFIG_STATIC_USERMODEHELPER
and CONFIG_STATIC_USERMODEHELPER_PATH = "", so sub_info->path
is always empty.

Change-Id: If06b3a52e657e083ce89f2f75f717c753a57d685
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1899604
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
mahj8
48cc6284d8 Revert "(CR): arch/config: disable CONFIG_STATIC_USERMODEHELPER"
This change is not need. Because we have changed the code
to reach the goal at https://gerrit.mot.com/#/c/1899604/

Mot-CRs-fixed:(CR)

This reverts commit d80c7cd6d49b21e72e2b91e9e5c556dbeb5b5e85.

Change-Id: I3a58e7d0153f0751f2e8714669683a980b1bf736
Reviewed-on: https://gerrit.mot.com/1900615
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
quebs2
e81049289e Fix instability issue during tbase load in Kernel 5.4
Tbase load was failing intermittently during fc_init() operation
in __smc() with error:
Trustonic TEE: ERROR -14 __smc: fc_init failed (4dee8000)

The root cause has two components
1- qcom_scm_call() needs to be done atomically. Task reschedule was
   causing a failure. Thus changed to the atomic call qcom_scm_call_atomic().
2- Qcom scm_call requires cache maintenance. API attests that any buffers
   that are expected to be accessed by the secure world must be flushed before
   invoking qcom_scm_call and invalidated in the cache immediately after
   qcom_scm_call returns. Cache invalidation was missing, hence add it.

Change-Id: I83139fc5110eb3af536a30800c994c8e451df1fa
Signed-off-by: quebs2 <quebs2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1899491
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
louhs1
731c495e28 kernel/config: append extra config for project
if a prject need extra config, please add to the extra config
for example:
  moto-holi-ibiza-cmcc-extra.config
match TARGET_PRODUCT_TYPE:
  cmcc
  factory
  retail
  ...
Change-Id: I6157eee802bfe4cd11c5d6b76b518b04353c9c27
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898417
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
louhs1
aee7b39c18 arm64/config: add ibiza cmcc extra config
add the extra config for ibiza cmcc project
please add the different config here for cmcc unique request.

Change-Id: I98af3946c12ce4036072a691d11e82aa3c12750f
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898418
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
linyx10
adc9d546d5 Add new smc invoke interface for Trustonic TEE driver.
In kernel 5.4, the old qcom interface scm_call2() has been abandoned, so
add new function trustonic_smc_fastcall() for Trustonic TEE driver module,
and it will send syscall to the secure world through new qcom scm interface.

Change-Id: Ib76c00e9910be6796fc71bdcfaf4352fd8f2806c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1836283
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
linyx10
07f8b5f50a Add the ABI required by mcDrvModule.ko to qcom gki whitelist.
These ABI are used in mcDrvModule.ko and they have been added to GKI whitelist,
so add them to qcom whitelist:
  d_path
  get_task_exe_file
  get_task_mm
  ktime_get_raw_ts64
  mmput
  release_pages

Change-Id: If1d64546756b658e4e726ee8abef452d79a9aa5c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1892816
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Binsheng Que <quebs2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
Nick Desaulniers
3dc89329ea tracing: do not leak kernel addresses
This l(CR) breaks tracing tools l(CR) trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
MOT-CRs-fixed: (CR)

Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Reviewed-on: https://gerrit.mot.com/1887836
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1892775
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:02 +08:00
zhucc2
f559241762 mmc: use max discard ignoring max_busy_timeout parameter.
On kernel 4.14, no matter sd card type, all use max discard value.
However, kernel 5.4 remove this logical, and will cause system watchdog,
if user format 512GB/1TB class 10 card.

Change-Id: Idc6b00187b8800465fca4af8f720aaf87db5700b
Reviewed-on: https://gerrit.mot.com/1890338
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
wangyq13
a9db7a2843 defconfig: holi: enable coresight configs for qdss
defconfig/holi-debug:
Enable coresight configs for qdss.

Change-Id: I0d779a9fbd9c093d57c6f49862b41359912d321d
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1863643
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangyq13
617a485189 qcom-wled: disable cabc only when adjust to low brightness
Disable cabc only when adjust to low brightnss.
Don't disable cabc when screen off/on, this causes big
voltage issue on pm6150l/7150l.

Change-Id: I510ea8d1e3de1cee1a612fec6a08d50792b8b0af
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1873482
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
445dbcd415 Revert "(CR): enable zram writeback kconfig on SM4350"
Reason: zram-writeback will make 3 side effects
  1. Swapcached too large
  2. May cause CTS fail
  3. May cause panic

This reverts commit db753c431b0b778e4f1824efe79718b5e3864839.

Change-Id: I61c6d2eb0222d8bd4d749971bdf5ccaacee854ab
Reviewed-on: https://gerrit.mot.com/1873703
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
fuxm1
7dd7895691 set max_timeout_counter to 0 for large card do BLKDISCARD
Remark:
vold doformat() will call ioctl(BLKDISCARD) before unmount
this blocked sdhci layer for current driver.
So, set max_timeout_counter to 0 to ensure larger discard size by
always setting max_busy_timeout to zero.

the change is from temp patch drop by QC SR:05069564
next QC drop will include the formal patch. that time we can
drop this commit.

Change-Id: I2950b42c01e04bd9cfb9a2a739d00cd35da800f3
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1868453
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
huangzq2
cefa302004 disable watermark boost
Disable watermark boost on kernel 5.4
As it is not working fine

Change-Id: I7f13f763382f1a54616079bc8258997c7f732d91
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1625704
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit d391f5c240aa5d5bb196c6b4c1e21c17b46f069a)
Reviewed-on: https://gerrit.mot.com/1630007
Reviewed-by: Debora Raimundo <dromano@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1783219
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
2024-04-18 14:45:01 +08:00
jiayh2
41dca8df83 enable zram writeback kconfig on SM4350
Enable CONFIG_ZRAM_WRITEBACK config
  This config allow zram writeback

Change-Id: I089985d2f82478e37ad85a5d65149b03c4254885
Reviewed-on: https://gerrit.mot.com/1856194
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
chailu1
45cfb22658 charge: modify charge done condition by mmi charge full
mmi charge decide charge terminal current. So modify charge done
condition by mmi charge status. Otherwise could not got correct
charge done status.

Change-Id: I3f41582518bbb83bca9f5519a65f7ce311835b91
Reviewed-on: https://gerrit.mot.com/1850451
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
cf0e6955f7 qg: add bms voltage ocv prop node
add bms voltage ocv prop node
for battery parameter test

Change-Id: I2956fe82c95311d7d76f408cda8295dc93bd3784
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1848075
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
duqiu2
7555c913a7 wisl: ibiza: Modify nfc driver to ko module for GKI issue
GKI image should not support nfc. Nfc dirver is built to our kernel.
And nfc can't work after flashing GKI. So we change the nfc dirver as
a ko module.

Change-Id: I602e308fb636695aa6a4969341324bae11dca385
Signed-off-by: duqiu2 <duqiu2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1846765
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
chailu1
56a85f8a0d smb5-lib: Update USB ICL for USB phy speed
Override the SDP current if it needs to increase for SDP USB2.0 500mA
or USB3.0 900mA.

Porting from (CR)

Change-Id: Ib0136a2674e8f9ac6e7e5646a82052971a4bbf08
Reviewed-on: https://gerrit.mot.com/1836523
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangxf14
517749f766 drivers: rtc: revert debug log from rtc module
According to debug, denver's unexpected RTC reset was caused by
PMIC issue. So I rever the monitor change.

This reverts commit 2a62d1dc1ccb40b698b33d4cff83f8cdf3d4c95c.

Change-Id: I6ef1049ccdfd32b1f12df3aef748c5755a469a64
Reviewed-on: https://gerrit.mot.com/1831952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
f7c3400a64 QG: qg prob must after rtc prob
qg use alarm timer, so qg must prob after rtc prob.
when qg can't get rtc dev, return -517 to retry.

Change-Id: I36603856536505c52151d8ef7d685b4ccc3e96e6
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1825304
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
73a0d9455b kernel: remove export symbol in pmic-voter.c
Because GKI, pmic-voter.o is included by both qcom-qpnp-qg.ko
and qpnp-smb5-main.ko, so can't export symbol in pmic-voter.c

Change-Id: I3c9266531de4a4e2461e872bade0bd7dfcaa0eec
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1822938
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
303f09a9d1 kernel: export some api symbol of pmic vote
Export some pmic-voter interfaces for dlkm usage as well
as create access functions that are exported for dlkm to
manipulate the struct.

charging DLKM need some api of pmic vote, but pmic_voter.o
is included by both qpnp-smb5-main.ko and qcom-qpnp-qg.ko,
KMI don't allow double export one function in two DLKM modules.

Change-Id: I56f96b663d9ee2228d91bd2efc6977a13f270de4
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1822930
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
jixj
d49939332d ion: dmabuf improve debugfs
it will cause ion related ABI CRC mismatch, wrap
CONFIG_DEBUG_FS for them

Change-Id: I162143205847323eaa0fbb52e7b337607e57b07a
Signed-off-by: jixj <jixj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1825354
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Chuanchun Zhu
e4ecf9469c Revert "(CR): mmc/sd: Add sys entry to read card speed"
This reverts commit ed5f0747d0723d8fd5ac93aea375d503642a5537.

Change-Id: I9ea66b3e6d66098466e0a4bad547ae9935452943

Mot-CRs-fixed:(CR)

[3.312547] init: Failed to insmod '/lib/modules/5.4-gki/cqhci.ko' with args ''
[3.319900] init: LoadWithAliases was unable to load /lib/modules/5.4-gki/cqhci.ko
[3.327496] init: LoadWithAliases was unable to load sdhci_msm
[3.333348] init: moto LoadListedModules failed sdhci_msm

Change-Id: I9ea66b3e6d66098466e0a4bad547ae9935452943
Reviewed-on: https://gerrit.mot.com/1824484
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangxf14
c6852b254e drivers: rtc: add debug log into rtc module
According to the guideline from Qualcomm support, I add RTC log
in kernel so that we can trace the issue from unexpected RTC reset

Change-Id: Ia26f18ecebcf7627df167dd146582717c8e3414c
Signed-off-by: wangxf14 <wangxf14@motorola.com>
Reviewed-on: https://gerrit.mot.com/1824238
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
1ed2acbc2c Revert "(CR): Ibiza remove kernel config for PASR"
Remove PASR will impact GKI
  So revert the changes

This reverts commit 8cd7ac5016d01623b92c01e2485640c155938330.

Change-Id: I587650c4b5fdb7474c98fa0754e51d4fa917b24f
Reviewed-on: https://gerrit.mot.com/1823952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
9f2edd3674 Revert "(CR): Denver remove kernel config for PASR"
Remove PASR will impact GKI
  So revert the changes

This reverts commit 5e0fa830adf5aa819732004a1e30dfd31e024c42.

Change-Id: Ie06043ef33418c59daf881cc2296522b57f9b824
Reviewed-on: https://gerrit.mot.com/1823951
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00