OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
7 years agommc: core: Increase the runtime PM reference count in try_claim_host
Veerabhadrarao Badiganti [Tue, 4 Apr 2017 07:08:24 +0000 (12:38 +0530)]
mmc: core: Increase the runtime PM reference count in try_claim_host

Runtime PM reference count is being increased in mmc_claim_host() and
is decreased in mmc_release_host(). This reference count is kept
during the complete cycle of a claim -> release host.

Same need to be done even in mmc_try_claim_host() as well. Increase
the runtime PM reference count by invoking pm_runtime_get_sync() from
mmc_try_claim_host() upon first successful claim.

Without this change the runtime PM reference count goes for a toss
since count is not getting incremented in mmc_try_claim_host() but is
getting decremented in mmc_release_host().

Change-Id: I77836875b4700a4bf3dbde2bf1abdf2ad36c4cac
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
7 years agoMerge "block: Move bdi_unregister() to del_gendisk()"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:50 +0000 (06:24 -0700)]
Merge "block: Move bdi_unregister() to del_gendisk()"

7 years agoMerge "icnss: Send FW CRASHED uevent only if driver is probed"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:48 +0000 (06:24 -0700)]
Merge "icnss: Send FW CRASHED uevent only if driver is probed"

7 years agoMerge "msm_11ad: copy FW crash dump before starting SSR flow"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:47 +0000 (06:24 -0700)]
Merge "msm_11ad: copy FW crash dump before starting SSR flow"

7 years agoMerge "scsi: ufs: Abort gating if clock on request is pending"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:46 +0000 (06:24 -0700)]
Merge "scsi: ufs: Abort gating if clock on request is pending"

7 years agoMerge "regulator: qpnp-lcdb: Add a WA to toggle SC before module_enable"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:45 +0000 (06:24 -0700)]
Merge "regulator: qpnp-lcdb: Add a WA to toggle SC before module_enable"

7 years agoMerge "Revert "input: synaptics_dsx: remove array declaration in write function""
Linux Build Service Account [Mon, 3 Apr 2017 13:24:44 +0000 (06:24 -0700)]
Merge "Revert "input: synaptics_dsx: remove array declaration in write function""

7 years agoMerge "ARM: dts: msm: Update KTM boot mitigation config for msm8996pro"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:43 +0000 (06:24 -0700)]
Merge "ARM: dts: msm: Update KTM boot mitigation config for msm8996pro"

7 years agoMerge "msm: mdss: fix validation checks for qseed3 params"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:43 +0000 (06:24 -0700)]
Merge "msm: mdss: fix validation checks for qseed3 params"

7 years agoMerge "msm: mdss: configure gpio to enable backlight"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:42 +0000 (06:24 -0700)]
Merge "msm: mdss: configure gpio to enable backlight"

7 years agoMerge "msm: mdss: Add support to read BL level for userspace"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:41 +0000 (06:24 -0700)]
Merge "msm: mdss: Add support to read BL level for userspace"

7 years agoMerge "input: touchscreen: remove synaptics v2.6 touch driver"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:40 +0000 (06:24 -0700)]
Merge "input: touchscreen: remove synaptics v2.6 touch driver"

7 years agoMerge "icnss: pre-alloc memory leak check on probe failure and remove"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:39 +0000 (06:24 -0700)]
Merge "icnss: pre-alloc memory leak check on probe failure and remove"

7 years agoMerge "msm: camera: isp: Use single tasklet for dual vfe"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:38 +0000 (06:24 -0700)]
Merge "msm: camera: isp: Use single tasklet for dual vfe"

7 years agoMerge "msm: camera: isp: Set the clock rate for camss vfe clock"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:37 +0000 (06:24 -0700)]
Merge "msm: camera: isp: Set the clock rate for camss vfe clock"

7 years agoMerge "msm: isp: fix bug in cfg_camif"
Linux Build Service Account [Mon, 3 Apr 2017 13:24:36 +0000 (06:24 -0700)]
Merge "msm: isp: fix bug in cfg_camif"

7 years agoblock: Move bdi_unregister() to del_gendisk()
Jan Kara [Wed, 8 Feb 2017 07:05:56 +0000 (08:05 +0100)]
block: Move bdi_unregister() to del_gendisk()

Commit 6cd18e711dd8 "block: destroy bdi before blockdev is
unregistered." moved bdi unregistration (at that time through
bdi_destroy()) from blk_release_queue() to blk_cleanup_queue() because
it needs to happen before blk_unregister_region() call in del_gendisk()
for MD. SCSI though will free up the device number from sd_remove()
called through a maze of callbacks from device_del() in
__scsi_remove_device() before blk_cleanup_queue() and thus similar races
as described in 6cd18e711dd8 can happen for SCSI as well as reported by
Omar [1].

Moving bdi_unregister() to del_gendisk() works for MD and fixes the
problem for SCSI since del_gendisk() gets called from sd_remove() before
freeing the device number.

This also makes device_add_disk() (calling bdi_register_owner()) more
symmetric with del_gendisk().

[1] http://marc.info/?l=linux-block&m=148554717109098&w=2

Tested-by: Lekshmi Pillai <lekshmicpillai@in.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Git-commit: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Change-Id: I006db1a645adffb79d6b2f46f5ccc94fa21dfd0a
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
7 years agoicnss: Send FW CRASHED uevent only if driver is probed
Anurag Chouhan [Fri, 24 Mar 2017 10:35:00 +0000 (16:05 +0530)]
icnss: Send FW CRASHED uevent only if driver is probed

If host driver fails to probed for the first time, and SSR/PDR
get triggered, as part of PD down uevent is sent to host driver
which inturn set recovery in progress which never gets reset
and the next time on FW Ready host driver is not able
to probe successfully
To fix this add a check if driver is probed or not
before sending the uevent.

Change-Id: Idceab059821c0b0e2a8806ad9fee5b6c75aec8c7
CRs-fixed: 2027920
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
7 years agoicnss: Send FW Down indication to WLAN host driver
Anurag Chouhan [Tue, 21 Mar 2017 13:46:53 +0000 (19:16 +0530)]
icnss: Send FW Down indication to WLAN host driver

If FW is down irrespective of crash, a uevent
is sent to wlan host driver to indicate FW is down.

Change-Id: I9fe2a2a11178f72ea27150d74d93a1e411eac030
CRs-fixed: 2027902
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
7 years agoRevert "input: synaptics_dsx: remove array declaration in write function"
Shantanu Jain [Fri, 31 Mar 2017 10:52:56 +0000 (03:52 -0700)]
Revert "input: synaptics_dsx: remove array declaration in write function"

This reverts commit bcde95e2e697 ("input: synaptics_dsx: remove array
declaration in write function").

Change-Id: I49d05213a473d35bd6ab7fb4149f69ec56f18a8b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
7 years agoMerge "drivers: cpuidle: Minimize round off errors in wake up time"
Linux Build Service Account [Mon, 3 Apr 2017 05:02:29 +0000 (22:02 -0700)]
Merge "drivers: cpuidle: Minimize round off errors in wake up time"

7 years agoscsi: ufs: Abort gating if clock on request is pending
Asutosh Das [Thu, 23 Mar 2017 09:31:56 +0000 (15:01 +0530)]
scsi: ufs: Abort gating if clock on request is pending

This change attempts to abort gating of clocks if a
request to turn-on clocks is pending.
This would in turn avoid turning OFF and back ON the
clocks.

CRs-fixed: 2002742
Change-Id: I3d80ed503d4ddb29ac613b11e5e93f84c8362978
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
7 years agoMerge "ANDROID: ion: check for kref overflow"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:37 +0000 (21:24 -0700)]
Merge "ANDROID: ion: check for kref overflow"

7 years agoMerge "qcom: qnovo: Fix PCURx reporting error"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:36 +0000 (21:24 -0700)]
Merge "qcom: qnovo: Fix PCURx reporting error"

7 years agoMerge "drivers: net: rmnet: Initial implementation"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:35 +0000 (21:24 -0700)]
Merge "drivers: net: rmnet: Initial implementation"

7 years agoMerge "msm: mdss: re-configure DP mainlink clocks during link training"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:34 +0000 (21:24 -0700)]
Merge "msm: mdss: re-configure DP mainlink clocks during link training"

7 years agoMerge "ARM: dts: msm: add sde rotator reg bus scale properties"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:33 +0000 (21:24 -0700)]
Merge "ARM: dts: msm: add sde rotator reg bus scale properties"

7 years agoMerge "sde: rotator: add support to configure bus scale vectors"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:32 +0000 (21:24 -0700)]
Merge "sde: rotator: add support to configure bus scale vectors"

7 years agoMerge "msm: mdss: Update write gather register value for MDSS"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:30 +0000 (21:24 -0700)]
Merge "msm: mdss: Update write gather register value for MDSS"

7 years agoMerge "ARM: dts: msm: update vote on ldo11 for amoled panel on sdm630"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:29 +0000 (21:24 -0700)]
Merge "ARM: dts: msm: update vote on ldo11 for amoled panel on sdm630"

7 years agoMerge "msm: mdss: make hpd call asynchronous for HDMI in certain cases"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:28 +0000 (21:24 -0700)]
Merge "msm: mdss: make hpd call asynchronous for HDMI in certain cases"

7 years agoMerge "msm: mdss: dp: set failsafe link params when DPCD read fails"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:27 +0000 (21:24 -0700)]
Merge "msm: mdss: dp: set failsafe link params when DPCD read fails"

7 years agoMerge "trace: ipc_logging: Avoid buffer overflow in ipc_log_string()"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:26 +0000 (21:24 -0700)]
Merge "trace: ipc_logging: Avoid buffer overflow in ipc_log_string()"

7 years agoMerge "msm: pcie: log PCIe LTSSM state during link training"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:26 +0000 (21:24 -0700)]
Merge "msm: pcie: log PCIe LTSSM state during link training"

7 years agoMerge "power: smb-lib: Rerun APSD regardless of charger-type"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:25 +0000 (21:24 -0700)]
Merge "power: smb-lib: Rerun APSD regardless of charger-type"

7 years agoMerge "usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:24 +0000 (21:24 -0700)]
Merge "usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt"

7 years agoMerge "qcom: smb-lib: Disable HW trigger when forcing sink-only mode"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:23 +0000 (21:24 -0700)]
Merge "qcom: smb-lib: Disable HW trigger when forcing sink-only mode"

7 years agoMerge "ARM: dts: msm: Update GFX PM-QoS values for SDM630"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:22 +0000 (21:24 -0700)]
Merge "ARM: dts: msm: Update GFX PM-QoS values for SDM630"

7 years agoMerge "net: ipv6: Add early demux handler for UDP unicast"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:21 +0000 (21:24 -0700)]
Merge "net: ipv6: Add early demux handler for UDP unicast"

7 years agoMerge "drm/msm: Add performance counter tracking"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:21 +0000 (21:24 -0700)]
Merge "drm/msm: Add performance counter tracking"

7 years agoMerge "icnss: Separate debug and verbose log"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:20 +0000 (21:24 -0700)]
Merge "icnss: Separate debug and verbose log"

7 years agoMerge "msm: qpnp-haptic: Enable HW auto-resonance for PM660"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:19 +0000 (21:24 -0700)]
Merge "msm: qpnp-haptic: Enable HW auto-resonance for PM660"

7 years agoMerge "msm_11ad: 11AD SMMU changes to allow enabling of SMMU stage1"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:18 +0000 (21:24 -0700)]
Merge "msm_11ad: 11AD SMMU changes to allow enabling of SMMU stage1"

7 years agoMerge "msm: media: Allocate extra memory after alignment"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:17 +0000 (21:24 -0700)]
Merge "msm: media: Allocate extra memory after alignment"

7 years agoMerge "soc: qcom: spcom: lock ion buf, decrement ref count if no free entry"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:17 +0000 (21:24 -0700)]
Merge "soc: qcom: spcom: lock ion buf, decrement ref count if no free entry"

7 years agoMerge "diag: Add support for header untagging"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:16 +0000 (21:24 -0700)]
Merge "diag: Add support for header untagging"

7 years agoMerge "ASoC: codecs: Correct stream name, add dapm sync"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:15 +0000 (21:24 -0700)]
Merge "ASoC: codecs: Correct stream name, add dapm sync"

7 years agoMerge "drivers: soc: Add mutex lock in audio_notifier_late_init"
Linux Build Service Account [Sat, 1 Apr 2017 04:24:14 +0000 (21:24 -0700)]
Merge "drivers: soc: Add mutex lock in audio_notifier_late_init"

7 years agoregulator: qpnp-lcdb: Add a WA to toggle SC before module_enable
Anirudh Ghayal [Fri, 31 Mar 2017 10:04:05 +0000 (15:34 +0530)]
regulator: qpnp-lcdb: Add a WA to toggle SC before module_enable

There is a possibility of the NCP failing to turn on due
to an invalid (short circuit) SC event before the LCDB module
is enabled.

Force a SC re-enable to recover from this condition. Enable this
for PM660L V1.1.

Also, disable the SC handling logic for PM660L to avoid
permanently disabling the module due to the above mentioned
issue.

CRs-Fixed: 2025449
Change-Id: I191d11c35c3d96727874818b8b57fa1c254879bf
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
7 years agoinclude: qpnp-revid: Add PM660L version info
Anirudh Ghayal [Fri, 31 Mar 2017 10:48:24 +0000 (16:18 +0530)]
include: qpnp-revid: Add PM660L version info

Add PM660L v1.1 version macros.

Change-Id: I14c3f2110efc474686df488748b0a671f34ced90
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
7 years agoANDROID: ion: check for kref overflow
Daniel Rosenberg [Tue, 6 Dec 2016 00:28:28 +0000 (16:28 -0800)]
ANDROID: ion: check for kref overflow

Userspace can cause the kref to handles to increment
arbitrarily high. Ensure it does not overflow.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 31992382
Test: See bug for poc
Change-Id: I6bff1df385742b1d836d43180dc87fadcea80782
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 0c702db4d90de88df11057bcf0d8fb2dfe741605
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
7 years agoqcom: qnovo: Fix PCURx reporting error
Harry Yang [Fri, 31 Mar 2017 21:28:20 +0000 (14:28 -0700)]
qcom: qnovo: Fix PCURx reporting error

PCURx[MSB:LSB] is a 14-bit signed raw data, but treated as two full bytes
during reg reading, as a result bit 14 and 15 are filled with 0s. When
the raw data is negative, the mistreated reading gives positive result.
Hence the eventual PCURx after applying the gain and offset corrections
is incorrect.

Fix it by extending sign bit when negative.

Change-Id: Ia35406809355bd5e2d6cfeb890dd870430e38f66
Signed-off-by: Harry Yang <harryy@codeaurora.org>
7 years agodrivers: net: rmnet: Initial implementation
Subash Abhinov Kasiviswanathan [Mon, 13 Mar 2017 02:40:24 +0000 (20:40 -0600)]
drivers: net: rmnet: Initial implementation

RmNet driver provides a transport agnostic MAP (multiplexing and
aggregation protocol) support in embedded and bridge modes. Module
provides virtual network devices which can be attached to any IP-mode
physical device. This will be used to provide all MAP functionality
on future hardware in a single consistent location.

CRs-Fixed: 2022292
Change-Id: I4dd0f4fcf00bbf9dcbec65cec82436d48a813ecc
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
7 years agoARM: dts: msm: Update KTM boot mitigation config for msm8996pro
Ram Chandrasekar [Tue, 12 Apr 2016 21:56:09 +0000 (15:56 -0600)]
ARM: dts: msm: Update KTM boot mitigation config for msm8996pro

Update the KTM boot mitigation configuration to poll at
50 milliseconds and do frequency mitigation at 80c and
hotplug at 90C for msm8996pro.

CRs-Fixed: 1007266
Change-Id: I8537c5d8fd86d90f607a719c618157f4a2fbfad9
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
7 years agoicnss: pre-alloc memory leak check on probe failure and remove
Hardik Kantilal Patel [Fri, 31 Mar 2017 07:32:47 +0000 (13:02 +0530)]
icnss: pre-alloc memory leak check on probe failure and remove

After wlan host driver probe failure and driver unload check the
memory leak and reset the memory pool.

CRs-Fixed: 2027407
Change-Id: Id6e413416ec7ea1d1bf0e69aab7eccb06de753d7
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
7 years agoinput: touchscreen: remove synaptics v2.6 touch driver
Shantanu Jain [Fri, 17 Mar 2017 14:00:40 +0000 (19:30 +0530)]
input: touchscreen: remove synaptics v2.6 touch driver

Remove synaptics v2.6 touch driver from the kernel code
as it has never been used in any of the recent platforms.

Change-Id: Ibf14dec548a180e517d9b41098af642577c4328b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
7 years agonet: cnss_prealloc: add debugfs entry to check the memory status
Sarada Prasanna Garnayak [Mon, 6 Jun 2016 09:52:49 +0000 (15:22 +0530)]
net: cnss_prealloc: add debugfs entry to check the memory status

This feature adds support to check the pre allocated memory
pool status at runtime. This debugfs entry provide the required
information for wlan host driver memory profiling and adds support
to debug the pre-alloc memory failure issue.

feature:
1. Total amount of pre-alloc memory avail and used in the
   memory pool.
2. Pre-alloc memory status per slots(used/free).

CRs-Fixed: 2027352
Change-Id: I61c51f93dd7462b1fa9c36f6eea3814a6acbdd34
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
7 years agodrivers: cpuidle: Minimize round off errors in wake up time
Maulik Shah [Fri, 24 Mar 2017 13:49:17 +0000 (19:19 +0530)]
drivers: cpuidle: Minimize round off errors in wake up time

Current implementation adds more delay in wake up time programmed
due to round off errors. Minimize round off errors in calculation.

Change-Id: Iddb19c6dae79c999de9fae444f0c64aac0500f42
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
7 years agoARM: dts: msm: Update GFX PM-QoS values for SDM630
Deepak Kumar [Fri, 24 Mar 2017 11:58:58 +0000 (17:28 +0530)]
ARM: dts: msm: Update GFX PM-QoS values for SDM630

Update GFX PM-QoS entries according to the measured
LPM latencies for SDM630 to prevent l2-pc.

Change-Id: I3a59a26bf19d79393c4b45c8a3b243897f3f6eb2
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
7 years agopower: smb-lib: Rerun APSD regardless of charger-type
Anirudh Ghayal [Mon, 27 Mar 2017 10:49:20 +0000 (16:19 +0530)]
power: smb-lib: Rerun APSD regardless of charger-type

It is observed that the USB_PHY may interfere with APSD
when the charger is inserted at PON. This may lead to
incorrect charger type detection.

Fix this by doing a APSD re-run during driver initialization
if USB is present and regardless of the charger type.

CRs-Fixed: 2011764
Change-Id: Icc9ee7bacf0eecdb311ca52979758514abca154e
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
7 years agousb: gadget: f_mass_storage: Perform async runtime resume upon set_alt
Mayank Rana [Wed, 15 Mar 2017 23:12:35 +0000 (16:12 -0700)]
usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt

commit 82f29356165b6a584 ("usb: gadget: f_mass_storage: Allow USB LPM
upon ep disable") just increments power usage count by 1 for dwc3 device
in thread handler. Since child count for dwc3 parent remains 0, there is
possibility of dwc3 parent going into suspend even if dwc3 power usage
count is set to 1. This causes unclocked register access as mdwc gets
runtime suspended and mass storage thread handler disables the endpoint.
Fix this issue by calling usb_gadget_autopm_get_async() in set_alt which
increments dwc3 power usage count and carry out resume asynchronously.

Change-Id: Iccce928590d8e67e234f0aa371f78eb1e6a326b7
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
7 years agotrace: ipc_logging: Avoid buffer overflow in ipc_log_string()
Jack Pham [Thu, 30 Mar 2017 16:53:53 +0000 (09:53 -0700)]
trace: ipc_logging: Avoid buffer overflow in ipc_log_string()

In ipc_log_string() the return value from vsnprintf(), data_size,
is used to increment ectxt.offset. However, this length could
actually be much larger than that of ectxt.buff itself. This is a
typical mistake of [v]snprintf() usage [1], in that it returns
not the number of characters written but how many characters
*would* have been written regardless of whether it was truncated.
The result is that even though ectxt.buff itself is not overrun,
the incorrect size in ectxt.offset will be later used as the length
parameter when memcpy()'ing to the ipc_log_page's data, overflowing
that memory and beyond. The write_page's write_offset would also
indicate an out-of-bounds (greater than PAGE_SIZE) length.

The fix is simple: use vscnprintf() instead of vsnprintf().

[1] https://lwn.net/Articles/69419/

Change-Id: I2e9d44e74f5f30a009732e31a554d82e31946999
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agoMerge "drm/msm: Remove ringbuffer restriction from idle"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:40 +0000 (15:31 -0700)]
Merge "drm/msm: Remove ringbuffer restriction from idle"

7 years agoMerge "drm/msm: Update registers for performance counters"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:39 +0000 (15:31 -0700)]
Merge "drm/msm: Update registers for performance counters"

7 years agoMerge "ARM: dts: msm: Update QoS priority for pimem bus master for sdm660"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:38 +0000 (15:31 -0700)]
Merge "ARM: dts: msm: Update QoS priority for pimem bus master for sdm660"

7 years agoMerge "msm_serial_hs: Change GPIO config sequence during runtime resume/suspend"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:38 +0000 (15:31 -0700)]
Merge "msm_serial_hs: Change GPIO config sequence during runtime resume/suspend"

7 years agoMerge "msm: sde: Protect concurrent access to resources in SDE rotator"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:35 +0000 (15:31 -0700)]
Merge "msm: sde: Protect concurrent access to resources in SDE rotator"

7 years agoMerge "msm-4.4: driver to create cld80211 nl family at bootup time"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:34 +0000 (15:31 -0700)]
Merge "msm-4.4: driver to create cld80211 nl family at bootup time"

7 years agoMerge "wil6210: do not start regular scan on stopped p2p device"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:33 +0000 (15:31 -0700)]
Merge "wil6210: do not start regular scan on stopped p2p device"

7 years agoMerge "msm: ipa: Fix to reset the sticky_rear flag"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:32 +0000 (15:31 -0700)]
Merge "msm: ipa: Fix to reset the sticky_rear flag"

7 years agoMerge "usb: gadget: mtp: reset string descriptor's index with unbind"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:29 +0000 (15:31 -0700)]
Merge "usb: gadget: mtp: reset string descriptor's index with unbind"

7 years agoMerge "esoc: Fix user space corruption due to wrong data type"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:28 +0000 (15:31 -0700)]
Merge "esoc: Fix user space corruption due to wrong data type"

7 years agoMerge "qseecom: fix macro QSEECOM_ALIGN definition issue"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:27 +0000 (15:31 -0700)]
Merge "qseecom: fix macro QSEECOM_ALIGN definition issue"

7 years agoMerge "qcom: qnovo: Disable ok_to_qnovo right after charging stops"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:26 +0000 (15:31 -0700)]
Merge "qcom: qnovo: Disable ok_to_qnovo right after charging stops"

7 years agoMerge "qcom: smb138x-charger: support two usb input properties"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:24 +0000 (15:31 -0700)]
Merge "qcom: smb138x-charger: support two usb input properties"

7 years agoMerge "qcom: smblib: supsend USB input during boost"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:23 +0000 (15:31 -0700)]
Merge "qcom: smblib: supsend USB input during boost"

7 years agoMerge "ARM: dts: msm: Specify smb138x vbus regulator for USBIN-USBIN"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:22 +0000 (15:31 -0700)]
Merge "ARM: dts: msm: Specify smb138x vbus regulator for USBIN-USBIN"

7 years agoMerge "msm: hdmi: edid: fix parsing of 4K resolution from DTD"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:21 +0000 (15:31 -0700)]
Merge "msm: hdmi: edid: fix parsing of 4K resolution from DTD"

7 years agoMerge "ARM: dts: msm: Correct primary camera mount angle on SDM660"
Linux Build Service Account [Thu, 30 Mar 2017 22:31:20 +0000 (15:31 -0700)]
Merge "ARM: dts: msm: Correct primary camera mount angle on SDM660"

7 years agoqcom: smb-lib: Disable HW trigger when forcing sink-only mode
Jack Pham [Thu, 30 Mar 2017 01:59:37 +0000 (18:59 -0700)]
qcom: smb-lib: Disable HW trigger when forcing sink-only mode

Due to an existing HW workaround, the UFP_EN_CMD bit may end up
getting cleared even after having been set. The result of this
is the Type-C state machine returns to DRP behavior despite SW
intention to force sink mode, such as PR Swap or Try.SNK.

Temporarily disable this particular HW trigger whenever the
typec_power_role property is getting set to sink-only mode, and
restore it when leaving sink mode.

Change-Id: I21e840bfeee3ad88b0562645378b1fea200e3803
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
7 years agomsm: camera: isp: Set the clock rate for camss vfe clock
Alok Kediya [Thu, 2 Mar 2017 23:43:06 +0000 (15:43 -0800)]
msm: camera: isp: Set the clock rate for camss vfe clock

Make sure rate for camss vfe clock is set before enabling it.
Also, reuse existing variables for the vfe src clk.

CRs-Fixed: 2013802
Change-Id: Ic4acd4c8330b9300ea6bb84eb99a120453841f7a
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
7 years agomsm_11ad: copy FW crash dump before starting SSR flow
Lior David [Thu, 30 Mar 2017 14:22:57 +0000 (17:22 +0300)]
msm_11ad: copy FW crash dump before starting SSR flow

Currently when WIGIG FW crashes and SSR is in SYSTEM mode,
SSR causes a kernel panic and its panic handler will call
msm_11ad_ssr_crash_shutdown which will copy the FW crash
dump. However this is done when kernel panic is in progress
and kernel is not fully operational, so sometimes the copy
fails and the FW crash dump will not be found in the DDR
dump from the device.
Fix this problem by copying the FW crash dump before
notifying SSR, so the crash dump will always be copied
correctly when WIGIG FW crashes.
We also keep copying in crash_shutdown so the WIGIG FW
crash dump will be available also after normal kernel
panics, though it is not always copied in this case.

Change-Id: Idabb1497d8a1f60a74191f1c93ec5b2ce3b3043c
Signed-off-by: Lior David <liord@codeaurora.org>
7 years agoMerge "soc: qcom: fix to avoid multiple memory allocations"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:58 +0000 (07:20 -0700)]
Merge "soc: qcom: fix to avoid multiple memory allocations"

7 years agoMerge "input: touchpanel: Add ST Touchscreen version 4.1.0 driver"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:53 +0000 (07:20 -0700)]
Merge "input: touchpanel: Add ST Touchscreen version 4.1.0 driver"

7 years agoMerge "mmc: host: sdhci-msm: Skip reading GENERICS register in check_pwr_status"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:49 +0000 (07:20 -0700)]
Merge "mmc: host: sdhci-msm: Skip reading GENERICS register in check_pwr_status"

7 years agoMerge "wil6210: fix memory access violation in wil_memcpy_from/toio_32"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:46 +0000 (07:20 -0700)]
Merge "wil6210: fix memory access violation in wil_memcpy_from/toio_32"

7 years agoMerge "fs: fat: ratelimit the IO errors"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:43 +0000 (07:20 -0700)]
Merge "fs: fat: ratelimit the IO errors"

7 years agoMerge "power: qpnp-fg-gen3: Whitelist the values in profile integrity word"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:37 +0000 (07:20 -0700)]
Merge "power: qpnp-fg-gen3: Whitelist the values in profile integrity word"

7 years agoMerge "diag: Fix race condition while accessing mdlog session info"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:35 +0000 (07:20 -0700)]
Merge "diag: Fix race condition while accessing mdlog session info"

7 years agoMerge "soc: qcom: glink_ssr: Add kref for cb_data"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:31 +0000 (07:20 -0700)]
Merge "soc: qcom: glink_ssr: Add kref for cb_data"

7 years agoMerge "msm: pcie: add sysfs entry for PCIe enumeration"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:28 +0000 (07:20 -0700)]
Merge "msm: pcie: add sysfs entry for PCIe enumeration"

7 years agoMerge "input: touchscreen: synaptics_dsx: Remove fw_update sysfs entries"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:25 +0000 (07:20 -0700)]
Merge "input: touchscreen: synaptics_dsx: Remove fw_update sysfs entries"

7 years agoMerge "mmc: sdhci-msm: Change pm_qos cpu groups latency to PM_QOS_DEFAULT_VALUE"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:22 +0000 (07:20 -0700)]
Merge "mmc: sdhci-msm: Change pm_qos cpu groups latency to PM_QOS_DEFAULT_VALUE"

7 years agoMerge "ARM: dts: msm: enable display for SDM630 PM660A QRD"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:20 +0000 (07:20 -0700)]
Merge "ARM: dts: msm: enable display for SDM630 PM660A QRD"

7 years agoMerge "ASoC: sdm660-cdc: Change val_bits to 8 from 32 in digital cdc regmap"
Linux Build Service Account [Thu, 30 Mar 2017 14:20:17 +0000 (07:20 -0700)]
Merge "ASoC: sdm660-cdc: Change val_bits to 8 from 32 in digital cdc regmap"

7 years agoARM: dts: msm: Update QoS priority for pimem bus master for sdm660
Odelu Kukatla [Thu, 23 Mar 2017 04:43:09 +0000 (10:13 +0530)]
ARM: dts: msm: Update QoS priority for pimem bus master for sdm660

pimem bus master is starving for data from ddr and time out is
observed with QoS priority set to 0, so increase the QoS priority
for pimem bus master to 1.

Change-Id: Ie90d0a41953e03d8cba9843fd8fb4f7dc511a62d
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
7 years agomsm_serial_hs: Change GPIO config sequence during runtime resume/suspend
Mukesh Kumar Savaliya [Sun, 12 Mar 2017 07:19:31 +0000 (12:49 +0530)]
msm_serial_hs: Change GPIO config sequence during runtime resume/suspend

In runtime resume scenarios we first enable the HW resources, clocks and
then set the gpio to UART functionalities. When GPIOS are changing the
state RX line samples as zero resulting in RX Break detection. This stops
data coming from BT SOC sending to the BT host causing failures.

Modify the GPIO config sequence such that GPIO functionalities changed
only when resources like Clocks are OFF.

Change-Id: Iaf3b7c7a66dd83fc631e4a779a804ef98836e00b
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
7 years agoinput: touchpanel: Add ST Touchscreen version 4.1.0 driver
chenx [Tue, 21 Mar 2017 13:11:25 +0000 (21:11 +0800)]
input: touchpanel: Add ST Touchscreen version 4.1.0 driver

This is the reference driver source code for ST
Touchscreen of version 4.1.0. It is used for QVR8998
touchscreen.
(cherry picked from commit 2cd09314337d614e69d0ebd99afb71d99d31b69a)

Signed-off-by: chenx <chenxiang0527@thundersoft.com>
Git-commit: 2cd09314337d614e69d0ebd99afb71d99d31b69a
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-3.10
CRs-Fixed: 1106217
Change-Id: I5c26deaa3943ff300ce9835678bb4a550e40f096
Signed-off-by: Jin Fu <jinf@codeaurora.org>
7 years agomsm: ipa: Fix to reset the sticky_rear flag
Utkarsh Saxena [Tue, 28 Mar 2017 17:21:46 +0000 (22:51 +0530)]
msm: ipa: Fix to reset the sticky_rear flag

When hotspot tethering is toggled quickly
WLAN_AP_CONNECT is received even before all
the filter rules are cleaned up for the previous
DISCONNECT. As the sticky_rear is set, default
rule is not added at the end. Make a change to
reset sticky_rear when default rules are deleted.

Change-Id: I8b63fec360e91ddd5f5267fe74c769547bb5bbfe
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
7 years agowil6210: fix memory access violation in wil_memcpy_from/toio_32
Dedy Lansky [Tue, 28 Mar 2017 18:25:42 +0000 (21:25 +0300)]
wil6210: fix memory access violation in wil_memcpy_from/toio_32

In case count is not multiple of 4, there is a read access in
wil_memcpy_toio_32() from outside src buffer boundary.
In wil_memcpy_fromio_32(), in case count is not multiple of 4, there
is a write access to outside dst io memory boundary.

Fix these issues with proper handling of the last 1 to 4 copied bytes.

Change-Id: Iff7853bc4803a01449ddcee996a54a0dccc1db1a
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>