Commit graph

593784 commits

Author SHA1 Message Date
Mao Jinlong
6f9ae86766 scripts: correct cflags for kasan
Enable address sanitizer flags for kasan by default.

Change-Id: Ib08149a7d1af589fed3ce30659cb495d4bb2fb81
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2017-09-11 05:26:05 -07:00
Liangliang Lu
340cfc6a63 usb: gadget: f_fs: Do not free IPC log buffer when free instance
Currently we allocate IPC log buffer when instance is created,
and free IPC log buffer when instance is freed.

So we can't get IPC log when issue happens after the instance
is freed.

Move IPC log buffer allocate and free to module init and exit.

Change-Id: Ic8b0f6d91c9bbbf2a6a6ed87f96c04475a09b7f3
Signed-off-by: Liangliang Lu <luliang@codeaurora.org>
2017-09-11 19:08:58 +08:00
Vijayavardhan Vennapusa
4fe177ec88 usb_bam: Delete IPA resources in usb_bam_remove()
Whenever dwc3_msm_probe() fails, it calls of_depopulate() to remove child
devices as part of cleanup. Due to this, usb_bam_remove() gets called to
do cleanup. But this API is not deleting IPA resources created during
probe and leads to creation of IPA resources fail, when probe is called
again. This eventually results in crash, when IPA driver calls notify
callback after PROD resource granted. Hence fix it by deleting IPA
resources in usb_bam_remove().

Also change enum type of ipa_rm_resource_prod/ipa_rm_resource_cons arrays
to enum ipa_rm_resource_name to fix sparse errors.

Change-Id: I3d9d0e1b26f1de0ba2b56b42c7e10a097d4fa8be
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-09-11 15:50:21 +05:30
Vatsal Bucha
d3c53d2a43 ASoC: sdm660_cdc: Fix mute if compander is disabled
Compander disable sequence does not get called
after headphone playback on fm. This results in
mute at one channel and low volume at other channel.
Low volume is resolved by setting analog mode to manual
while compander is off.
Also compander clock should be disabled at the end to
resolve mute issue.

CRs-Fixed: 2102126
Change-Id: I68e72f3b333117a8fdf379db30dc24de9bed7270
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-09-11 02:59:08 -07:00
Dhaval Patel
0667b6f916 drm/msm/sde: remove out of bound access for qos lut parsing
QOS LUT dtsi entries use existing hardware parsing APIs
but dos not increase the size of array. This causes out of
bound access while reading u32 lut array entry. This patch
fixes the array size and also adds checks to avoid future
out of bound access. It also fixes the memory leak in
qos lut parsing.

Change-Id: I98de052d03e1bcfd79d15ab99ca41d7782e56682
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-09-11 02:51:15 -07:00
Saranya Chidura
f1084458cc ARM: dts: msm: add dummy SPSS ETM device for msm8998
Add dummy device for SPSS ETM. This device can be used to
configure SPSS ETM trace path.

Change-Id: Idd060ce0de61acab7842103f47c838f4a618d9df
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
2017-09-11 12:58:42 +05:30
Rahul Sharma
40f659bfc0 msm: ais: Return -NOTTY on invalid ioctl command
Check validity of command before processing.

Change-Id: Iecd66b90922f8ed4b7d8d50f7c3d7f27d5d93309
CR-fixed: 2083314
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2017-09-11 00:11:06 -07:00
Archana Obannagari
a56d851eaa msm: kgsl: Fixing an uninitialized variable in _gpuobj_map_useraddr()
Uninitalized kernel variable passes to userspace, it may have data
from stack. To avoid data leak from kernel to userspace initializes
struct kgsl_gpuobj_import_useraddr to zero.

CRs-Fixed: 2096006
Change-Id: Ib79b030cd5e3edd7279632af20dc3fac95eb73d4
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
2017-09-11 11:07:28 +05:30
Amit Blay
4b924d1854 dts: msm: Add QSEECOM heap node on msm8996 lfv platform
Add the QSEECOM ION heap node, to allow QSEECOM driver and QSEECOM
API library to allocate ION memory from QSEECOM heap.

Change-Id: Ia0b346bbac9378b79d1b7683ee1cc0ade533b4fa
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2017-09-10 22:12:39 -07:00
Linux Build Service Account
1cbd1cdf84 Merge "mmc: sdhci: Add logs when ignoring timeout due to quirk" 2017-09-10 10:20:25 -07:00
Lior David
56a778e19c wil6210: refresh FW capabilities during interface up
FW capabilities are currently retrieved only during module
initialization, but userspace can replace the firmware while
interface is down, so refresh the FW capabilities when
interface is up (after FW is loaded) to ensure driver
functionality matches the loaded FW.

Change-Id: I880706bee0700b88e6637efd42de2eef4ea0d8b6
Signed-off-by: Lior David <liord@codeaurora.org>
2017-09-10 00:22:35 -07:00
Lior David
9db9725e93 wil6210: ensure P2P device is stopped before removing interface
User space can remove the P2P management interface while it is active
(for example, while listen/search is active) and this can cause
a crash. Ensure the P2P device is fully stopped before removing.

Change-Id: Ibc94f12bc63f2ba31ede24afffd9c5acbf95467a
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 69fecf599f48e258984b2ffdf0a4c65a35a31287
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:22:29 -07:00
Lior David
821b100ad8 wil6210: increase connect timeout
Connect can take longer than current timeout in some scenarios,
for example with long-range antenna array. Increase the timeout
to support these scenarios.

Change-Id: Id59cf4f11f8381ab8eab748171ef2b7949dde887
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: d83ad4c4fd78b22935711f865048bab78b43fc86
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:22:23 -07:00
Dedy Lansky
89553114ef wil6210: clear PAL_UNIT_ICR part of device reset
When FW starts running it can get D0 to D3 interrupt that is a leftover
from previous system suspend while FW was not running.
As this interrupt is not relevant anymore, clear it part of device reset
procedure.

Change-Id: I213a18fd59a500914ab22f75a72393786188a08e
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 7086d861753bc0aaa8b6445f657d8e39953e4fcd
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:22:17 -07:00
Dedy Lansky
8e502e8bc0 wil6210: move pre-FW configuration to separate function
Re-arrange the code to have dedicated function for device configuration
which takes place before FW starts running.

Change-Id: Ia0f2b33f85ba9547bee9415e34143e5b09e28447
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 1490846d256af947a4743f04ba8c97dc3bc37073
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:22:10 -07:00
Lazar Alexei
bd05d7e51d wil6210: align to latest auto generated wmi.h
Align to latest version of the auto generated wmi file
describing the interface with FW.

Change-Id: I5cd2130c17457544d055aaff15f5747a3d241e23
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 761f8e4d463e1cbf6da0d228bc74cecc800d4de5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:22:04 -07:00
Gidon Studinski
c834e75562 wil6210: make debugfs compilation optional
Since debugfs is a kernel configuration option, enable the driver to
compile without debugfs.

Change-Id: Id1b162172e2662a59af5b031a71ccd22250e4b6d
Signed-off-by: Gidon Studinski <qca_gidons@qca.qualcomm.com>
Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 5f591dac9f20f76439df2e18570765d384a94070
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:21:58 -07:00
Lior David
c29af27c27 wil6210: ratelimit errors in TX/RX interrupts
Sometimes there is a firmware crash but the hardware
is not fully stopped and continue to send TX/RX interrupts.
This can cause an overload of messages which can bring the
host down. Add ratelimit to these error messages to fix this.

Change-Id: If0f8bfbec1df1c5d98c87d64191ef14bf6579ae1
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 40cbd88be702a2455b6e047dc13f5d51ed542063
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-09-10 00:21:50 -07:00
Linux Build Service Account
05782da9c4 Merge "drivers: media: broadcast: Fix security vulnerability issue" 2017-09-09 16:48:38 -07:00
Linux Build Service Account
6cdb81fdcf Merge "tty: serial_core: add tty NULL check to uart_tx_stopped" 2017-09-09 06:32:42 -07:00
Linux Build Service Account
c85421c41a Merge "ARM: dts: msm: Enable CAN controller for msm8996 CV2X boards" 2017-09-08 22:04:16 -07:00
Linux Build Service Account
ef93f7a163 Merge "Merge android-4.4@4b8fc9f (v4.4.82) into msm-4.4" 2017-09-08 22:04:15 -07:00
Linux Build Service Account
8027efd3cc Merge "soc: qcom: initialize glink link state" 2017-09-08 22:04:14 -07:00
Manaf Meethalavalappu Pallikunhi
5bd5aebe3d msm: thermal: Check cpu variables are initialized before setting threshold
Userspace thermal daemon initiate KTM hotplug monitor related
initialization. Thermal core control can be disabled/enabled from
userspace via KTM sysfs for cpu related initialization after boot.
There is a possible race condition between KTM hotplug initialization
from thermal daemon and KTM core control re-enablement from userpsace
shell. When these both events are triggered at the same time,
thermal core control enablement tries to set emergency hotplug
threshold prior to per cpu hotplug related initialization like sensor
id, trip and threshold value etc. This leads to wrong sensor
threshold settings and eventually thermal core sensor threshold list
will be broken.

To avoid this wrong threshold settings during thermal core control
enablement, check KTM hotplug related initialization is done prior
to threshold setting for each core.

Change-Id: I916527d187146d5e292dd57897aa70b21cf87fbc
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-09-08 20:28:13 +05:30
Govind Singh
49bb00b877 ath10k: Destroy QMI handle during driver unload
QMI handle was not destroyed during unload and server exit
and resulting in qmi handle leak.

Fix this problem by destroying the QMI handle during
driver unload and server exit.

Change-Id: I7557de7c2ff2cb7d82d6e8a3480e8d5f4be6a5f4
Signed-off-by: Govind Singh <govinds@codeaurora.org>
2017-09-08 06:57:01 -07:00
Tanvi Aggarwal
f33863c42e msm: sensor: flash: add conditional check for ioctl
Add conditional check when sending VIDIOC_MSM_FLASH_CFG
in 32-bit process.

Change-Id: I73bcce85a212495ce94e6265947c11a6bc0e4040
CRs-Fixed: 2092793
Signed-off-by: Tanvi Aggarwal <tanvia@codeaurora.org>
2017-09-08 04:45:28 -07:00
VijayaKumar T M
9d24ba00e9 msm: camera: isp: Check null pointer for VFE0 base
Add NULL pointer check for vfe_base of VFE0.

CRs-Fixed: 1032715
Change-Id: I540d9ff831fc9447ecf145f75ea84da3668c4f6f
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
2017-09-08 02:36:13 -07:00
Hareesh Gundu
273f50746c msm: kgsl: Do not allocate scratch memory for A3xx
A3xx device gets the ring buffer read pointer directly
from the GPU registers. So don’t allocate scratch memory
which can’t be used for A3xx GPU devices.

Change-Id: I95016dfc169b9fee74e978f5560592740f34515e
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-09-08 02:02:40 -07:00
Hareesh Gundu
40e0712361 msm: kgsl: Fix gpu fault issue while enabling stall on page fault
Stall on page fault feature is supported on A5XX and later GPUs.
Enabling this feature on unsupported GPUs causes GPU faults.
So don't insert GPU stall related commands in ringbuffer if
not supported. But allow user to capture the GPU snapshot on
GPU page fault.

Change-Id: Ied26a5b4f44c1877b289a0ff5c0a6d47901e453d
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-09-08 14:08:57 +05:30
Linux Build Service Account
ccfb8c3db0 Merge "mmc: sdhci: Fix SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD handling" 2017-09-07 22:42:20 -07:00
Linux Build Service Account
f906a06b89 Merge "mmc: core: power off host if SD card resume fails" 2017-09-07 22:42:20 -07:00
Lei wang
b8f1ab847c tty: serial_core: add tty NULL check to uart_tx_stopped
Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use
tty_port_close") created a case where a port used for a console does not
get shutdown on tty closing. Then a call to uart_tx_stopped() segfaults
because the tty is NULL. This could be fixed to restore old behavior,
but we also want to allow tty_ports to work without a tty attached. So
this change to allow a NULL tty_struct is needed either way.

Fixes: 761ed4a94582
("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: Ifbeeacc89d396b857332ce94cc2d77bdd6e12bb7
Git-repo: git://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: a727b025f43d7952c0697562f5cecda9f42758aa
Signed-off-by: Lei wang <leiwan@codeaurora.org>
2017-09-07 21:46:18 -07:00
Linux Build Service Account
cb8f9c4da7 Merge "power: qpnp-fg-gen3: update SOC masking algorithm" 2017-09-07 11:05:40 -07:00
Gustavo Solaira
1b1517142f ARM: dts: msm: Add FAN cooling device to msm8996 CV2X boards
Add a node for a GPIO-based FAN cooling device for msm8996
CV2X boards. This GPIO has a single speed and can be controlled
from user space.

Change-Id: Iee427407f3c4032e1394c61dd1f225e24a091a99
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2017-09-07 10:35:31 -07:00
Gustavo Solaira
c283bfe1d5 defconfig: msm: Enable GPIO-based FAN for msm8996-auto
Enable the GPIO FAN driver to enable control of GPIO based
fans for cooling on msm8996-auto devices.

Change-Id: I5494fae1c7ab75362bc6c71c4e731f0581b01995
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2017-09-07 10:35:23 -07:00
Venkateswara Rao Tadikonda
a33cdc7723 msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area()
Reduce the frequency of kgsl logging when kgsl driver failed to get
memory mapping for requested memory.

Change-Id: If1a8832a9aa0396e3c990916deec7949697be12d
Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
2017-09-07 21:04:46 +05:30
Sunil Khatri
8b6bbeab08 msm: kgsl: Protect the bind object against bad dereference
Sparse bind object are unbinded with bind id. This
can be exploited by any malicious application calling
unbind with same bind id again and again.

This can lead to a race condition between two threads
where one free the bind object and second thread uses
same object leading to bad dereference.

Change-Id: I542a008fc647489560667fb5016453a0c3448f7a
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
2017-09-07 05:18:38 -07:00
Veerabhadrarao Badiganti
739a7c1e43 mmc: host: Update the USE_PIO_FOR_EMMC_TUNING quirk value
SDHCI_QUIRK2_USE_PIO_FOR_EMMC_TUNING quirk is defined with a bit position
of 23 (1 << 23). Since this bit position is already defined for some other
quirk, update its bit position to next available one.

Change-Id: I878b3c0b3f4cb32ecaf27fc77ccdfb7d4215a39c
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-09-07 15:22:43 +05:30
Linux Build Service Account
aa450b1d93 Merge "drivers: net: can: Add K61 CAN controller driver" 2017-09-07 00:46:05 -07:00
Linux Build Service Account
7edaca927d Merge "diag: Support buffering mode for non-diag_id peripherals" 2017-09-07 00:46:04 -07:00
Linux Build Service Account
329b7b4c99 Merge "lib/stackdepot.c: use __GFP_NOWARN for stack allocations" 2017-09-07 00:46:03 -07:00
Mohammed Javid
bb96b54c01 msm: ipa: Cache CNE event
Provide support to cache CNE event for debugging purpose.

Change-Id: I00d101d3b9a627d7aba3e4524ff301797ea6085e
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2017-09-07 10:34:59 +05:30
Linux Build Service Account
b864286bdb Merge "diag: Proper Update of the PD packet buffer status and length" 2017-09-06 12:55:56 -07:00
Linux Build Service Account
b42a5cc33b Merge "msm: mdss: Enable clocks for WFD setup" 2017-09-06 12:55:55 -07:00
Linux Build Service Account
02411b451a Merge "msm: sde: Avoid NULL pointer dereference in cancel request" 2017-09-06 12:55:54 -07:00
Linux Build Service Account
120dd65a36 Merge "defconfig: msm: enable Linux Kernel Dump Test Tool" 2017-09-06 12:55:53 -07:00
Linux Build Service Account
aa748b591b Merge "msm: camera: Return -NOTTY on invalid ioctl command." 2017-09-06 12:55:52 -07:00
Linux Build Service Account
bb516d3651 Merge "cnss2: Increase QMI ATHDIAG maximum data size" 2017-09-06 12:55:51 -07:00
Skylar Chang
964eeebd3c msm: ipa: ipa_usb: teth_prot and ttype validation
Add input validation logic for accessing teth_prot and ttype
members.

Change-Id: I05780fb3b09616b7a9cf0c36f71e9f1e5e49f136
CRs-Fixed: 2091803
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-09-06 12:46:37 -07:00
Subbaraman Narayanamurthy
394bb414b7 power: qcom: smb135x: change OTG regulator ops to static
Change the OTG regulator ops to static for smb1351 and smb135x
charger drivers.

Change-Id: Ide0c6461275f3ba74e0420e1d1a36c1e1f2bd18d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-09-06 11:21:26 -07:00