Commit graph

889,574 commits

Author SHA1 Message Date
qctecmdr
52c24cbf41 Merge "msm: kgsl: Fix kgsl_state_is_awake for gmu targets" 2020-07-02 22:46:55 -07:00
qctecmdr
5267e2c6f8 Merge "iommu: Remove iommu_debugfs_top" 2020-07-02 22:14:46 -07:00
qctecmdr
9a8fa3bef0 Merge "arm64: Enable a bunch of android recommended configs" 2020-07-02 22:14:45 -07:00
qctecmdr
472dad2bc9 Merge "defconfig: arm64: Disable SDCARD_FS for Lahaina" 2020-07-02 22:14:45 -07:00
qctecmdr
10d4fc23ab Merge "msm: ipa: Add more ipa API to ipa framework" 2020-07-02 22:14:45 -07:00
Willem de Bruijn
4f5efed8ed UPSTREAM: bpf: Add gso_size to __sk_buff
BPF programs may want to know whether an skb is gso. The canonical
answer is skb_is_gso(skb), which tests that gso_size != 0.

Expose this field in the same manner as gso_segs. That field itself
is not a sufficient signal, as the comment in skb_shared_info makes
clear: gso_segs may be zero, e.g., from dodgy sources.

Also prepare net/bpf/test_run for upcoming BPF_PROG_TEST_RUN tests
of the feature.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200303200503.226217-2-willemdebruijn.kernel@gmail.com

Note: backported without changes to net/bpf/test_run.c

(cherry picked from commit cf62089b0edd7e74a1f474844b4d9f7b5697fb5c)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1f7d1b49e5ac35f18546d468e3847deaae5056ca
2020-07-03 03:33:47 +00:00
Vivek Aknurwar
a98568af0d clk: qcom: gcc-lahaina: Update video_axi clks to clk_branch2_force_off_ops
SMMU fault is observed due to spurious AXI transaction even after
gcc video_axi clocks are disabled. HW underlying may not actually turn off
clocks since HW enable signals can still be asserted/waiting on certain
scenarios like when CVP and MVP both are power collapsed.
Use clk_branch2_force_off_ops to guarantee that clocks are actually
turned off when SW disables them.

Change-Id: I87d62c48b1e24f5d7a8cefe3758e3b2b2b96af59
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2020-07-02 12:43:51 -07:00
Manikandan Mohan
89350cb1a4 cnss2: Add PBL and SBL dump only for QCA6490
Update debug support for PBL and SBL dump on QCA6490 only.

Change-Id: Iedceb40eaead0613a9616d0cbe886bfee1893148
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-07-02 12:23:19 -07:00
Macpaul Lin
42c433c5f7 UPSTREAM: usb: musb: mediatek: add reset FADDR to zero in reset interrupt handle
When receiving reset interrupt, FADDR need to be reset to zero in
peripheral mode. Otherwise ep0 cannot do enumeration when re-plugging USB
cable.

Bug: 158724613
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Acked-by: Min Guo <min.guo@mediatek.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200525025049.3400-5-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 402bcac4b25b520c89ba60db85eb6316f36e797f)
Change-Id: I95ec2486aee1cd4db56f49138cbd781c099fa488
2020-07-02 17:25:19 +00:00
Liangcai Fan
b6aceb5a3e ANDROID: ABI/Whitelist: update symbols of incrementalfs.ko and sprd_*.ko to unisoc whitelist
Update whitelist for the symbols used by the unisoc device and
updates the ABI representation accordingly.

add symbols:
  - devm_of_platform_populate
  - kasprintf
  - strnstr
  - sysfs_create_bin_file
  - sysfs_remove_bin_file
  - of_dev_put
  - sysmbols of incrementalfs.ko

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void of_dev_put(platform_device*)'

Bug: 160255258
Change-Id: I424f6a013af27b6f889eab02aa181185a59f320b
Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-07-02 14:19:21 +02:00
Greg Kroah-Hartman
f7a6f1ef4f ANDROID: GKI: update abi definition now that EHCI driver is built in
This cleans up some of the platform needed symbols a bit more.

Bug: 160193672
Cc: zhang sanshan <pete.zhang@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8cd8eb3cd5043bd9bbef1e63fa43037f2337b35f
2020-07-02 12:39:19 +02:00
Greg Kroah-Hartman
953a6e3225 ANDROID: GKI: support CONFIG_USB_EHCI_HCD_PLATFORM
Everyone really wants either the PCI or Platform EHCI driver, so build
it in so that all boards don't have to select this as well.

Based on a change from zhang sanshan.

Bug: 160193672
Change-Id: Ie2273b5565003f339a7734f579d35b2f8bb4b0b0
Cc: zhang sanshan <pete.zhang@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-07-02 12:16:51 +02:00
zhang sanshan
bdb20ce7a0 ANDROID: GKI: support CONFIG_USB_EHCI_HCD
it use CHIPIDEA usb controller on imx8mm-evk board.
Need enable device/host mode for android device by default.
host mode depend on CONFIG_USB_CHIPIDEA_HOST which need enable CONFIG_USB_EHCI_HCD by default.
CONFIG_USB_EHCI_HCD is used for USB 2.0 "high speed" protocol.

Bug: 160193672
Change-Id: Ic635ae6c12397ed7d2060ab68fec3853fadfa6ec
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-07-02 12:16:46 +02:00
Mao Jinlong
863b645122 byte-cntr: Set offset as rwp offset when sw usb mode start
Set offset as rwp offset when sw usb mode start to avoid the data
transfer delay issue. If use etr_buf offset as initial offset,
there will be interval between rwp offset and initial offset.
Then the delay will happen.

Change-Id: I92b4326a4c38384f68bd0c60f3b487d80b334325
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2020-07-02 16:01:38 +08:00
Manikandan Mohan
88d6f2172b ABI: Update internal whitelist for cnss symbols
Update internal whitelist for cnss_nl and cnss_utils kernel
module export symbols.

Change-Id: Ib3259df553ac6000d84388c725d76530c669eac0
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
2020-07-01 22:00:08 -07:00
Veerabhadrarao Badiganti
d968ddd837 UPSTREAM: mmc: sdhci-msm: Deactivate CQE during SDHC reset
When SDHC gets reset (E.g. in runtime suspend path), CQE also gets
reset and goes to disable state. But s/w state still points it as CQE
is in enabled state. Since s/w and h/w states go out of sync,
it results in s/w request timeout for subsequent CQE requests.

To synchronize CQE s/w and h/w state during SDHC reset,
explicitly deactivate CQE just before SDHC reset.

Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/1583503724-13943-3-git-send-email-vbadigan@codeaurora.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Bug: 158284839
Git-repo: https://android.googlesource.com/kernel/common/
Git-commit: e33d025bf6a34e8cccde9c1e794ec7d05b9c45c6
Change-Id: I41e79bade47ed8c9d1c1804eb5e10ad5453552e3
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-07-02 09:05:42 +05:30
Adrian Hunter
283d847ab8 UPSTREAM: mmc: cqhci: Add cqhci_deactivate()
Host controllers can reset CQHCI either directly or as a consequence of
host controller reset. Add cqhci_deactivate() which puts the CQHCI
driver into a state that is consistent with that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Link: https://lore.kernel.org/r/1583503724-13943-2-git-send-email-vbadigan@codeaurora.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Bug: 158284839
Git-repo: https://android.googlesource.com/kernel/common/
Git-Commit: a94dfc3e8b297efeeb7ae17d7d31c213d54f2d3e
Change-Id: Iaa1feaef3445ada7c8cb657fc662cd3287e6d683
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-07-02 09:04:48 +05:30
Bhaumik Bhatt
b456598ae4 mhi: core: Expose API to check device execution environment
Expose an API for clients to check the device execution
environment by reading the BHI_EXECENV register. This can be
used in situations where the controller decides to check the
state of a device which can abruptly reset without warning.

Change-Id: Ib0841535f8baf7bbdf8e737a816a400ee072ab93
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:40:35 -07:00
Bhaumik Bhatt
6989fadad4 mhi: core: Use high priority workqueue for all MHI work
Boot-up and shutdown require faster scheduling of the PM state
worker. Use the high priority workqueue for processing any of
the PM state transitions to ensure faster boot-up or shutdown
handling on MHI host.

Change-Id: Ie311426344d9561d490aa2bf6616aa30b4333e9a
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:39:37 -07:00
Bhaumik Bhatt
50a54c9ea7 mhi: core: Move to error state as soon as RDDM is detected
To reduce the chances of a race where error conditions may end
up being missed, move MHI to an error detected state before
issuing the RDDM entry callback to the controller.

Change-Id: I1f52a87eb35ba944406ec226be6712f0d186ca11
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:38:28 -07:00
Bhaumik Bhatt
cc96a97351 cnss2: set rddm support boolean for MHI
Set the RDDM support boolean at power up for MHI to know that the
device can enter RDDM execution environment. It can decide to skip
SYS_ERROR handling based on the boolean whereas allow other aspects
such as collection ramdumps if sufficient support is present.

Change-Id: Iee74b6ae61166ea48617e1b75f05841079e1b83b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:31:25 -07:00
Bhaumik Bhatt
e2bb50da93 mhi: core: Move power down check within the RDDM image support
If a controller supports RDDM, there is no need to process a SYS_ERROR.
Hence, we can safely move the power down state check to reside within an
RDDM supported controller as it allows for other controllers to handle
scenarios such as receiving an early SYS_ERROR when in the PBL execution
environment.

Change-Id: I5c63a861b9dd178f5c967bdf252da9c47d3a2b56
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:31:08 -07:00
Bhaumik Bhatt
20aba7d1d7 mhi: core: Separate rddm support and dump collection
As of now, there is no way for MHI to know if device supports RDDM
and host controller wishes to skip ramdump collection. Allow for
that by letting the controller set the rddm support boolean which
indicates device side support. If rddm_size is set to zero while
the support for RDDM is present, that indicates disinterest in
ramdump collection if RDDM execution environment is entered.

Change-Id: I0a36219fc7782951aa1b81b9ec0d182ecfb3a916
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:30:39 -07:00
Bhaumik Bhatt
7eee98e175 mhi: cntrl: qcom: expand debug modes for new device bringup
When bringing up a new device attach to the host driver, MHI
controller can have more than one debug mode to allow for
configurable versions and make it easier to choose firmware
images and allow/disallow forced suspend/resume done to choose
new PHY settings.

Change-Id: Id2ecd98cfbaba40aca96bd167c34bfa5fd03818e
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:56 -07:00
Bhaumik Bhatt
7973005538 mhi: core: move certain logs to controller log buffer
Certain important and less frequently occurring logs can be
moved to controller log buffer to monitor bootup and shutdown.

Change-Id: I602d99adcdf8415e29930867cbcaa62d043deff0
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:41 -07:00
Bhaumik Bhatt
ef5838d49b mhi: cntrl: qcom: move certain logs to controller log buffer
Certain important and less frequently occurring logs can be
moved to controller log buffer to monitor bootup and shutdown.

Change-Id: I26d0ade3562c925ac533c51c6d5613c40a836813
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:23 -07:00
Bhaumik Bhatt
ecac4a2d50 mhi: cntrl: qcom: reduce timesync and bootlogger log buffer size
Much of the IPC log buffer size allocated to the sparsely
used time synchronization is unused and bootlogger is allocated
more than it needs. Reduce the sizes for the same.

Change-Id: I342cd077d00d38a0fb737605e6e43577edc05396
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:29:06 -07:00
Bhaumik Bhatt
938de35a9d mhi: cntrl: qcom: add support for controller ipc logs
Enable support for dedicated bootup and shutdown controller
IPC logs.

Change-Id: I569691d718caa6847bbd992b4d169da569c1d12b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:28:49 -07:00
Bhaumik Bhatt
7b037a401a cnss2: add support for controller IPC logs
Controller IPC logs support bootup and shutdown logs which can
help in easier debug.

Change-Id: I10e37641559473a14a7ebab65562ffcfb9d95ab6
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:28:30 -07:00
Bhaumik Bhatt
aa75fcc7cf mhi: core: add log buffer for controller bootup and shutdown
Add support in the MHI controller for a dedicated bootup and
shutdown log buffer and fix log message macros.

Change-Id: I6425107b9e2a048b44d8912051486d3aaa2abdac
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
2020-07-01 19:27:57 -07:00
Fei Mao
6385fec1b7 input: touchscreen: focaltech_touch: Remove vfs_read()
To request a firmware file by request_firmware() is preferred.

Change-Id: I99d408793a3d52a664828cc35494d740531b0c68
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2020-07-02 10:15:01 +08:00
John Stultz
50cc4e529e ANDROID: Update kabi for db845c (keeping up with ufs-qcom zig-zag)
Updated via the following method:
 $ ./build/abi/bootstrap
 <follow instructions for adding needed path variables>
 $ BUILD_CONFIG=common/build.config.db845c build/build.sh
 $ ./build/abi/extract_symbols out/android-5.4-stable/ --whitelist common/abi_gki_aarch64_db845c_whitelist
 $ BUILD_CONFIG=common/build.config.gki.aarch64 build/build_abi.sh --update --print-report

 ABI DIFFERENCES HAVE BEEN DETECTED! (RC=8)
========================================================
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function const soc_device_attribute* soc_device_match(const soc_device_attribute*)'
  [A] 'function int ufshcd_get_pwr_dev_param(ufs_dev_params*, ufs_pa_layer_attr*, ufs_pa_layer_attr*)'

========================================================

Fixes: ad0c0ab1dc ("ANDROID: GKI: revert part of the ufshcd_* export removals")
Change-Id: Ie9f7f91ffb68982dd01120ca681cdaaa2868f497
Signed-off-by: John Stultz <john.stultz@linaro.org>
2020-07-02 01:56:20 +00:00
Fenglin Wu
0d7ed2e07f input: qcom-hv-haptics: adjust frequency calibration sequence
Adjust following settings in frequency calibration sequence according to
HW recommendation:
 1) Use 50% auto resonance detection error window.
 2) Play for 150 ms before reading the calibration result.

Change-Id: Id43376f6878daedaf98b1d9065a3b0b363314add
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-07-02 09:42:44 +08:00
rbandi
c5106c2c03 HID: qvr: using different dma-buf APIs
Using dma_buf_vmap and dma_buf_vunmap
instead of dma_buf_kmap and dma_buf_kunmap.

Change-Id: I39132b3073141ebb0ac5e2f9f3637a52ed397448
Signed-off-by: rbandi <rohitbandi@codeaurora.org>
2020-07-01 13:35:26 -07:00
Yue Ma
72161038f2 cnss2: Add support to create device sysfs group
Currently CNSS driver creates sysfs nodes from different paths.
Add support to create device sysfs group to consolidate the paths
so that it will be easy to extend in the future.

Change-Id: I9e923288018cad558d3cd591f08f73dcf9c60219
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-07-01 12:50:14 -07:00
Yue Ma
fe4e4f287c abi: Update qcom whitelist with devm_device* APIs
Add devm_device_add_group and devm_device_remove_group to qcom
whitelist to avoid build failure.

Change-Id: I68acc186ec509e2f556019b20cfa370dbd3bab06
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-07-01 12:49:29 -07:00
Alistair Delva
8f89ab60e4 ANDROID: GKI: scripts: Makefile: update the lz4 command (#2)
When the command was switched over from 'lz4c' to 'lz4', it changed the
meaning of '-c' in a subtle way. In the older lz4c tool, this '-cX'
seems to be a different flag, meaning the compression level. In the
newer lz4 tool, it means to compress to stdout. However, since kbuild
already specifies stdout as a file name, '-c' is superfluous, and
generates a warning:

Warning : stdout won't be used ! Do you want multiple input files (-m) ?

Fix it by removing the extra stdout flag.

Bug: 159285792
Bug: 160031736
Test: build/build.sh
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I96247317ccb31f224c6a8e6e453cddde5e0c2550
2020-07-01 19:16:31 +00:00
Hemant Kumar
4e6f18d642 pci: msm: Add support to disable L1SS sleep
Read device tree property qcom,l1ss-sleep-disable
to prevent sending L1SS sleep enable and disable
rpmsg to DRV processor. This support is added to
prevent PCIe link down caused due to manually
operating phy PLL.

Change-Id: I2f96f3dc186d3af0ffad110807204936af58814a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-07-01 12:02:06 -07:00
Greg Kroah-Hartman
a200ad52ff Linux 5.4.50
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAl77nuMACgkQ3qZv95d3
 LNw0EA//UhQOd/8ZlP33Iis58gUfuGU9sWmej6A8Tio2gdkG4g2c/dQjbxrMQT8b
 Vr1DJCthisT7pBJpQbhejwsfl5qRsrjBYFyUomCjeM8/0fF0+8JX0tSXX0/JM5Bg
 vOE4tV/kga+c5cbOD/FbLGH0vX4j20BnGXjHb9hyWY/gVp2gEcRzO3Ou0shZCXKJ
 9NnhNB2gIm7BCRgz+cClPmZQjG59WazJu9I/Fk58ojdOp+E5gFibyBoeOylGR/W/
 tjRm3Sz6D3uF0RSpGfAilqt2duwfjHTh0LxWlBX9C4OBWdJjYh1uUZ24tTvjxnCm
 lbgL4BbkOsVMp02jWhDDCe+pEPfT7EpLD6USivj8XFDLh8FK0eoaRQZRQ/hGK/Yj
 ZmVJRzNavf3xbz72Hz6aHdHmaxp180P8X8KtRDLT4ik+Kkf8gJVps3T5wTR9C60R
 htFVTDxEF+jE/EUCRh3sD4MrV114lpoJ5LlTPzJ87WCMHMjTZ8As/Ty/PLPg7KO6
 ngI3y72cnvW/UfLPmdtaLx40gzEAYnw9+E30ebyKU6b8kY5idhuzd0AZnidsmeZa
 CzmZFZSCqqMO9vLo24VKxfKk3ufRiHxDU/nHqdGgOG18RlCmhWD0GXamsmeku3PB
 1et/jXilpW9aIp/BJozeOdlGr82otk/4Ss+z/RtvvIkTbppgXlY=
 =6X7m
 -----END PGP SIGNATURE-----

Merge 5.4.50 into android-5.4-stable

Changes in 5.4.50
	block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed
	enetc: Fix tx rings bitmap iteration range, irq handling
	geneve: allow changing DF behavior after creation
	ibmveth: Fix max MTU limit
	mld: fix memory leak in ipv6_mc_destroy_dev()
	mvpp2: ethtool rxtx stats fix
	net: bridge: enfore alignment for ethernet address
	net: core: reduce recursion limit value
	net: Do not clear the sock TX queue in sk_set_socket()
	net: fix memleak in register_netdevice()
	net: Fix the arp error in some cases
	net: increment xmit_recursion level in dev_direct_xmit()
	net: usb: ax88179_178a: fix packet alignment padding
	openvswitch: take into account de-fragmentation/gso_size in execute_check_pkt_len
	rocker: fix incorrect error handling in dma_rings_init
	rxrpc: Fix notification call on completion of discarded calls
	sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
	tcp: don't ignore ECN CWR on pure ACK
	tcp: grow window for OOO packets only for SACK flows
	tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
	ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()
	net: phy: Check harder for errors in get_phy_id()
	ip_tunnel: fix use-after-free in ip_tunnel_lookup()
	sch_cake: don't try to reallocate or unshare skb unconditionally
	sch_cake: don't call diffserv parsing code when it is not needed
	sch_cake: fix a few style nits
	tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT
	Revert "i2c: tegra: Fix suspending in active runtime PM state"
	btrfs: fix a block group ref counter leak after failure to remove block group
	net: sched: export __netdev_watchdog_up()
	fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
	ALSA: usb-audio: Fix potential use-after-free of streams
	binder: fix null deref of proc->context
	USB: ohci-sm501: Add missed iounmap() in remove
	usb: dwc2: Postponed gadget registration to the udc class driver
	usb: add USB_QUIRK_DELAY_INIT for Logitech C922
	USB: ehci: reopen solution for Synopsys HC bug
	usb: host: xhci-mtk: avoid runtime suspend when removing hcd
	xhci: Poll for U0 after disabling USB2 LPM
	usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
	usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs
	ALSA: usb-audio: Add implicit feedback quirk for SSL2+.
	ALSA: usb-audio: add quirk for Denon DCD-1500RE
	ALSA: usb-audio: add quirk for Samsung USBC Headset (AKG)
	ALSA: usb-audio: Fix OOB access of mixer element list
	usb: cdns3: trace: using correct dir value
	usb: cdns3: ep0: fix the test mode set incorrectly
	usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
	scsi: qla2xxx: Keep initiator ports after RSCN
	scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action
	cifs: Fix cached_fid refcnt leak in open_shroot
	cifs/smb3: Fix data inconsistent when punch hole
	cifs/smb3: Fix data inconsistent when zero file range
	xhci: Fix incorrect EP_STATE_MASK
	xhci: Fix enumeration issue when setting max packet size for FS devices.
	xhci: Return if xHCI doesn't support LPM
	cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
	loop: replace kill_bdev with invalidate_bdev
	IB/mad: Fix use after free when destroying MAD agent
	IB/hfi1: Fix module use count flaw due to leftover module put calls
	bus: ti-sysc: Flush posted write on enable and disable
	bus: ti-sysc: Ignore clockactivity unless specified as a quirk
	ARM: OMAP2+: Fix legacy mode dss_reset
	xfrm: Fix double ESP trailer insertion in IPsec crypto offload.
	ASoC: q6asm: handle EOS correctly
	efi/tpm: Verify event log header before parsing
	efi/esrt: Fix reference count leak in esre_create_sysfs_entry.
	ASoc: q6afe: add support to get port direction
	ASoC: qcom: common: set correct directions for dailinks
	regualtor: pfuze100: correct sw1a/sw2 on pfuze3000
	RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
	ASoC: fsl_ssi: Fix bclk calculation for mono channel
	samples/bpf: xdp_redirect_cpu: Set MAX_CPUS according to NR_CPUS
	bpf, xdp, samples: Fix null pointer dereference in *_user code
	ARM: dts: am335x-pocketbeagle: Fix mmc0 Write Protect
	ARM: dts: Fix duovero smsc interrupt for suspend
	x86/resctrl: Fix a NULL vs IS_ERR() static checker warning in rdt_cdp_peer_get()
	regmap: Fix memory leak from regmap_register_patch
	devmap: Use bpf_map_area_alloc() for allocating hash buckets
	bpf: Don't return EINVAL from {get,set}sockopt when optlen > PAGE_SIZE
	ARM: dts: NSP: Correct FA2 mailbox node
	rxrpc: Fix handling of rwind from an ACK packet
	RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq
	RDMA/qedr: Fix KASAN: use-after-free in ucma_event_handler+0x532
	RDMA/cma: Protect bind_list and listen_list while finding matching cm id
	ASoC: rockchip: Fix a reference count leak.
	s390/qeth: fix error handling for isolation mode cmds
	RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
	selftests/net: report etf errors correctly
	iommu/vt-d: Enable PCI ACS for platform opt in hint
	iommu/vt-d: Update scalable mode paging structure coherency
	net: qed: fix left elements count calculation
	net: qed: fix async event callbacks unregistering
	net: qede: stop adding events on an already destroyed workqueue
	net: qed: fix NVMe login fails over VFs
	net: qed: fix excessive QM ILT lines consumption
	net: qede: fix PTP initialization on recovery
	net: qede: fix use-after-free on recovery and AER handling
	cxgb4: move handling L2T ARP failures to caller
	ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
	scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
	usb: gadget: udc: Potential Oops in error handling code
	usb: renesas_usbhs: getting residue from callback_result
	nvme: don't protect ns mutation with ns->head->lock
	netfilter: ipset: fix unaligned atomic access
	net: bcmgenet: use hardware padding of runt frames
	clk: sifive: allocate sufficient memory for struct __prci_data
	i2c: fsi: Fix the port number field in status register
	i2c: core: check returned size of emulated smbus block read
	afs: Fix storage of cell names
	sched/deadline: Initialize ->dl_boosted
	sched/core: Fix PI boosting between RT and DEADLINE tasks
	sata_rcar: handle pm_runtime_get_sync failure cases
	ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
	drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp()
	riscv/atomic: Fix sign extension for RV64I
	hwrng: ks-sa - Fix runtime PM imbalance on error
	ibmvnic: Harden device login requests
	net: alx: fix race condition in alx_remove
	test_objagg: Fix potential memory leak in error handling
	pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage
	pinctrl: tegra: Use noirq suspend/resume callbacks
	s390/ptrace: pass invalid syscall numbers to tracing
	s390/ptrace: fix setting syscall number
	s390/vdso: Use $(LD) instead of $(CC) to link vDSO
	s390/vdso: fix vDSO clock_getres()
	arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n
	kbuild: improve cc-option to clean up all temporary files
	recordmcount: support >64k sections
	kprobes: Suppress the suspicious RCU warning on kprobes
	blktrace: break out of blktrace setup on concurrent calls
	block: update hctx map when use multiple maps
	RISC-V: Don't allow write+exec only page mapping request in mmap
	ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table
	ALSA: hda/realtek - Add quirk for MSI GE63 laptop
	ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems
	ACPI: sysfs: Fix pm_profile_attr type
	ACPI: configfs: Disallow loading ACPI tables when locked down
	erofs: fix partially uninitialized misuse in z_erofs_onlinepage_fixup
	KVM: X86: Fix MSR range of APIC registers in X2APIC mode
	KVM: nVMX: Plumb L2 GPA through to PML emulation
	KVM: VMX: Stop context switching MSR_IA32_UMWAIT_CONTROL
	x86/cpu: Use pinning mask for CR4 bits needing to be 0
	x86/asm/64: Align start of __clear_user() loop to 16-bytes
	btrfs: fix bytes_may_use underflow when running balance and scrub in parallel
	btrfs: fix data block group relocation failure due to concurrent scrub
	btrfs: check if a log root exists before locking the log_mutex on unlink
	btrfs: fix failure of RWF_NOWAIT write into prealloc extent beyond eof
	mm/slab: use memzero_explicit() in kzfree()
	ocfs2: avoid inode removal while nfsd is accessing it
	ocfs2: load global_inode_alloc
	ocfs2: fix value of OCFS2_INVALID_SLOT
	ocfs2: fix panic on nfs server over ocfs2
	mm/memcontrol.c: add missed css_put()
	arm64: perf: Report the PC value in REGS_ABI_32 mode
	arm64: dts: imx8mm-evk: correct ldo1/ldo2 voltage range
	arm64: dts: imx8mn-ddr4-evk: correct ldo1/ldo2 voltage range
	tracing: Fix event trigger to accept redundant spaces
	ring-buffer: Zero out time extend if it is nested and not absolute
	drm/amd: fix potential memleak in err branch
	drm: rcar-du: Fix build error
	drm/radeon: fix fb_div check in ni_init_smc_spll_table()
	drm/amdgpu: add fw release for sdma v5_0
	Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()
	sunrpc: fixed rollback in rpc_gssd_dummy_populate()
	SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
	pNFS/flexfiles: Fix list corruption if the mirror count changes
	NFSv4 fix CLOSE not waiting for direct IO compeletion
	xprtrdma: Fix handling of RDMA_ERROR replies
	dm writecache: correct uncommitted_block when discarding uncommitted entry
	dm writecache: add cond_resched to loop in persistent_memory_claim()
	xfs: add agf freeblocks verify in xfs_agf_verify
	Revert "tty: hvc: Fix data abort due to race in hvc_open"
	Linux 5.4.50

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3bfeaba86876d3c2f91979d3e98d894a2b70fe1a
2020-07-01 12:46:09 +02:00
Bao D. Nguyen
40d7d6b3ab scsi: ufs: Read device tree to find UFS's Vcc voltage level
This change allows selecting the UFS Vcc voltage level by setting the
UFS's entry vcc-voltage-level in the device tree.
If UFS's Vcc voltage level setting is not found in the device tree,
use default values provided by the driver.

Change-Id: Ifc6856d63b672ed6b178f45fd5f139cb2fa56f15
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
2020-06-30 15:15:32 -07:00
Sasha Levin
e75220890b Linux 5.4.50
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 16:21:55 -04:00
Greg Kroah-Hartman
a160afebd7 Revert "tty: hvc: Fix data abort due to race in hvc_open"
commit cf9c94456ebafc6d75a834e58dfdc8ae71a3acbc upstream.

This reverts commit e2bd1dcbe1aa34ff5570b3427c530e4332ecf0fe.

In discussion on the mailing list, it has been determined that this is
not the correct type of fix for this issue.  Revert it so that we can do
this correctly.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200428032601.22127-1-rananta@codeaurora.org
Cc: Raghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:13 -04:00
Zheng Bin
ffd40b7962 xfs: add agf freeblocks verify in xfs_agf_verify
[ Upstream commit d0c7feaf87678371c2c09b3709400be416b2dc62 ]

We recently used fuzz(hydra) to test XFS and automatically generate
tmp.img(XFS v5 format, but some metadata is wrong)

xfs_repair information(just one AG):
agf_freeblks 0, counted 3224 in ag 0
agf_longest 536874136, counted 3224 in ag 0
sb_fdblocks 613, counted 3228

Test as follows:
mount tmp.img tmpdir
cp file1M tmpdir
sync

In 4.19-stable, sync will stuck, the reason is:
xfs_mountfs
  xfs_check_summary_counts
    if ((!xfs_sb_version_haslazysbcount(&mp->m_sb) ||
       XFS_LAST_UNMOUNT_WAS_CLEAN(mp)) &&
       !xfs_fs_has_sickness(mp, XFS_SICK_FS_COUNTERS))
	return 0;  -->just return, incore sb_fdblocks still be 613
    xfs_initialize_perag_data

cp file1M tmpdir -->ok(write file to pagecache)
sync -->stuck(write pagecache to disk)
xfs_map_blocks
  xfs_iomap_write_allocate
    while (count_fsb != 0) {
      nimaps = 0;
      while (nimaps == 0) { --> endless loop
         nimaps = 1;
         xfs_bmapi_write(..., &nimaps) --> nimaps becomes 0 again
xfs_bmapi_write
  xfs_bmap_alloc
    xfs_bmap_btalloc
      xfs_alloc_vextent
        xfs_alloc_fix_freelist
          xfs_alloc_space_available -->fail(agf_freeblks is 0)

In linux-next, sync not stuck, cause commit c2b3164320 ("xfs:
use the latest extent at writeback delalloc conversion time") remove
the above while, dmesg is as follows:
[   55.250114] XFS (loop0): page discard on page ffffea0008bc7380, inode 0x1b0c, offset 0.

Users do not know why this page is discard, the better soultion is:
1. Like xfs_repair, make sure sb_fdblocks is equal to counted
(xfs_initialize_perag_data did this, who is not called at this mount)
2. Add agf verify, if fail, will tell users to repair

This patch use the second soultion.

Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Signed-off-by: Ren Xudong <renxudong1@huawei.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:37:13 -04:00
Mikulas Patocka
cc66553004 dm writecache: add cond_resched to loop in persistent_memory_claim()
commit d35bd764e6899a7bea71958f08d16cea5bfa1919 upstream.

Add cond_resched() to a loop that fills in the mapper memory area
because the loop can be executed many times.

Fixes: 48debafe4f ("dm: add writecache target")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Huaisheng Ye
a51e71cbf6 dm writecache: correct uncommitted_block when discarding uncommitted entry
commit 39495b12ef1cf602e6abd350dce2ef4199906531 upstream.

When uncommitted entry has been discarded, correct wc->uncommitted_block
for getting the exact number.

Fixes: 48debafe4f ("dm: add writecache target")
Cc: stable@vger.kernel.org
Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Chuck Lever
de1d70dad6 xprtrdma: Fix handling of RDMA_ERROR replies
commit 7b2182ec381f8ea15c7eb1266d6b5d7da620ad93 upstream.

The RPC client currently doesn't handle ERR_CHUNK replies correctly.
rpcrdma_complete_rqst() incorrectly passes a negative number to
xprt_complete_rqst() as the number of bytes copied. Instead, set
task->tk_status to the error value, and return zero bytes copied.

In these cases, return -EIO rather than -EREMOTEIO. The RPC client's
finite state machine doesn't know what to do with -EREMOTEIO.

Additional clean ups:
- Don't double-count RDMA_ERROR replies
- Remove a stale comment

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@kernel.vger.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Olga Kornievskaia
4d35ca872a NFSv4 fix CLOSE not waiting for direct IO compeletion
commit d03727b248d0dae6199569a8d7b629a681154633 upstream.

Figuring out the root case for the REMOVE/CLOSE race and
suggesting the solution was done by Neil Brown.

Currently what happens is that direct IO calls hold a reference
on the open context which is decremented as an asynchronous task
in the nfs_direct_complete(). Before reference is decremented,
control is returned to the application which is free to close the
file. When close is being processed, it decrements its reference
on the open_context but since directIO still holds one, it doesn't
sent a close on the wire. It returns control to the application
which is free to do other operations. For instance, it can delete a
file. Direct IO is finally releasing its reference and triggering
an asynchronous close. Which races with the REMOVE. On the server,
REMOVE can be processed before the CLOSE, failing the REMOVE with
EACCES as the file is still opened.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Suggested-by: Neil Brown <neilb@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Trond Myklebust
02917bef8f pNFS/flexfiles: Fix list corruption if the mirror count changes
commit 8b04013737341442ed914b336cde866b902664ae upstream.

If the mirror count changes in the new layout we pick up inside
ff_layout_pg_init_write(), then we can end up adding the
request to the wrong mirror and corrupting the mirror->pg_list.

Fixes: d600ad1f2b ("NFS41: pop some layoutget errors to application")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Chuck Lever
7b99577ff3 SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
commit 89a3c9f5b9f0bcaa9aea3e8b2a616fcaea9aad78 upstream.

@subbuf is an output parameter of xdr_buf_subsegment(). A survey of
call sites shows that @subbuf is always uninitialized before
xdr_buf_segment() is invoked by callers.

There are some execution paths through xdr_buf_subsegment() that do
not set all of the fields in @subbuf, leaving some pointer fields
containing garbage addresses. Subsequent processing of that buffer
then results in a page fault.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:12 -04:00
Vasily Averin
c27d205baa sunrpc: fixed rollback in rpc_gssd_dummy_populate()
commit b7ade38165ca0001c5a3bd5314a314abbbfbb1b7 upstream.

__rpc_depopulate(gssd_dentry) was lost on error path

cc: stable@vger.kernel.org
Fixes: commit 4b9a445e3e ("sunrpc: create a new dummy pipe for gssd to hold open")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:37:11 -04:00