OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
4 years agomsm: camera: Remove unnecessary parentheses in msm_cam_sensor_handle_reg_gpio
Nathan Chancellor [Wed, 24 Apr 2019 00:34:02 +0000 (17:34 -0700)]
msm: camera: Remove unnecessary parentheses in msm_cam_sensor_handle_reg_gpio

Clang warns:

../drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c:1356:48:
warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
        if ((gconf->gpio_num_info->valid[gpio_offset] == 1)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c:1356:48:
note: remove extraneous parentheses around the comparison to silence
this warning
        if ((gconf->gpio_num_info->valid[gpio_offset] == 1)) {
            ~                                         ^   ~
../drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c:1356:48:
note: use '=' to turn this equality comparison into an assignment
        if ((gconf->gpio_num_info->valid[gpio_offset] == 1)) {
                                                      ^~
                                                      =
1 warning generated.

Fixes: 92a558c15e80 ("msm: camera: Add support to enable eLDOs through GPIOs")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agousb_bam: Fix usb bam_type assignment during suspend
Manu Gautam [Wed, 6 Mar 2019 10:54:06 +0000 (16:24 +0530)]
usb_bam: Fix usb bam_type assignment during suspend

Driver incorrectly uses bam_mode (device/host) as bam_type
(dwc3/CI). This logic will work as long as bus-suspend
happens for dwc3 in device mode with BAM function but will
fail with CI core in device mode. However host mode BAM
pipes are no longer supported. Fix this by using proper
variable for bam_type instead of cur_bam_mode.

Change-Id: Id3b2bf3e578b5c339c46c940645b439dfafd28fb
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=077bb02a08aee79cc25bf12af1d109db7bdb8519
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: camera: Remove useless NULL checks in msm_flash_i2c_release
Nathan Chancellor [Fri, 27 Sep 2019 05:57:52 +0000 (22:57 -0700)]
msm: camera: Remove useless NULL checks in msm_flash_i2c_release

Clang warns:

../drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c:366:21:
warning: address of 'flash_ctrl->power_info' will always evaluate to
'true' [-Wpointer-bool-conversion]
        if (!(&flash_ctrl->power_info) || !(&flash_ctrl->flash_i2c_client)) {
            ~  ~~~~~~~~~~~~^~~~~~~~~~
../drivers/media/platform/msm/camera_v2/sensor/flash/msm_flash.c:366:51:
warning: address of 'flash_ctrl->flash_i2c_client' will always evaluate
to 'true' [-Wpointer-bool-conversion]
        if (!(&flash_ctrl->power_info) || !(&flash_ctrl->flash_i2c_client)) {
                                          ~  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
2 warnings generated.

While we are at it, remove rc's useless assignment to zero.

Fixes: 12d7df3314bf ("msm: camera: Add all camera drivers")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: ipa3: Use bitwise instead of logical operator
Ghanim Fodi [Tue, 6 Mar 2018 14:43:18 +0000 (16:43 +0200)]
msm: ipa3: Use bitwise instead of logical operator

commit 189a5aa30fc8 ("msm: ipa3: Fix IPA aggregation register val-mask
calculation") introduced a compile time error. The logical '&&' has been
used in a situation where the bitwise '&' operator is needed.

drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2132:67: error: use of logical '&&' with
      constant operand [-Werror,-Wconstant-logical-operand]
        valmask->val = (1 << IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT) &&
                                                                         ^
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2132:67: note: use '&' for a bitwise
      operation
        valmask->val = (1 << IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT) &&
                                                                         ^~
                                                                         &
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2132:67: note: remove constant to silence
      this warning
        valmask->val = (1 << IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT) &&
                                                                        ~^~
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2136:60: error: use of logical '&&' with
      constant operand [-Werror,-Wconstant-logical-operand]
        valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) &&
                                                                  ^
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2136:60: note: use '&' for a bitwise
      operation
        valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) &&
                                                                  ^~
                                                                  &
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c:2136:60: note: remove constant to silence
      this warning
        valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) &&
                                                                 ~^~
2 errors generated.

Fixes: 189a5aa30fc8 ("msm: ipa3: Fix IPA aggregation register val-mask calculation")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: Ia077e270743e4551e4b7777c2ced5b021487fff6
CRs-fixed: 2196859
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=9400cb84016214a08682c4d9726179e572e0c9a6
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: ipa3: Fix IPA aggregation register val-mask calculation
Ghanim Fodi [Tue, 23 Jan 2018 20:07:42 +0000 (22:07 +0200)]
msm: ipa3: Fix IPA aggregation register val-mask calculation

The register value and mask used to configure IPA
aggregation are miscalculated at IPA HAL.
The mask value used per H/W version is pre-shifted
and there is no need to shift it.

Change-Id: Ia269e91a96430fc96975cb15b6b37b250f05eda7
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=189a5aa30fc8bddc0e6f7f88dc5007e6d9601bea
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: camera: Remove pointless NULL checks in {__,}msm_remove_session_cmd_ack_q
Nathan Chancellor [Fri, 27 Sep 2019 05:52:02 +0000 (22:52 -0700)]
msm: camera: Remove pointless NULL checks in {__,}msm_remove_session_cmd_ack_q

Clang warns:

../drivers/media/platform/msm/camera_v2/msm.c:625:18: warning: address
of 'cmd_ack->command_q' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!(&cmd_ack->command_q))
            ~  ~~~~~~~~~^~~~~~~~~
../drivers/media/platform/msm/camera_v2/msm.c:635:32: warning: address
of 'session->command_ack_q' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if ((!session) || !(&session->command_ack_q))
                          ~  ~~~~~~~~~^~~~~~~~~~~~~
2 warnings generated.

This matches what is present in msm-4.14.

Fixes: 12d7df3314bf ("msm: camera: Add all camera drivers")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: vidc: Resolve clang compilation error
Priyanka Gujjula [Thu, 7 Mar 2019 14:33:15 +0000 (20:03 +0530)]
msm: vidc: Resolve clang compilation error

pkt->rg_buffer_info will always evaluate to 'true',
hence refining the code.

Change-Id: Ifb686c991b9ae06d449a5a1ec3485823ca9b926c
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
[nc: Apply the same resolution as below, conflict was due to no case to
     struct hal_buffer_info *]
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=863bd77bde408d54f66a7238fcb4146001428d2e
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agouapi: video: msm: Fix header guard
Nathan Chancellor [Fri, 27 Sep 2019 05:40:21 +0000 (22:40 -0700)]
uapi: video: msm: Fix header guard

Clang warns:

In file included from ../drivers/video/fbdev/msm/mdss_hdcp_1x.c:25:
../include/uapi/video/msm_hdmi_hdcp_mgr.h:1:9: warning:
'_UAPI__HDMI_HDCP_MGR_H' is used as a header guard here, followed by
#define of a different macro [-Wheader-guard]
#ifndef _UAPI__HDMI_HDCP_MGR_H
        ^~~~~~~~~~~~~~~~~~~~~~
../include/uapi/video/msm_hdmi_hdcp_mgr.h:2:9: note:
'_UAPI__MSM_HDMI_HDCP_MGR_H' is defined here; did you mean
'_UAPI__HDMI_HDCP_MGR_H'?
#define _UAPI__MSM_HDMI_HDCP_MGR_H
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
        _UAPI__HDMI_HDCP_MGR_H
1 warning generated.

Fixes: b32a8b2e782a ("mdss: hdmi: HDCP Topology")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: camera: Remove pointless NULL checks in msm_camera_{get,put}_clk_info
Nathan Chancellor [Fri, 27 Sep 2019 05:36:25 +0000 (22:36 -0700)]
msm: camera: Remove pointless NULL checks in msm_camera_{get,put}_clk_info

Clang warns:

../drivers/media/platform/msm/camera_v2/common/cam_soc_api.c:208:23:
warning: address of 'pdev->dev' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!pdev || !&pdev->dev || !clk_info || !clk_ptr || !num_clk)
                     ~ ~~~~~~^~~
../drivers/media/platform/msm/camera_v2/common/cam_soc_api.c:510:23:
warning: address of 'pdev->dev' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!pdev || !&pdev->dev || !clk_info || !clk_ptr)
                     ~ ~~~~~~^~~
2 warnings generated.

Fixes: a4663702036e ("msm: camera: sensor: Updating soc layer clock API for i2c drivers")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoRevert "mmc: Fixing few warning messages."
Nick Desaulniers [Tue, 24 Oct 2017 22:47:20 +0000 (15:47 -0700)]
Revert "mmc: Fixing few warning messages."

This reverts commit 1149dc7d996c67b8b730c0348bb704a6e8e2b5ca.

The commits
6ecb02a4e10f09c2b484b1f05c676f8e0ae5f150
6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8
1149dc7d996c67b8b730c0348bb704a6e8e2b5ca

turn

strcpy(string, buf);

into

strlcpy(string, buf, strlen(buf));

which is equivalent. So let's drop these out of tree patches.

Bug: 67861121
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: If7f8614288bcc70975fd6b39ae63c98ed4e53c3e
Link: https://android.googlesource.com/kernel/msm/+/b8dae9462740c461ea5ee44aee8f79bc40302062
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoRevert "mmc: sdio: Update the argument for data copy"
Nick Desaulniers [Tue, 24 Oct 2017 22:46:52 +0000 (15:46 -0700)]
Revert "mmc: sdio: Update the argument for data copy"

This reverts commit 6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8.

The commits
6ecb02a4e10f09c2b484b1f05c676f8e0ae5f150
6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8
1149dc7d996c67b8b730c0348bb704a6e8e2b5ca

turn

strcpy(string, buf);

into

strlcpy(string, buf, strlen(buf));

which is equivalent. So let's drop these out of tree patches.

Bug: 67861121
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I86e576465367e92e8ca2ce1337edbdc76621a2b1
Link: https://android.googlesource.com/kernel/msm/+/965f632cb0e7c375840a5877e5d40418e0f1210c
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoRevert "mmc: sdio: Update the buffer copy to include the last char"
Nick Desaulniers [Tue, 24 Oct 2017 22:46:34 +0000 (15:46 -0700)]
Revert "mmc: sdio: Update the buffer copy to include the last char"

This reverts commit 6ecb02a4e10f09c2b484b1f05c676f8e0ae5f150.

The commits
6ecb02a4e10f09c2b484b1f05c676f8e0ae5f150
6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8
1149dc7d996c67b8b730c0348bb704a6e8e2b5ca

turn

strcpy(string, buf);

into

strlcpy(string, buf, strlen(buf));

which is equivalent. So let's drop these out of tree patches.

Bug: 67861121
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I8d8e9f089a979e170d4164e046102e0791691e86
Link: https://android.googlesource.com/kernel/msm/+/74be6dae5b243df1ec170e949f714a6d7f0613d7
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agommc: host: sdhci-msm-ice: Fix compilation issue in ice
Ram Prakash Gupta [Tue, 11 Sep 2018 15:14:59 +0000 (20:44 +0530)]
mmc: host: sdhci-msm-ice: Fix compilation issue in ice

Fix compilation issue in kernel 4.14, for err message as "logical
not is only applied to the left hand side of this bitwise operator".

To fix this issue, used paranthesis for left hand side of bitwise
operator.

Change-Id: If556455149c2c7de2b87d6abcbbc483131606fbf
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/?id=2e6f73bd555e72edb316d52d73e8371792df3adf
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoASoC: msm: qdsp6v2: Don't use enum as a NULL pointer
Nathan Chancellor [Fri, 27 Sep 2019 05:14:05 +0000 (22:14 -0700)]
ASoC: msm: qdsp6v2: Don't use enum as a NULL pointer

Clang warns:

../sound/soc/msm/qdsp6v2/q6lsm.c:229:33: warning: expression which
evaluates to zero treated as a null pointer constant of type 'struct
lsm_client *' [-Wnon-literal-null-conversion]
        lsm_session[client->session] = LSM_INVALID_SESSION_ID;
                                       ^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Fixes: be1a516dcb85 ("ASoC: msm: Add Audio drivers for MSM targets")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoASoC: msm: qdsp6v2: Fix a clang warning in qdsp_cvs_callback
Nathan Chancellor [Fri, 27 Sep 2019 05:10:58 +0000 (22:10 -0700)]
ASoC: msm: qdsp6v2: Fix a clang warning in qdsp_cvs_callback

../sound/soc/msm/qdsp6v2/q6voice.c:7114:55: warning: use of logical '||'
with constant operand [-Wconstant-logical-operand]
        } else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM ||
                                                             ^
../sound/soc/msm/qdsp6v2/q6voice.c:7114:55: note: use '|' for a bitwise
operation
        } else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM ||
                                                             ^~
                                                             |
1 warning generated.

Fixes: 36ed1afb5699 ("ASoC: msm: qdsp6v2: Update rtac driver to support Instance ID")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agodrivers: hwmon: Fix compilation errors in ADC for kernel 4.9
Jishnu Prakash [Fri, 8 Mar 2019 05:30:51 +0000 (11:00 +0530)]
drivers: hwmon: Fix compilation errors in ADC for kernel 4.9

Correct the value of cal_val to pick from right enum. Make
additional changes to fix compilation issues.

Change-Id: I89a83e308da9171f79663951b05678fbe40eb9cf
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=a5f6af2b2bd77b8a17bf0019964b9bb00b231977
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoASoC: wcd_cpe_services: Use proper enums
Nathan Chancellor [Fri, 27 Sep 2019 04:57:54 +0000 (21:57 -0700)]
ASoC: wcd_cpe_services: Use proper enums

Clang warns:

../sound/soc/codecs/wcd_cpe_services.c:666:16: warning: implicit
conversion from enumeration type 'enum cpe_svc_event' to different
enumeration type 'enum cmi_api_event' [-Wenum-conversion]
        notif.event = CPE_SVC_CMI_MSG;
                    ~ ^~~~~~~~~~~~~~~
../sound/soc/codecs/wcd_cpe_services.c:1181:9: warning: implicit
conversion from enumeration type 'enum cpe_svc_result' to different
enumeration type 'enum cpe_process_result' [-Wenum-conversion]
        return CPE_SVC_SUCCESS;
        ~~~~~~ ^~~~~~~~~~~~~~~
2 warnings generated.

Fixes: 03f5d7efe220 ("ASoC: wcd: Add Audio codec drivers for MSM targets")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoecryptfs: Remove two pointless NULL checks in ecryptfs_dump_cipher
Nathan Chancellor [Fri, 27 Sep 2019 04:39:37 +0000 (21:39 -0700)]
ecryptfs: Remove two pointless NULL checks in ecryptfs_dump_cipher

Clang warns:

../fs/ecryptfs/debug.c:142:12: warning: address of array 'stat->cipher'
will always evaluate to 'true' [-Wpointer-bool-conversion]
        if (stat->cipher)
        ~~  ~~~~~~^~~~~~
../fs/ecryptfs/debug.c:146:12: warning: address of array
'stat->cipher_mode' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (stat->cipher_mode)
        ~~  ~~~~~~^~~~~~~~~~~
2 warnings generated.

Fixes: f50a4a1dc7a0 ("eCryptfs: fixed bug in cipher handling")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoclk: qcom: clk-debug: Reorder if statement to avoid self assignment
Nathan Chancellor [Fri, 27 Sep 2019 04:31:32 +0000 (21:31 -0700)]
clk: qcom: clk-debug: Reorder if statement to avoid self assignment

Currently, this if statement is worded as:

if (a == 0xFF)
    b = b;
else if (a) /* a != 0 and a != 0xFF */
    b |= c;
else /* a == 0 */
    b |= d;

This causes a clang warning:

../drivers/clk/qcom/clk-debug.c:182:11: warning: explicitly assigning
value of variable of type 'u32' (aka 'unsigned int') to itself
[-Wself-assign]
                        regval = regval;
                        ~~~~~~ ^ ~~~~~~
1 warning generated.

This can be reworded as:

if (!a) /* a == 0 */
    b |= d;
else if (a != 0xFF)
    b |= c;

which is equivalent in meaning and avoids the warning.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agocrypto: msm: update QTI crypto drivers for msm-4.14
Zhen Kong [Thu, 1 Feb 2018 22:52:10 +0000 (14:52 -0800)]
crypto: msm: update QTI crypto drivers for msm-4.14

Fix compilation issues for QTI crypto driver on msm-4.14,
this change does code clean up to remove unsupported SMMU
attribute, allocate qcedev_async_req from heap instead of
stack, and add NULL pointer check for ota_async_req.

Change-Id: I5cabcb6993d8855275f3b38c7de6eafb77f8cbf4
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
[nc: Partially picked from msm-4.14 to resolve a clang warning around
     stack frame size]
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/?id=b269cc277318a03ab1563a563a064e4196fb1bb0
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agosched/sysctl: Fix one more attribute on extern declaration
Nathan Chancellor [Thu, 4 Jan 2018 21:28:10 +0000 (14:28 -0700)]
sched/sysctl: Fix one more attribute on extern declaration

../kernel/sched/sched.h:1154:36: warning: section attribute is specified
on redeclared variable [-Wsection]

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoqseecom: Fix clang compilation in qseecom driver
Anmolpreet Kaur [Wed, 6 Mar 2019 08:48:06 +0000 (14:18 +0530)]
qseecom: Fix clang compilation in qseecom driver

Make changes to ensure qseecom driver compiles
fine with clang enabled.

Change-Id: I390a1438425d77c23438fceb5c2c52063b472c90
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
[nc: Also apply the same fix to drivers/misc/qseecom_legacy.h, which
     does not exist in 4.9]
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=dd006fea3236d1d5b690c30af84d7e25db092e43
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoBACKPORT: sched/debug: Explicitly cast sched_feat() to bool
Peter Zijlstra [Wed, 29 Aug 2018 09:45:21 +0000 (11:45 +0200)]
BACKPORT: sched/debug: Explicitly cast sched_feat() to bool

LLVM has a warning that tags expressions like:

if (foo && non-bool-const)

This pattern triggers for CONFIG_SCHED_DEBUG=n where sched_feat() ends
up being whatever bit we select. Avoid the warning with an explicit
cast to bool.

Reported-by: Philipp Klocke <philipp97kl@gmail.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://git.kernel.org/linus/7e6f4c5d600c1c8e2a1d900e65cab319d9b6782e
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoBACKPORT: misc: lkdtm: Add volatile to intentional NULL pointer reference
Michael Davidson [Fri, 14 Apr 2017 21:15:09 +0000 (14:15 -0700)]
BACKPORT: misc: lkdtm: Add volatile to intentional NULL pointer reference

Add a volatile qualifier where a NULL pointer is deliberately
dereferenced to trigger a panic.

Without the volatile qualifier clang will issue the following warning:
"indirection of non-volatile null pointer will be deleted,
not trap [-Wnull-dereference]" and replace the pointer reference
with a __builtin_trap() (which generates a ud2 instruction on x86_64).

Signed-off-by: Michael Davidson <md@google.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://git.kernel.org/linus/9e18308a5dcc2250a271e598dfe0d917b5522475
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoBACKPORT: cfg80211: remove enum ieee80211_band
Johannes Berg [Wed, 2 Aug 2017 00:50:02 +0000 (17:50 -0700)]
BACKPORT: cfg80211: remove enum ieee80211_band

This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Change-Id: Ifc56e6297146c9095432b757fabd0c463d7cc583
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 62057517
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://android.googlesource.com/kernel/msm/+/56f601d6bb9e51c3c8a79a5f40878b8d1e6ff481
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoUPSTREAM: mm/zsmalloc.c: change stat type parameter to int
Matthias Kaehlcke [Fri, 8 Sep 2017 23:13:02 +0000 (16:13 -0700)]
UPSTREAM: mm/zsmalloc.c: change stat type parameter to int

zs_stat_inc/dec/get() uses enum zs_stat_type for the stat type, however
some callers pass an enum fullness_group value.  Change the type to int to
reflect the actual use of the functions and get rid of 'enum-conversion'
warnings

Link: http://lkml.kernel.org/r/20170731175000.56538-1-mka@chromium.org
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Doug Anderson <dianders@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://git.kernel.org/linus/3eb95feac113d8ebad5b7b5189a65efcbd95a749
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoUPSTREAM: mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
Nick Desaulniers [Mon, 10 Jul 2017 22:47:26 +0000 (15:47 -0700)]
UPSTREAM: mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning

is_first_page() is only called from the macro VM_BUG_ON_PAGE() which is
only compiled in as a runtime check when CONFIG_DEBUG_VM is set,
otherwise is checked at compile time and not actually compiled in.

Fixes the following warning, found with Clang:

  mm/zsmalloc.c:472:12: warning: function 'is_first_page' is not needed and will not be emitted [-Wunneeded-internal-declaration]
  static int is_first_page(struct page *page)
           ^

Link: http://lkml.kernel.org/r/20170524053859.29059-1-nick.desaulniers@gmail.com
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://git.kernel.org/linus/3457f4147675108aa83f9f33c136f06bb9f8518f
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoBACKPORT: sched/sysctl: Fix attributes of some extern declarations
Matthias Kaehlcke [Mon, 30 Oct 2017 18:08:16 +0000 (11:08 -0700)]
BACKPORT: sched/sysctl: Fix attributes of some extern declarations

The definition of sysctl_sched_migration_cost, sysctl_sched_nr_migrate
and sysctl_sched_time_avg includes the attribute const_debug. This
attribute is not part of the extern declaration of these variables in
include/linux/sched/sysctl.h, while it is in kernel/sched/sched.h,
and as a result Clang generates warnings like this:

  kernel/sched/sched.h:1618:33: warning: section attribute is specified on redeclared variable [-Wsection]
  extern const_debug unsigned int sysctl_sched_time_avg;
                                ^
  ./include/linux/sched/sysctl.h:42:21: note: previous declaration is here
  extern unsigned int sysctl_sched_time_avg;

The header only declares the variables when CONFIG_SCHED_DEBUG is defined,
therefore it is not necessary to duplicate the definition of const_debug.
Instead we can use the attribute __read_mostly, which is the expansion of
const_debug when CONFIG_SCHED_DEBUG=y is set.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shile Zhang <shile.zhang@nokia.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171030180816.170850-1-mka@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://git.kernel.org/linus/a9903f04e0a4ea522d959c2f287cdf0ab029e324
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoUPSTREAM: scripts/mkcompile_h: Remove trailing spaces from compiler version
Jonathan Liu [Mon, 12 Jun 2017 08:23:17 +0000 (18:23 +1000)]
UPSTREAM: scripts/mkcompile_h: Remove trailing spaces from compiler version

Improves the output of "cat /proc/version" by getting rid of the
trailing space at the end of the compiler version when the kernel
is compiled using GCC.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Link: https://git.kernel.org/linus/adcc3f7cee29eb831f79f4ac7ba6a0fbce7ac936
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agokernel: Add CC_WERROR config to turn warnings into errors
Chris Fries [Wed, 8 Mar 2017 14:08:38 +0000 (08:08 -0600)]
kernel: Add CC_WERROR config to turn warnings into errors

Add configuration option CONFIG_CC_WERROR to prevent warnings
from creeping in.

Signed-off-by: Chris Fries <cfries@google.com>
Link: https://android.googlesource.com/kernel/msm/+/18f26a64a28ad71c1858b768ec710d244e61cfd7
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agoRevert "scripts: gcc-wrapper: Use wrapper to check compiler warnings"
Thierry Strudel [Wed, 19 Oct 2016 19:12:39 +0000 (12:12 -0700)]
Revert "scripts: gcc-wrapper: Use wrapper to check compiler warnings"

This reverts commit cc95d2b6c234982b6b54a0b82e0ca5c5c1361f57.

Change-Id: I40fa79992814f1a24174137f7b95a1e19a86828d
Link: https://android.googlesource.com/kernel/msm/+/0a659ab3a797c3311d0f697e9b443054ace9a4aa
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agodrivers: media: msm: don't use nested functions
Greg Hackmann [Fri, 21 Oct 2016 19:37:49 +0000 (12:37 -0700)]
drivers: media: msm: don't use nested functions

clang doesn't support nested functions, and there's no compelling reason
that these functions need to have such a restricted scope.

Change-Id: I698f7b19de8f6dff46a717403c1f518446748b18
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Link: https://android.googlesource.com/kernel/msm/+/a7812babae94ac48da09e7e967c0b55d24a77994
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: sde: fix unaligned memory read
Sami Tolvanen [Thu, 17 Aug 2017 21:07:29 +0000 (14:07 -0700)]
msm: sde: fix unaligned memory read

Prevent the compiler from combining two 32b writes to 4B-aligned iomem
address, into a single 64b write to a non-8B-aligned iomem address,
where the iomem address is fixed and cannot be realigned.

Prevents a kernel panic
("Unhandled fault: alignment fault (0x96000061)").

Bug: 64527440
Bug: 62093296
Change-Id: I6dafc7427b5c52eb390beebabd5281133889bddc
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://android.googlesource.com/kernel/msm/+/6e1393aa95a31da00a10c6a6f7f66d0fa840aeb6
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agosoc: qcom: access smp2p_smem structure with I/O function
Arun Kumar Neelakantam [Wed, 13 Mar 2019 13:01:20 +0000 (18:31 +0530)]
soc: qcom: access smp2p_smem structure with I/O function

Accessing I/O memory pointers directly cause un-aligned access
when using the clang compiler.

Avoid using direct iomem pointer access instead use I/O functions.

CRs-Fixed: 2410460
Change-Id: I041b10739049de26174e5536bbd142f1deeada3b
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Link: https://source.codeaurora.org/quic/la/kernel/msm-4.9/commit/?id=f797c03b33fae49db9dde7dfe4289aa2efc07e0c
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
4 years agomsm: diag: Update LF markings to be on same line
Amandeep Singh [Fri, 13 Sep 2019 07:49:38 +0000 (13:19 +0530)]
msm: diag: Update LF markings to be on same line

Change-Id: Iba238a5dfcddbf486c6877563b41a3ef74d49526
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: Update config to replace the restricted keyword
Amandeep Singh [Fri, 13 Sep 2019 07:22:05 +0000 (12:52 +0530)]
msm: Update config to replace the restricted keyword

Change-Id: I91de5e75c115f755ddc84bd80e5942162120f6cf
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agoMerge "msm: camera: isp: use correct number of entries" into kernel.lnx.4.4.r38-rel
Linux Build Service Account [Wed, 11 Sep 2019 08:56:47 +0000 (01:56 -0700)]
Merge "msm: camera: isp: use correct number of entries" into kernel.lnx.4.4.r38-rel

4 years agoMerge "defconfig: Disable OverlayFS for SDM660 and MSM8998" into kernel.lnx.4.4.r38-rel
Linux Build Service Account [Wed, 11 Sep 2019 08:56:47 +0000 (01:56 -0700)]
Merge "defconfig: Disable OverlayFS for SDM660 and MSM8998" into kernel.lnx.4.4.r38-rel

4 years agoRevert "HID: core: move Usage Page concatenation to Main item"
Rahul Shahare [Mon, 9 Sep 2019 10:55:05 +0000 (16:25 +0530)]
Revert "HID: core: move Usage Page concatenation to Main item"

This reverts commit 5db3c5adf44ad3166472b009b122df5ef1144c9c
[as with the orignal commit change, BTN_GAMEPAD device is not
getting registered, which leads to cts gamepad test failure].

Change-Id: I0fcfe4f3198a6c0f887697d6825170fe674bc9ab
Signed-off-by: Rahul Shahare <rshaha@codeaurora.org>
4 years agodefconfig: Disable OverlayFS for SDM660 and MSM8998
Rahul Shahare [Wed, 4 Sep 2019 04:46:48 +0000 (10:16 +0530)]
defconfig: Disable OverlayFS for SDM660 and MSM8998

OverlayFS should be enabled only for new launch target,
so disabled it for OTA target i.e. sdm660 & msm8998.

Change-Id: Ib1f3cadd888d345bd58a945996f887e0831ea6e0
Signed-off-by: Rahul Shahare <rshaha@codeaurora.org>
4 years agomsm: camera: isp: use correct number of entries
Srikanth Uyyala [Fri, 16 Mar 2018 11:40:30 +0000 (17:10 +0530)]
msm: camera: isp: use correct number of entries

use ds number entries for ds reg settings

Change-Id: I885b1399590d04c056c0db40c1862db5b764db9f
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
4 years agoMerge 9c59fb632e3585fe24af1eb2420bafc5884c010d on remote branch
Linux Build Service Account [Tue, 10 Sep 2019 05:46:52 +0000 (22:46 -0700)]
Merge 9c59fb632e3585fe24af1eb2420bafc5884c010d on remote branch

Change-Id: I976bf04f83cc72048f5584ca0980c1bed83c54de

4 years agoMerge "defconfig: msm8996: enable Inline Crypto Module for eMMC"
Linux Build Service Account [Fri, 6 Sep 2019 23:02:02 +0000 (16:02 -0700)]
Merge "defconfig: msm8996: enable Inline Crypto Module for eMMC"

4 years agoMerge "scsi: ufs: Fix race condition in rls_work and ufshcd_resume"
Linux Build Service Account [Fri, 6 Sep 2019 14:36:59 +0000 (07:36 -0700)]
Merge "scsi: ufs: Fix race condition in rls_work and ufshcd_resume"

4 years agoMerge "msm: qcn: Release interrupt during driver teardown"
Linux Build Service Account [Fri, 6 Sep 2019 14:36:47 +0000 (07:36 -0700)]
Merge "msm: qcn: Release interrupt during driver teardown"

4 years agoMerge "msm: camera: isp: use correct number of entries"
Linux Build Service Account [Fri, 6 Sep 2019 14:36:45 +0000 (07:36 -0700)]
Merge "msm: camera: isp: use correct number of entries"

4 years agoMerge "mmc: core: Return SD card status if sdr104_wa is not present"
Linux Build Service Account [Fri, 6 Sep 2019 14:36:43 +0000 (07:36 -0700)]
Merge "mmc: core: Return SD card status if sdr104_wa is not present"

4 years agoMerge changes into msm-4.4
Gerrit - the friendly Code Review server [Fri, 6 Sep 2019 14:31:49 +0000 (07:31 -0700)]
Merge changes  into msm-4.4

4 years agoMerge "i2c-msm-v2: Add NULL pointer check on i2c messages"
Linux Build Service Account [Fri, 6 Sep 2019 06:59:03 +0000 (23:59 -0700)]
Merge "i2c-msm-v2: Add NULL pointer check on i2c messages"

4 years agoMerge "ANDROID: cpufreq: times: add /proc/uid_concurrent_{active,policy}_time"
Linux Build Service Account [Fri, 6 Sep 2019 06:59:02 +0000 (23:59 -0700)]
Merge "ANDROID: cpufreq: times: add /proc/uid_concurrent_{active,policy}_time"

4 years agodefconfig: msm8996: enable Inline Crypto Module for eMMC
Phanindra Babu Pabba [Wed, 4 Sep 2019 08:43:33 +0000 (14:13 +0530)]
defconfig: msm8996: enable Inline Crypto Module for eMMC

Enable ICE driver for eMMC storage encryption

Change-Id: Ie6e342728441f3e091f4630c12cf04517a87ae23
Signed-off-by: Phanindra Babu Pabba <pabba@codeaurora.org>
4 years agoi2c-msm-v2: Add NULL pointer check on i2c messages
Vipin Deep Kaur [Mon, 5 Aug 2019 06:45:36 +0000 (12:15 +0530)]
i2c-msm-v2: Add NULL pointer check on i2c messages

Add check in i2c driver to ensure the client passes valid messages
for i2c transfer.

Change-Id: I75ceee649d387e4324155c01d0c1e8a40342dff5
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
4 years agoMerge "Merge android-4.4.190 (ac7fbca) into msm-4.4"
Linux Build Service Account [Thu, 5 Sep 2019 20:11:06 +0000 (13:11 -0700)]
Merge "Merge android-4.4.190 (ac7fbca) into msm-4.4"

4 years agomsm: qcn: Release interrupt during driver teardown
Amandeep Singh [Tue, 3 Sep 2019 09:46:32 +0000 (15:16 +0530)]
msm: qcn: Release interrupt during driver teardown

Release interrupt synchronously on driver teardown such as during
re-enumeration, manual rmmod and device power down.

Change-Id: I8a2f97266513001ed9a6c08b8ca865c9ffac9065
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agoMerge "ASoC: qdsp6v2: increase RTAC_MAX_ACTIVE_DEVICES to 6"
Linux Build Service Account [Wed, 4 Sep 2019 20:12:52 +0000 (13:12 -0700)]
Merge "ASoC: qdsp6v2: increase RTAC_MAX_ACTIVE_DEVICES to 6"

4 years agoscsi: ufs: Fix race condition in rls_work and ufshcd_resume
Sayali Lokhande [Tue, 12 Jun 2018 10:45:02 +0000 (16:15 +0530)]
scsi: ufs: Fix race condition in rls_work and ufshcd_resume

In some rare scenario, race condition is observed between
rls_work handler and ufshcd_resume operation.
Sequence of events:
1.rls_work is scheduled due to UIC error.
2.ufshcd_rls_handler sets host_self_blocked to 1 and then
invokes pm_runtime_get_sync
3. pm_runtime_get_sync is not yet completed because
runtime_status was RPM_RESUMING.
4.pm_runtime_work schedules at almost same time of rls_work.

Here ufshcd_resume schedules out as host_self_blocked
was set to 1 by rls_work.

Call stacks:

-006|wait_for_completion_io(?)
-007|blk_execute_rq()
-008|scsi_execute()
-009|scsi_execute_req_flags()
-010|ufshcd_set_dev_pwr_mode()
-011|ufshcd_resume()
-012|ufshcd_runtime_resume(hba)
-013|ufshcd_pltfrm_runtime_resume(?)
-014|pm_generic_runtime_resume(?)
-015|__rpm_callback(inline)

-003|schedule()
-004|spin_lock_irq(inline)
-004|rpm_resume()
-005|__pm_runtime_resume()
-006|ufshcd_rls_handler()

Fix this by calling pm_runtime_get_sync before setting
host_self_blocked to 1 during rls_work.

Change-Id: I69f23c169ac8a9eb59062b461302f5521cd57ebc
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
4 years agoMerge "msm: qcn: Add QCN SDIO core driver directory in Kconfig"
Linux Build Service Account [Wed, 4 Sep 2019 06:21:36 +0000 (23:21 -0700)]
Merge "msm: qcn: Add QCN SDIO core driver directory in Kconfig"

4 years agoMerge "msm: qcn: Fix type casting of channel descriptor"
Linux Build Service Account [Wed, 4 Sep 2019 06:21:35 +0000 (23:21 -0700)]
Merge "msm: qcn: Fix type casting of channel descriptor"

4 years agoMerge "msm: qcn: Synchronize card state change API"
Linux Build Service Account [Wed, 4 Sep 2019 06:21:34 +0000 (23:21 -0700)]
Merge "msm: qcn: Synchronize card state change API"

4 years agoMerge "msm: Add ipc router config in Makefile and Kconfig"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:24 +0000 (14:02 -0700)]
Merge "msm: Add ipc router config in Makefile and Kconfig"

4 years agoMerge "mmc: sdhci-msm: Ping with known good phase"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:23 +0000 (14:02 -0700)]
Merge "mmc: sdhci-msm: Ping with known good phase"

4 years agoMerge "soc: qcom: Update ipc router sdio transport plugin"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:22 +0000 (14:02 -0700)]
Merge "soc: qcom: Update ipc router sdio transport plugin"

4 years agoMerge "msm: diag: Add SDIO transport in diag"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:20 +0000 (14:02 -0700)]
Merge "msm: diag: Add SDIO transport in diag"

4 years agoMerge "diag: Add diag over sdio support"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:19 +0000 (14:02 -0700)]
Merge "diag: Add diag over sdio support"

4 years agoMerge "Revert "msm: camera_v2: CPP AXI reset at close""
Linux Build Service Account [Tue, 3 Sep 2019 21:02:18 +0000 (14:02 -0700)]
Merge "Revert "msm: camera_v2: CPP AXI reset at close""

4 years agoMerge "qseecom: check invalid handle for app loaded query request"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:17 +0000 (14:02 -0700)]
Merge "qseecom: check invalid handle for app loaded query request"

4 years agoMerge "Asoc: apr: Fix sound card failure at stability runs"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:15 +0000 (14:02 -0700)]
Merge "Asoc: apr: Fix sound card failure at stability runs"

4 years agoMerge "asoc: codecs: Fix LPASS register access during bootup"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:14 +0000 (14:02 -0700)]
Merge "asoc: codecs: Fix LPASS register access during bootup"

4 years agoMerge "diag: dci: Prevent using uninitialized variables"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:13 +0000 (14:02 -0700)]
Merge "diag: dci: Prevent using uninitialized variables"

4 years agoMerge "ks_bridge: Kill anchored urbs in release callback"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:12 +0000 (14:02 -0700)]
Merge "ks_bridge: Kill anchored urbs in release callback"

4 years agoMerge "msm: ipa3: Fix to memory allocation failure"
Linux Build Service Account [Tue, 3 Sep 2019 21:02:10 +0000 (14:02 -0700)]
Merge "msm: ipa3: Fix to memory allocation failure"

4 years agomsm: qcn: Add QCN SDIO core driver directory in Kconfig
Amandeep Singh [Wed, 6 Feb 2019 11:09:42 +0000 (16:39 +0530)]
msm: qcn: Add QCN SDIO core driver directory in Kconfig

Add QCN SDIO core diver directory in parent directory's Kconfig
to enable its compilation.

Change-Id: I176d17040bf4a63d19635272088e0c4053f8a092
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Fix type casting of channel descriptor
Amandeep Singh [Thu, 29 Aug 2019 11:47:36 +0000 (17:17 +0530)]
msm: qcn: Fix type casting of channel descriptor

Fix type casting of channel descriptor to avoid memory access
violations during the descriptor usage.

Change-Id: I3d73bf327fd796f482e492265d18d3417f21dc9a
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Synchronize card state change API
Amandeep Singh [Tue, 27 Aug 2019 07:42:12 +0000 (13:12 +0530)]
msm: qcn: Synchronize card state change API

Update card state change API to synchronize multiple invocation
of the same API from different drivers.

Change-Id: I03c18a9540bdb64fa462262faa9cabe158e9e199
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: Add ipc router config in Makefile and Kconfig
Amandeep Singh [Tue, 7 May 2019 06:30:28 +0000 (12:00 +0530)]
msm: Add ipc router config in Makefile and Kconfig

Add ipc router sdio plugin config in Makefile and Kconfig
to enable it for compilation.

Change-Id: If3bc8e812240bd86f2ef3bc63452edcdf69deac6
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Disable logs to console after reporting error
Amandeep Singh [Fri, 23 Aug 2019 10:04:28 +0000 (15:34 +0530)]
msm: qcn: Disable logs to console after reporting error

Disable logs to console after reporting error only once,to stop
excessive prints on console whcich causes watchdog bite due to
console lock up.

Change-Id: I26d9f3f258e0428c059440369c88691b2d523bba
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agoqti_sdio_client: Free rx DMA buffers after use
Amandeep Singh [Tue, 27 Aug 2019 05:30:56 +0000 (11:00 +0530)]
qti_sdio_client: Free rx DMA buffers after use

Free rx DMA buffere after the data is read from the buffer.

Change-Id: I2b8f97beb50b4752674fc8b4034feb84d2a36302
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Add driver state information param
Amandeep Singh [Mon, 12 Aug 2019 08:18:15 +0000 (13:48 +0530)]
msm: qcn: Add driver state information param

Add driver state information param to view from the user space.

Change-Id: I2d4cd86ae5d67ac948a93d28e24ea96394343513
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Disable retuning in function 1 driver
Amandeep Singh [Wed, 7 Aug 2019 10:26:33 +0000 (15:56 +0530)]
msm: qcn: Disable retuning in function 1 driver

Disable retuning in function 1 driver by default. Created a sysfs
entry to enable it if needed.

Change-Id: I29b5ea4a8e0f1614b10226edb21c6cbeb7a327cd
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Detect and switch host to RDDM
Amandeep Singh [Tue, 6 Aug 2019 09:54:57 +0000 (15:24 +0530)]
msm: qcn: Detect and switch host to RDDM

Switch driver operating mode to RDDM when target device switches to RDDM.

Change-Id: I501672f4965e57e59f5a272e35534e66c63b67c1
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agommc: sdhci-msm: Ping with known good phase
Amandeep Singh [Wed, 24 Jul 2019 06:16:12 +0000 (11:46 +0530)]
mmc: sdhci-msm: Ping with known good phase

Ping with known good phase if last phase of tuning fails.

Change-Id: I3d8d8ce3d8a4dc00146668b815b69619d3a4cea8
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agoqti_sdio_client: Drop read write request during removal
Amandeep Singh [Wed, 24 Jul 2019 06:06:25 +0000 (11:36 +0530)]
qti_sdio_client: Drop read write request during removal

Update read write API to drop further messages during transport or
interface removal.

Change-Id: Ied43de8aa7cef1c36c9c520976357ba1e63017db
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Add dynamic add and remove of SDIO card
Amandeep Singh [Wed, 24 Jul 2019 06:00:29 +0000 (11:30 +0530)]
msm: qcn: Add dynamic add and remove of SDIO card

Add API to dynamically add and remove the SDIO card on demand.

Change-Id: I946115880da75804a6636616d9cf7cfb4a682b92
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Enable QCN SDIO core driver for compilation
Amandeep Singh [Fri, 7 Jun 2019 10:37:58 +0000 (16:07 +0530)]
msm: qcn: Enable QCN SDIO core driver for compilation

Add QCN SDIO core diver config into Makefile and
Kconfig to enable its compilation.

Change-Id: I19d184c628658175179d9b5c52a3a8bd07dd7999
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Enable QCN SDIO client driver for compilation
Amandeep Singh [Fri, 7 Jun 2019 10:35:07 +0000 (16:05 +0530)]
msm: qcn: Enable QCN SDIO client driver for compilation

Add QCN SDIO client driver config into Makefile and
Kconfig to enable its compilation.

Change-Id: I40ffa1844b2030aca53d0e36f1bee2900a3ea8d4
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agosoc: qcom: Update ipc router sdio transport plugin
Amandeep Singh [Wed, 3 Jul 2019 06:17:52 +0000 (11:47 +0530)]
soc: qcom: Update ipc router sdio transport plugin

Update ipc router sdio plugin initial snapshot to support peripheral
device over sdio transport.

Change-Id: I097ad755b3bd2270cda74738bed409e88dee343c
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agosoc: qcom: Add ipc router plugin for sdio transport
Amandeep Singh [Tue, 4 Jun 2019 06:05:03 +0000 (11:35 +0530)]
soc: qcom: Add ipc router plugin for sdio transport

This snapshot is taken as of msm-4.4 commit dc86ce0faae2 ("soc: qcom:
ipc_rtr_xprt: Add support to set version in transport").

Change-Id: I729d3c910372d2c3c0bbaaae74a42150c9929732
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: diag: Add SDIO transport in diag
Amandeep Singh [Mon, 6 May 2019 10:10:51 +0000 (15:40 +0530)]
msm: diag: Add SDIO transport in diag

Add support for SDIO transport in diag core framework.

Change-Id: Ic3ccfec3acd60b36a96aebb49a5681219a25e643
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agodiag: Update diag over sdio snapshot
Amandeep Singh [Wed, 3 Jul 2019 07:17:41 +0000 (12:47 +0530)]
diag: Update diag over sdio snapshot

Update code to support diag for peripheral devices over sdio bus.

Change-Id: I14678f301f94b239b61c4c94d3c0ff65204e739e
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agodiag: Add diag over sdio support
Amandeep Singh [Fri, 31 May 2019 08:57:11 +0000 (14:27 +0530)]
diag: Add diag over sdio support

This commit is taken as of msm-4.4 commit f185067e3685 ("diag: Fix
HSIC read complete work function").

Change-Id: I629fe0d9ed697fb20fd9263ecea6009157181e63
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Update completion sequence during tx
Amandeep Singh [Tue, 25 Jun 2019 06:34:34 +0000 (12:04 +0530)]
msm: qcn: Update completion sequence during tx

Update the completion variable sequence to avoid multiple complete
call on a stale staack completion variable.

Change-Id: I582777431918c359cd10e4e072f33589dc600e62
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Add QCN bridge client driver
Amandeep Singh [Fri, 7 Jun 2019 06:35:28 +0000 (12:05 +0530)]
msm: qcn: Add QCN bridge client driver

Add QCN bridge client driver to provide interface to QCN SDIO
core function-1 driver. This driver currently provides interfacing
for diag, IPC router and sahara application.

Change-Id: Ie992aec91347bb68e46a01ee6f67a1d07ce40ecc
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Synchronize clients operating at different modes
Amandeep Singh [Mon, 24 Jun 2019 09:21:08 +0000 (14:51 +0530)]
msm: qcn: Synchronize clients operating at different modes

Add synchronization support between clients that operate on different
modes, i.e. synchronous or asynchronous. The synchronous client will
momentarily switch to asynchronous if any asynchronous transmission is
scheduled.

Change-Id: I41aec9bff950d2816a9ce55017e118e8504be77a
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Reserve 8 bufferes in RW queue for RX
Amandeep Singh [Mon, 24 Jun 2019 08:54:19 +0000 (14:24 +0530)]
msm: qcn: Reserve 8 bufferes in RW queue for RX

The current QCN core driver support four concurrent clients,
and there can be only two CRQ's that can be raised per client
from device.
Reserve 8 bufferes for data reception from device to host.

Change-Id: Iac72b5dd51988ffd1139bf55ecb9799bded77710
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Increase RW queue size
Amandeep Singh [Mon, 24 Jun 2019 08:44:07 +0000 (14:14 +0530)]
msm: qcn: Increase RW queue size

Increase RW queue size to compensate higer data transfer from host
to device, when device is operating at lower frequencies.

Change-Id: I443aead06c757cde40ee99ea2c29a5f323249b8b
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: qcn: Update read/write APIs
Amandeep Singh [Mon, 24 Jun 2019 08:24:00 +0000 (13:54 +0530)]
msm: qcn: Update read/write APIs

Update read/write API in QCN sdio core driver to issue CMD53
instead of CMD52 for data equal or greater than 4 bytes.

Change-Id: I5641f32fa8896d3fafb087b440ff69ad936a83ee
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agomsm: Add QCN SDIO core driver
Amandeep Singh [Thu, 6 Jun 2019 05:53:42 +0000 (11:23 +0530)]
msm: Add QCN SDIO core driver

Add QCN SDIO core driver as function-1 driver to provide streamlined
communication for peripheral device connected over sdio.

Change-Id: Ia8aec77807b59d3e1476b0a12ee7016809335b39
Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
4 years agoMerge "Merge android-4.4.189 (74c8219) into msm-4.4"
Linux Build Service Account [Tue, 3 Sep 2019 04:56:44 +0000 (21:56 -0700)]
Merge "Merge android-4.4.189 (74c8219) into msm-4.4"

4 years agoMerge "Merge android-4.4.188 (886d085) into msm-4.4"
Linux Build Service Account [Tue, 3 Sep 2019 04:56:43 +0000 (21:56 -0700)]
Merge "Merge android-4.4.188 (886d085) into msm-4.4"

4 years agoqseecom: check invalid handle for app loaded query request
Zhen Kong [Tue, 27 Aug 2019 21:02:35 +0000 (14:02 -0700)]
qseecom: check invalid handle for app loaded query request

Check if the handle data type received from userspace is valid
for app loaded query request to avoid the offset boundary check
for qseecom_send_modfd_resp is bypassed.

Change-Id: I5f3611a8f830d6904213781c5ba70cfc0ba3e2e0
Signed-off-by: Zhen Kong <zkong@codeaurora.org>