Commit graph

594383 commits

Author SHA1 Message Date
Hugh Guan
d2ca82a2bc ARM: dts: msm: Support Secondary TDM RX Interface for msm8996
Support Secondary TDM RX Interface for automotive.

CRs-fixed: 2112052
Change-Id: Iae7bde93e8af851e470fb4f81b37d513ce3dfd02
Signed-off-by: Hugh Guan <hhguan@codeaurora.org>
2017-10-19 22:10:31 -07:00
Linux Build Service Account
b99844d8a3 Merge "ALSA: usb-audio: Add length check after string desc copy" 2017-10-18 21:38:46 -07:00
Linux Build Service Account
22b27b16d8 Merge "block: Initialize bd_bdi on inode initialization" 2017-10-18 11:08:22 -07:00
Linux Build Service Account
c24ca7f957 Merge "drm/msm/sde: synchronize mdp clk with frame update" 2017-10-18 11:08:20 -07:00
Linux Build Service Account
66a8b75dd2 Merge "drm/msm/sde: align bandwidth/clock updates with frame done" 2017-10-18 11:08:20 -07:00
Linux Build Service Account
0b90776440 Merge "diag: Add mutex protection while reading dci debug statistics" 2017-10-18 11:08:19 -07:00
Linux Build Service Account
20caa06084 Merge "cnss2: Support multiple recoveries when using CORE only firmware" 2017-10-18 02:00:40 -07:00
Linux Build Service Account
8fa49f2cb1 Merge "cnss2: Request runtime PM resume when shutdown happens" 2017-10-18 02:00:39 -07:00
Linux Build Service Account
1682bdfd75 Merge "msm: ipa: Fix use after free issue" 2017-10-18 02:00:38 -07:00
Ajay Agarwal
d7a59889eb ALSA: usb-audio: Add length check after string desc copy
It might be possible that negative error code is returned
in 'len', when we try to copy USB string desc into the ID
name buf of snd_kcontrol instance. But even in that case,
we are terminating buf with 0 at the 'len' index, which
leads to memory corruption. And for good case where 'len'
is non-negative, usb_string func is terminating the buf
with 0.

Fix this by removing the termination of buf with '0'
in the caller function.

Change-Id: Ie32d395b0fc91d6c3e1cfdbafb76304e21e40577
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-10-18 13:50:46 +05:30
Jan Kara
16d289189c block: Initialize bd_bdi on inode initialization
So far we initialized bd_bdi only in bdget(). That is fine for normal
bdev inodes however for the special case of the root inode of
blockdev_superblock that function is never called and thus bd_bdi is
left uninitialized. As a result bdev_evict_inode() may oops doing
bdi_put(root->bd_bdi) on that inode as can be seen when doing:

mount -t bdev none /mnt

Fix the problem by initializing bd_bdi when first allocating the inode
and then reinitializing bd_bdi in bdev_evict_inode().

Thanks to syzkaller team for finding the problem.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: b1d2dc5659b4 ("block: Make blk_get_backing_dev_info() safe without open bdev")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I9c34ca321ab311936946187ed21e25d67caf5ba5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: 7ee143f46cb1f58ee07194076b9a3e6ea3f27ad3
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
9c197e78d2 block: Make blk_get_backing_dev_info() safe without open bdev
Currenly blk_get_backing_dev_info() is not safe to be called when the
block device is not open as bdev->bd_disk is NULL in that case. However
inode_to_bdi() uses this function and may be call called from flusher
worker or other writeback related functions without bdev being open
which leads to crashes such as:

[113031.075540] Unable to handle kernel paging request for data at address 0x00000000
[113031.075614] Faulting instruction address: 0xc0000000003692e0
0:mon> t
[c0000000fb65f900] c00000000036cb6c writeback_sb_inodes+0x30c/0x590
[c0000000fb65fa10] c00000000036ced4 __writeback_inodes_wb+0xe4/0x150
[c0000000fb65fa70] c00000000036d33c wb_writeback+0x30c/0x450
[c0000000fb65fb40] c00000000036e198 wb_workfn+0x268/0x580
[c0000000fb65fc50] c0000000000f3470 process_one_work+0x1e0/0x590
[c0000000fb65fce0] c0000000000f38c8 worker_thread+0xa8/0x660
[c0000000fb65fd80] c0000000000fc4b0 kthread+0x110/0x130
[c0000000fb65fe30] c0000000000098f0 ret_from_kernel_thread+0x5c/0x6c

Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I26955b919bd05fe34dc60aab1797ea2739ad5fd7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: b1d2dc5659b41741f5a29b2ade76ffb4e5bb13d8
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
b56ec58cde block: Dynamically allocate and refcount backing_dev_info
Instead of storing backing_dev_info inside struct request_queue,
allocate it dynamically, reference count it, and free it when the last
reference is dropped. Currently only request_queue holds the reference
but in the following patch we add other users referencing
backing_dev_info.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: Ibcee7b4c014018f9243cd3edbfd9c4a8877c3862
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: d03f6cdc1fc422accb734c7c07a661a0018d8631
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
1c6dd64534 block: Use pointer to backing_dev_info from request_queue
We will want to have struct backing_dev_info allocated separately from
struct request_queue. As the first step add pointer to backing_dev_info
to request_queue and convert all users touching it. No functional
changes in this patch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I77fbb181de7e39c83fbfba8cfb128d6ace161f31
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: 97419acd22a0bacc52dbc34d5bbc96d315e48acb
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:43 +05:30
Jan Kara
393737a28b block: Unhash block device inodes on gendisk destruction
Currently, block device inodes stay around after corresponding gendisk
hash died until memory reclaim finds them and frees them. Since we will
make block device inode pin the bdi, we want to free the block device
inode as soon as the device goes away so that bdi does not stay around
unnecessarily. Furthermore we need to avoid issues when new device with
the same major,minor pair gets created since reusing the bdi structure
would be rather difficult in this case.

Unhashing block device inode on gendisk destruction nicely deals with
these problems. Once last block device inode reference is dropped (which
may be directly in del_gendisk()), the inode gets evicted. Furthermore if
the major,minor pair gets reallocated, we are guaranteed to get new
block device inode even if old block device inode is not yet evicted and
thus we avoid issues with possible reuse of bdi.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I41087d3bc818c4e58e0b4e20876e136ec1cbb07b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: f44f1ab5a2dcd4e16eab850fd08e40ff2d0c28d4
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:43 +05:30
Abhinav Kumar
0fc4f878b3 drm/msm/sde: synchronize mdp clk with frame update
There is a race condition between the commit and
the validate, where the mdp clock or the bandwidth
can be updated for voting before the actual configuration
is taking place.

Fix this issue by caching the performance values in the crtc
till the current hw configuration is on-going.

Change-Id: Icc71c4f58cbc305529d308335f44b8c05702ebee
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:20:50 -07:00
Alan Kwong
931577c626 drm/msm/sde: move current performance setting to crtc object
Current performance setting is maintained in crtc state, and its
update is synchronized to commit cycle. However, the setting may be
committed to clock and bandwidth driver out of sync with respect to
commit cycle, e.g. update at end of frame while another commit is
validating. As a result, requested settings may be missed and result
in older settings being used. Move current performance setting
to crtc object, from crtc state, so it can be updated at the
same time as the setting is committed to clock and bandwidth
driver.

CRs-Fixed: 2048612
Change-Id: I0c3047e8e806460105eaba5d46145798bd98d721
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:20:33 -07:00
Abhinav Kumar
cf2cb1c388 drm/msm/sde: align bandwidth/clock updates with frame done
Align clock and bandwidth updates witf frame done event for
video mode panels.

Also move perf state update to atomic check to make perf data
persistent over state duplication.

Change-Id: I5ef02dd78ce6a62cf49f1f105344764fdb3a24da
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:19:44 -07:00
Yue Ma
b8e1d2e9df cnss2: Support multiple recoveries when using CORE only firmware
After MHI power on is completed, CORE component only firmware boot
can be considered as success. Add a debug parameter in order to
support multiple recoveries when using the firmware without WLAN
component.

Change-Id: I1b6a67a578ff7ffa15dff733b8d691910003ac6f
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-17 14:41:44 -07:00
Linux Build Service Account
fa53f7f14b Merge "soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink" 2017-10-17 14:20:44 -07:00
Linux Build Service Account
a6872b79bc Merge "msm: ipa: add null terminator" 2017-10-17 14:20:43 -07:00
Linux Build Service Account
88f238f177 Merge "rtac: add size check when reading cal data kvaddr buffer" 2017-10-17 05:38:29 -07:00
Linux Build Service Account
ab56a31bcb Merge "scsi: ufs: Fix race condition in ufs qcom debugfs driver" 2017-10-17 05:38:28 -07:00
Linux Build Service Account
f2b5c20a20 Merge "Merge android-4.4@d68ba9f (v4.4.89) into msm-4.4" 2017-10-17 05:38:14 -07:00
Yue Ma
b15e41e072 cnss2: Request runtime PM resume when shutdown happens
Request runtime PM resume in platform driver as soon as shutdown
happens. This can make sure device is resumed while shutdown is
proceeding.

Change-Id: I0aa15b9713347288f4954bd767ec9243d22153ed
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-16 16:32:05 -07:00
Linux Build Service Account
6d08baec31 Merge "msm: mdss: dp: fix no display issues during cable plugin/plugouts" 2017-10-16 13:07:08 -07:00
Linux Build Service Account
c083bb83fe Merge "ext4: provide ext4_issue_zeroout()" 2017-10-16 13:07:07 -07:00
Sreelakshmi Gownipalli
8708098342 diag: Add mutex protection while reading dci debug statistics
Unserialized access to diag_dbgfs_dci_data_index can lead to
heap overflow. Add mutex protection while updating the
diag_dbgfs_dci_data_index.

Change-Id: Iee9d0447494e3576e6293afcd4d7611bc429aa8a
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2017-10-16 06:53:50 -07:00
Dhoat Harpal
c66fd8c4d3 soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink
RX intent no timeout value when waiting for response. This can result
in calling function to wait indefinitely.

Set max waiting time to 500 ms.

CRs-Fixed: 2127311
Change-Id: I30475ca49f107e62bed41d3d26287562574d988c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-10-16 18:45:47 +05:30
Sayali Lokhande
612b84a96a scsi: ufs: Fix race condition in ufs qcom debugfs driver
In function ufs_qcom_dbg_testbus_cfg_write(), the global
variable ufs_qcom_host (host) is not protected by lock.
In function ufs_qcom_testbug_config(), we are checking this
variable in switch case and there is possibility of race
condition while accessing host variable in both of these
functions. This change fixes the possible race scenario
using spin_lock on host_lock.

Change-Id: I4e3fa1c3b80b92a648965371e12e52352cf80ce5
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-10-16 16:30:58 +05:30
Linux Build Service Account
5eef2bb525 Merge "msm: camera: isp: Reset frameskip range during streamoff" 2017-10-16 02:48:26 -07:00
Jan Kara
0dd142f88e ext4: provide ext4_issue_zeroout()
Create new function ext4_issue_zeroout() to zeroout contiguous (both
logically and physically) part of inode data. We will need to issue
zeroout when extent structure is not readily available and this function
will allow us to do it without making up fake extent structures.

Change-Id: I5deb04b49d3ebdd1ac12f8bb950faf46d08f5d80
Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Git-commit: 53085fac02d12fcd29a9cb074ec480ff0f77ae5c
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-4.4
[srkupp@codeaurora.org: Resolved minor conflict]
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2017-10-16 01:00:07 -07:00
Linux Build Service Account
9f5569b517 Merge "usb: f_qdss: Use QDSS string descriptor with QDSS interface descriptor" 2017-10-13 23:12:41 -07:00
Linux Build Service Account
f3356d99df Merge "crypto: msm: fix authdata copy issue in qcedev_sha_req_cb" 2017-10-13 23:12:40 -07:00
Linux Build Service Account
7b1afd9f0c Merge "msm: kgsl: Add a check for availability of RBBM timer clock" 2017-10-13 12:12:17 -07:00
Linux Build Service Account
1d91519ac5 Merge "clk: msm: Fix dummy clock fixed rate setting issue" 2017-10-13 12:12:16 -07:00
Linux Build Service Account
c4d72c5677 Merge "soc: qcom: Create additional ramdump device node for SSR minidump" 2017-10-13 12:12:15 -07:00
Linux Build Service Account
38c318f33b Merge "soc: qcom: Optimize minidump collection check and add debug log" 2017-10-13 12:12:14 -07:00
Linux Build Service Account
68404eb21e Merge "drivers: swr-wcd-ctrl: Fix wsa mute at boot" 2017-10-13 12:12:12 -07:00
Zhen Kong
4062e30ed3 crypto: msm: fix authdata copy issue in qcedev_sha_req_cb
qcedev_sha_req_cb() is only called by _sha_complete() during sha
operation, and will copy byte_count value from authdata array.
This array size is two, and only contains two byte_count value
that are used for sha operation. So make change to only copy the
first two elements from this array.

Change-Id: I535f2ec0e358870a9a2163b3c0bf154b2c8d003f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-10-13 10:07:58 -07:00
Linux Build Service Account
f258dafea9 Merge "cnss2: Add multiple recoveries support without WLAN host driver" 2017-10-13 02:11:09 -07:00
Linux Build Service Account
776d37117d Merge "power: qpnp-fg-gen3: Improve the accuracy of charge_counter" 2017-10-13 02:11:06 -07:00
Linux Build Service Account
6210ce938e Merge "icnss: Re-probe if driver probe returns error of defer" 2017-10-13 02:11:05 -07:00
Linux Build Service Account
04608de850 Merge "ARM: dts: msm: Add verify flag in fs_mgr of vendor" 2017-10-13 02:11:04 -07:00
Linux Build Service Account
d93baaa0a1 Merge "USB: rndis: Honor dl_max_packet_size value sent by host" 2017-10-13 02:11:03 -07:00
Linux Build Service Account
2df7cec6cb Merge "drivers/misc: dont send content stream type for HDMI sinks" 2017-10-13 02:11:01 -07:00
Zhiqiang Tu
474100bc07 clk: msm: Fix dummy clock fixed rate setting issue
Set fixed rate in of_dummy_get since dummy_clk_dt_parser
is not called.

Change-Id: Id33be0a00a0a29100618f5fd25a917983f654025
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-10-13 08:38:01 +08:00
Subbaraman Narayanamurthy
a87340d406 power: qpnp-fg-gen3: Improve the accuracy of charge_counter
Currently, charge_counter is based off CC_SOC_SW which is based
off coulomb counter. However, there could be some accumulation
of error due to inaccuracy in ADC over time. This can potentially
affect the accuracy of charge_counter. To overcome this, prime
CC_SOC_SW during discharging based off battery SOC and to a full
value during charge termination.

While at it, expose the charge_counter_shadow property based off
battery SOC for comparison.

CRs-Fixed: 2109421
Change-Id: I50de44afbdbd747db95946416a09062df205fd6c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-12 13:43:09 -07:00
Subbaraman Narayanamurthy
d475978a5f power: qpnp-fg-gen3: Clear charge_full flag during discharging
When SOC is held @ 100% after charge termination, charge_full
flag is cleared only when the monotonic SOC drops below recharge
SOC threshold. This can cause the flag to be held for a long time
when the charger is removed. Fix this by clearing charge_full
flag when charging status had changed from FULL.

Change-Id: I35b52ddc45f314347f0e4d8433d5fb550663267c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-10-12 13:43:08 -07:00
Shihuan Liu
62108595bd msm: ipa: add null terminator
Add null terminator at the end of string
extend_ioctl_data.u.rmnet_mux_val.vchannel_name
to avoid potential security issue.

Change-Id: I57fe3a9f7e3ad6a499b62a9cfc49bc6b2f3b42e0
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-10-12 12:08:40 -07:00