Commit graph

600733 commits

Author SHA1 Message Date
Johan Hovold
5736d7c209 USB: serial: keyspan_pda: fix modem-status error handling
commit 01b3cdfca263a17554f7b249d20a247b2a751521 upstream.

Fix broken modem-status error handling which could lead to bits of slab
data leaking to user space.

Fixes: 3b36a8fd67 ("usb: fix uninitialized variable warning in keyspan_pda")
Cc: stable <stable@vger.kernel.org>     # 2.6.27
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:43 +02:00
Olli Salonen
5bbc393835 USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick
commit 367b160fe4717c14a2a978b6f9ffb75a7762d3ed upstream.

There are two versions of the Qivicon Zigbee stick in circulation. This
adds the second USB ID to the cp210x driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:43 +02:00
Dan Carpenter
a82597e92e USB: serial: ch341: fix type promotion bug in ch341_control_in()
commit e33eab9ded328ccc14308afa51b5be7cbe78d30b upstream.

The "r" variable is an int and "bufsize" is an unsigned int so the
comparison is type promoted to unsigned.  If usb_control_msg() returns a
negative that is treated as a high positive value and the error handling
doesn't work.

Fixes: 2d5a9c72d0c4 ("USB: serial: ch341: fix control-message error handling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:43 +02:00
Hans de Goede
54b594369a ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS
commit 240630e61870e62e39a97225048f9945848fa5f5 upstream.

There have been several reports of LPM related hard freezes about once
a day on multiple Lenovo 50 series models. Strange enough these reports
where not disk model specific as LPM issues usually are and some users
with the exact same disk + laptop where seeing them while other users
where not seeing these issues.

It turns out that enabling LPM triggers a firmware bug somewhere, which
has been fixed in later BIOS versions.

This commit adds a new ahci_broken_lpm() function and a new ATA_FLAG_NO_LPM
for dealing with this.

The ahci_broken_lpm() function contains DMI match info for the 4 models
which are known to be affected by this and the DMI BIOS date field for
known good BIOS versions. If the BIOS date is older then the one in the
table LPM will be disabled and a warning will be printed.

Note the BIOS dates are for known good versions, some older versions may
work too, but we don't know for sure, the table is using dates from BIOS
versions for which users have confirmed that upgrading to that version
makes the problem go away.

Unfortunately I've been unable to get hold of the reporter who reported
that BIOS version 2.35 fixed the problems on the W541 for him. I've been
able to verify the DMI_SYS_VENDOR and DMI_PRODUCT_VERSION from an older
dmidecode, but I don't know the exact BIOS date as reported in the DMI.
Lenovo keeps a changelog with dates in their release notes, but the
dates there are the release dates not the build dates which are in DMI.
So I've chosen to set the date to which we compare to one day past the
release date of the 2.34 BIOS. I plan to fix this with a follow up
commit once I've the necessary info.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:43 +02:00
Nadav Amit
f0a1bf29d8 vmw_balloon: fix inflation with batching
commit 90d72ce079791399ac255c75728f3c9e747b093d upstream.

Embarrassingly, the recent fix introduced worse problem than it solved,
causing the balloon not to inflate. The VM informed the hypervisor that
the pages for lock/unlock are sitting in the wrong address, as it used
the page that is used the uninitialized page variable.

Fixes: b23220fe054e9 ("vmw_balloon: fixing double free when batching mode is off")
Cc: stable@vger.kernel.org
Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:43 +02:00
Jann Horn
ba20e67aee ibmasm: don't write out of bounds in read handler
commit a0341fc1981a950c1e902ab901e98f60e0e243f3 upstream.

This read handler had a lot of custom logic and wrote outside the bounds of
the provided buffer. This could lead to kernel and userspace memory
corruption. Just use simple_read_from_buffer() with a stack buffer.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:42 +02:00
Paul Burton
bc20ab941e MIPS: Fix ioremap() RAM check
commit 523402fa9101090c91d2033b7ebdfdcf65880488 upstream.

We currently attempt to check whether a physical address range provided
to __ioremap() may be in use by the page allocator by examining the
value of PageReserved for each page in the region - lowmem pages not
marked reserved are presumed to be in use by the page allocator, and
requests to ioremap them fail.

The way we check this has been broken since commit 92923ca3aa ("mm:
meminit: only set page reserved in the memblock region"), because
memblock will typically not have any knowledge of non-RAM pages and
therefore those pages will not have the PageReserved flag set. Thus when
we attempt to ioremap a region outside of RAM we incorrectly fail
believing that the region is RAM that may be in use.

In most cases ioremap() on MIPS will take a fast-path to use the
unmapped kseg1 or xkphys virtual address spaces and never hit this path,
so the only way to hit it is for a MIPS32 system to attempt to ioremap()
an address range in lowmem with flags other than _CACHE_UNCACHED.
Perhaps the most straightforward way to do this is using
ioremap_uncached_accelerated(), which is how the problem was discovered.

Fix this by making use of walk_system_ram_range() to test the address
range provided to __ioremap() against only RAM pages, rather than all
lowmem pages. This means that if we have a lowmem I/O region, which is
very common for MIPS systems, we're free to ioremap() address ranges
within it. A nice bonus is that the test is no longer limited to lowmem.

The approach here matches the way x86 performed the same test after
commit c81c8a1eee ("x86, ioremap: Speed up check for RAM pages") until
x86 moved towards a slightly more complicated check using walk_mem_res()
for unrelated reasons with commit 0e4c12b45aa8 ("x86/mm, resource: Use
PAGE_KERNEL protection for ioremap of memory pages").

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Fixes: 92923ca3aa ("mm: meminit: only set page reserved in the memblock region")
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.2+
Patchwork: https://patchwork.linux-mips.org/patch/19786/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-17 11:31:42 +02:00
Vijay kumar Tumati
dd8f83fee4 msm: camera: sensor: Add support for front aux sensor
Allow front aux sensor to be connected on device.

Change-Id: I0386c23c77b38200c20581cd85b20c96bf074547
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2018-07-17 14:46:42 +05:30
Linux Build Service Account
cca3c14ebe Merge "ARM: dts: msm: Enable diagfwd-usb for MSM8996 CV2X boards" 2018-07-16 21:54:13 -07:00
Linux Build Service Account
5468d13d1d Merge "diag: Enable diagfwd via USB even when MHI is available" 2018-07-16 21:54:10 -07:00
Linux Build Service Account
582f5092f3 Merge "soc: qcom: hab: check the buffer's pointer before exporting it" 2018-07-16 21:54:09 -07:00
Vivek Kumar
9177f29207 drm: msm: Hot plug cpu1 once early domain is finished
Early domain services run on cpu1 in LK, so hotplug
cpu1 once early domain services are finished.

Change-Id: I23b57b8b7460c5740083b27af72251b2fad78ed4
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
2018-07-16 21:41:39 -07:00
Linux Build Service Account
385635a167 Merge "mmc: core: Update SD card removal logic based on cd gpio state" 2018-07-16 11:36:25 -07:00
Gustavo Solaira
dc59c27d8b ARM: dts: msm: Enable diagfwd-usb for MSM8996 CV2X boards
Enable the diagfwd-usb platform driver for MSM8996
CV2X boards. This is used to forward diag data from MDM
via USB.

Change-Id: I816e82c25ca623c47c541e4e790e22b90c55da41
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-07-16 11:18:19 -07:00
Gustavo Solaira
146820788a diag: Enable diagfwd via USB even when MHI is available
Some devices need diag via USB even when MHI is used
for rmnet and qmi tethering. This is because of lack
of support for diagfwd for mhi_dev in Linux.

Change-Id: Ie0ec19ee109d49aa409d1df3ad5ca24b75de7102
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-07-16 11:18:18 -07:00
Gustavo Solaira
2bd6702877 usb: misc: diag_ipc_bridge: Add support for 901D PID
Add support for creation of diag traffic channel in case
the connected device has 0x05C6 VID and 0x901D PID.
   0x901D : DIAG + ADB

Change-Id: I6df0aca714f10ea7d854f621e19da1388a7e7d5c
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-07-16 11:18:17 -07:00
Ajay Agarwal
d6edcd0faf defconfig: msm-auto: Enable diag_ipc_bridge driver for msm8996
Enable DIAG and IPC bridge driver on msm8996 auto to support
interfacing with DIAG and QMI interfaces.

Change-Id: I8b32bdfc6aa29c090b21512e202c2822b9752a48
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-07-16 11:18:16 -07:00
Gustavo Solaira
70a7fe177d diag: Disable the code for diag_smux
Disable the diag_smux code to fix the build with
diagfwd USB enabled since the dependencies for
diag_smux are not available it is deprecated in
this kernel version.

Change-Id: I6a8bc3a34f67ed5b1ca175cad0b3067e2c2df199
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-07-16 11:16:57 -07:00
Mohammed Javid
bbff7311e9 msm: ipa: Error prints are misleading fix it
IPC logging is for debugging purpose and
it may disabled in kernel anytime.
From IPA driver printing the error log on IPC
create context is misleading.
Instead of error, make it as debug.

Change-Id: Icee2b1ad9fcef446f79dfc71f554a24a90ea3d2d
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-07-16 15:12:25 +05:30
Linux Build Service Account
5e972f6b60 Merge "soc: qcom: hab: resolve NULL pointer dereference issues" 2018-07-16 01:31:34 -07:00
Linux Build Service Account
438ba82af9 Merge "defconfig: gvm: enable msm hardware random generator" 2018-07-16 01:31:32 -07:00
Linux Build Service Account
dbd927c73d Merge "ssusb: vplatform: enable otg passthrough in la-gvm" 2018-07-16 01:31:32 -07:00
Linux Build Service Account
016e86bc53 Merge "iommu/debug: Add mutex to make attach/detach thread safe" 2018-07-16 01:31:30 -07:00
Suprith Malligere Shankaregowda
6df01b6179 ARM: dts: msm: add ddc_skip on auto 8996 boards
This change is done to disable the hdmi scrambler related display
kernel error messages in the boot logs.

Change-Id: I7f9284c3d64e291ef9c6442e7e89f6551cbce8d6
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
2018-07-15 22:11:23 -07:00
Suprith Malligere Shankaregowda
225c6e1fee drm: msm: add skip_ddc support for hdmi display
HDMI display on auto boards has disabled pluggable function
and hardcoded 1080p mode for output. So ddc related function
should also be skipped. Otherwise, some error messages are
printed when accessing ddc.

Change-Id: I42694b0586dd870e7881b422cd3d6ee960276b17
Signed-off-by: Suprith Malligere Shankaregowda <supgow@codeaurora.org>
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2018-07-15 22:11:04 -07:00
Linux Build Service Account
ff5fac3d56 Merge "ARM: dts: msm: Add clock skew values for msm8996 CV2X boards" 2018-07-15 13:23:49 -07:00
Linux Build Service Account
65a0403464 Merge "Documentation: devicetree: net: Add clock skew parameters for neutrino" 2018-07-14 00:36:46 -07:00
Linux Build Service Account
741e5a2f47 Merge "cnss2: Refactor PCIe bus related code" 2018-07-14 00:36:44 -07:00
Lakshmi Narayana Kalavala
cb60bccda1 drm/msm: Fix the format prints in display driver
Fix the %p format prints with %pK.

Change-Id: I1743bacb76c1db4bfa304146f7d391751b35273c
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Signed-off-by: Navid Bahrani <nbahrani@codeaurora.org>
2018-07-13 16:42:59 -07:00
Aditya Mathur
18f31ec736 ARM: dts: msm: Add clock skew values for msm8996 CV2X boards
Add phy clock skew values for the neutrino driver
on msm8996 CV2X boards.

Change-Id: Ic06b054dd6d5e4267fdec64d7d73786b54466444
Signed-off-by: Aditya Mathur <aditmath@codeaurora.org>
2018-07-13 15:37:57 -07:00
Aditya Mathur
63226fea94 Documentation: devicetree: net: Add clock skew parameters for neutrino
Add documentation for new PHY clock skew parameters
in the neutrino driver.

Change-Id: Ibefa49ef0f91e42e3bb6d050eeac4a4adfc67ee1
Signed-off-by: Aditya Mathur <aditmath@codeaurora.org>
2018-07-13 14:46:27 -07:00
Linux Build Service Account
125e556ec0 Merge "drm: msm: error notification and handling" 2018-07-13 14:31:15 -07:00
VENKATA RAO KAKANI
ba826181ed iommu/debug: Add mutex to make attach/detach thread safe
This mutex lock will help to synchronise the usage of iommu domain
structure which is getting used by multiple threads to perform
iommu attach and iommu detach in case of any error.

Without this change we are seeing page poisoning - write after free
when running stress tests using iommu-debug test cases.

Change-Id: I388a90084ab8cc7e7097bac9a41ed5fed6dad312
Acked-by: Ankur Saxena <c_ankusa@qti.qualcomm.com>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: VENKATA RAO KAKANI <vkakani@codeaurora.org>
2018-07-13 04:56:53 -07:00
Artem Borisov
ed9bdc8a8f cpufreq: Kconfig: Remove CPU_FREQ_DEFAULT_GOV_SCHED
Sched governor was removed in df147c9e33
and this probably was left here by mistake. Remove it to avoid confusion.

Signed-off-by: Artem Borisov <dedsa2002@gmail.com>
2018-07-13 14:30:54 +03:00
Linux Build Service Account
1814c3e255 Merge "adv7481: Fix AVI infoframe read" 2018-07-13 03:01:24 -07:00
Balachandra C S
6a1dd530ef drivers: net: can: Use interrupt type from device tree
Use proper interrupt type from the device tree for gpio interrupt
from CAN controller in qti-can driver as irq type may vary with
different targets.

Change-Id: If08c3f6d53fc6e8b7a55be47705c5a1841c0c913
Signed-off-by: Balachandra C S <balacs@codeaurora.org>
2018-07-13 13:46:27 +05:30
Balachandra C S
ac83e7e52f drivers: net: can: Use proper device property in qti-can driver
Use the proper device tree property in qti-can driver for enabling
can-fd feature.

Change-Id: I4c59e7037a8e0f4972603aceb65138a190080074
Signed-off-by: Balachandra C S <balacs@codeaurora.org>
2018-07-13 13:21:41 +05:30
Balachandra C S
9352586542 drivers: net: can: Add END_FW_UPDATE_FILE command to qti-can driver
Add IOCTL command to indicate the controller that firmware update
file end of file is reached.

Change-Id: Ib538ff68a4b974234ce541696d38772e7065b7d8
Signed-off-by: Balachandra C S <balacs@codeaurora.org>
2018-07-13 13:17:06 +05:30
Balachandra C S
193f8ec5c6 drivers: net: can: ignore the data if command byte is 0xFF
Ignore the data from spi if data read happens to be 0xFF.

Change-Id: Ib1f28b70ee11e99f73a80166df56132371076f86
Signed-off-by: Balachandra C S <balacs@codeaurora.org>
2018-07-13 12:49:41 +05:30
Linux Build Service Account
1eef60bf60 Merge "cnss2: Add bus layer" 2018-07-12 20:13:13 -07:00
Linux Build Service Account
e5020c2024 Merge "net: core: null pointer derefernce in sockev_client_cb" 2018-07-12 20:13:12 -07:00
Linux Build Service Account
348619f43f Merge "usb: gadget: ffs: Remove IPC context create failure log" 2018-07-12 05:37:43 -07:00
Linux Build Service Account
c236da24a2 Merge "msm: camera: isp: Add null check for vfe_dev." 2018-07-12 05:37:32 -07:00
Linux Build Service Account
dad1ae12b3 Merge "cnss2: Do not load board data file if bdf_bypass is enabled" 2018-07-12 05:37:14 -07:00
Linux Build Service Account
926778dc85 Merge "iommu/debug: Add mutex to make attach/detach thread safe" 2018-07-12 05:36:59 -07:00
Venkata Rao Kakani
eca26f73a0 defconfig: gvm: enable msm hardware random generator
Enable MSM hardware random generator in LA-GVM.

Change-Id: I970986fd302dfc56544409682faa97c9e0a508bd
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
2018-07-12 04:14:37 -07:00
Yong Ding
a16a7501c8 soc: qcom: hab: resolve NULL pointer dereference issues
Some NULL pointer dereference issues are fixed.

Change-Id: I0f7f8ede860c81d451f2105520750692fd4eee50
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-07-12 14:57:44 +08:00
Shobhit Singh
29b44c2034 msm: camera: isp: Add null check for vfe_dev.
In some cases, observed that vfe node information is
not filled in the stream information, this will lead
to a null pointer access. To avoid such scenarios,
a null check is added.

Change-Id: Ibe8e095629574e2d8b8fbb097449d49bc0a762b3
Signed-off-by: Shobhit Singh <shobsi@codeaurora.org>
2018-07-11 22:17:46 -07:00
Yue Ma
9a3821168d cnss2: Refactor PCIe bus related code
PCIe bus related APIs should not directly called from common files.
Instead, create equivalent abstract BUS APIs from where it can
decide which corresponding PCIe bus APIs to be invoked. This will
help to extend other buses like USB and SDIO in the future.

Change-Id: I1f115173f2e6c34e3a8cb6f975349112f52697e4
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
2018-07-11 18:41:28 -07:00
Yue Ma
5ff075a62e cnss2: Add bus layer
Bus layer is a shim layer for potential buses (PCIe, USB and SDIO)
of WLAN devices. It abstracts all the bus related APIs for common
files of the driver so that it can help make them bus independent.

Change-Id: I06e19a26d34168fe0fcc65229a4519b868cd97c1
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
2018-07-11 18:40:42 -07:00