summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-25drm/amdgpu: fix the coverage issue to clear ArcVPGRsDennis Li
Set ComputePGMRSRC1.VGPRS as 0x3f to clear all ArcVGPRs. Signed-off-by: Dennis Li <Dennis.Li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-03-25drm/amd/display: Fix pageflip event race condition for DCN.Mario Kleiner
Commit '16f17eda8bad ("drm/amd/display: Send vblank and user events at vsartup for DCN")' introduces a new way of pageflip completion handling for DCN, and some trouble. The current implementation introduces a race condition, which can cause pageflip completion events to be sent out one vblank too early, thereby confusing userspace and causing flicker: prepare_flip_isr(): 1. Pageflip programming takes the ddev->event_lock. 2. Sets acrtc->pflip_status == AMDGPU_FLIP_SUBMITTED 3. Releases ddev->event_lock. --> Deadline for surface address regs double-buffering passes on target pipe. 4. dc_commit_updates_for_stream() MMIO programs the new pageflip into hw, but too late for current vblank. => pflip_status == AMDGPU_FLIP_SUBMITTED, but flip won't complete in current vblank due to missing the double-buffering deadline by a tiny bit. 5. VSTARTUP trigger point in vblank is reached, VSTARTUP irq fires, dm_dcn_crtc_high_irq() gets called. 6. Detects pflip_status == AMDGPU_FLIP_SUBMITTED and assumes the pageflip has been completed/will complete in this vblank and sends out pageflip completion event to userspace and resets pflip_status = AMDGPU_FLIP_NONE. => Flip completion event sent out one vblank too early. This behaviour has been observed during my testing with measurement hardware a couple of time. The commit message says that the extra flip event code was added to dm_dcn_crtc_high_irq() to prevent missing to send out pageflip events in case the pflip irq doesn't fire, because the "DCH HUBP" component is clock gated and doesn't fire pflip irqs in that state. Also that this clock gating may happen if no planes are active. This suggests that the problem addressed by that commit can't happen if planes are active. The proposed solution is therefore to only execute the extra pflip completion code iff the count of active planes is zero and otherwise leave pflip completion handling to the pflip irq handler, for a more race-free experience. Note that i don't know if this fixes the problem the original commit tried to address, as i don't know what the test scenario was. It does fix the observed too early pageflip events though and points out the problem introduced. Fixes: 16f17eda8bad ("drm/amd/display: Send vblank and user events at vsartup for DCN") Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-03-25drm/[radeon|amdgpu]: Remove HAINAN board from max_sclk override checkYassine Oudjana
Works stable without the overrides. Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-03-25Revert "drm/amdgpu: add CAP fw loading"Zhigang Luo
This reverts commit 29e2501f8a64fa2fa8f6fe4be53cce5a5a4fe79f. Signed-off-by: Zhigang Luo <zhigang.luo@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-03-25Merge tag 'v5.7-rockchip-dts32-1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Improvements for the rk3288-vyasa board and a lot of cleanups from verifying devicetrees against new yaml bindings. * tag 'v5.7-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (25 commits) ARM: dts: rockchip: remove #address-cells and #size-cells from i2s nodes ARM: dts: rockchip: swap clocks and clock-names values for i2s nodes ARM: dts: rockchip: remove clock-names property from 'generic-ohci' nodes ARM: dts: rockchip: remove clock-names property from 'generic-ehci' nodes ARM: dts: rockchip: swap clocks and clock-names values for spdif nodes ARM: dts: rockchip: Keep rk3288-tinker SD card IO powered during reboot ARM: dts: rockchip: remove clock-frequency from saradc node rv1108 ARM: dts: rockchip: fix vref-supply for &saradc node rk3288 firefly reload ARM: dts: rockchip: use DMA channels for UARTs for RK3288 ARM: dts: rockchip: rk3xxx: fix L2 cache-controller nodename ARM: dts: rockchip: fix lvds-encoder ports subnode for rk3188-bqedison2qc ARM: dts: add bus to rockchip amba nodenames ARM: dts: rockchip: remove #dma-cells from dma client nodes for rv1108 ARM: dts: rockchip: fix rockchip,default-sample-phase property names ARM: dts: rockchip: fix vqmmc-supply property name for rk3188-bqedison2qc dt-bindings: arm: add Rockchip rk3036-evb board dt-bindings: arm: fix Rockchip Kylin board bindings ARM: dts: rockchip: add missing model properties ARM: dts: rockchip: Add vcc50_hdmi for rk3288-vyasa ARM: dts: rockchip: Fix ddc-i2c-bus for rk3288-vyasa ... Link: https://lore.kernel.org/r/7846023.TtVhTo4ACP@phil Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netLinus Torvalds
Pull networking fixes from David Miller: 1) Fix deadlock in bpf_send_signal() from Yonghong Song. 2) Fix off by one in kTLS offload of mlx5, from Tariq Toukan. 3) Add missing locking in iwlwifi mvm code, from Avraham Stern. 4) Fix MSG_WAITALL handling in rxrpc, from David Howells. 5) Need to hold RTNL mutex in tcindex_partial_destroy_work(), from Cong Wang. 6) Fix producer race condition in AF_PACKET, from Willem de Bruijn. 7) cls_route removes the wrong filter during change operations, from Cong Wang. 8) Reject unrecognized request flags in ethtool netlink code, from Michal Kubecek. 9) Need to keep MAC in reset until PHY is up in bcmgenet driver, from Doug Berger. 10) Don't leak ct zone template in act_ct during replace, from Paul Blakey. 11) Fix flushing of offloaded netfilter flowtable flows, also from Paul Blakey. 12) Fix throughput drop during tx backpressure in cxgb4, from Rahul Lakkireddy. 13) Don't let a non-NULL skb->dev leave the TCP stack, from Eric Dumazet. 14) TCP_QUEUE_SEQ socket option has to update tp->copied_seq as well, also from Eric Dumazet. 15) Restrict macsec to ethernet devices, from Willem de Bruijn. 16) Fix reference leak in some ethtool *_SET handlers, from Michal Kubecek. 17) Fix accidental disabling of MSI for some r8169 chips, from Heiner Kallweit. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (138 commits) net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build net: ena: Add PCI shutdown handler to allow safe kexec selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED selftests/net: add missing tests to Makefile r8169: re-enable MSI on RTL8168c net: phy: mdio-bcm-unimac: Fix clock handling cxgb4/ptp: pass the sign of offset delta in FW CMD net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop net: cbs: Fix software cbs to consider packet sending time net/mlx5e: Do not recover from a non-fatal syndrome net/mlx5e: Fix ICOSQ recovery flow with Striding RQ net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset net/mlx5e: Enhance ICOSQ WQE info fields net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure selftests: netfilter: add nfqueue test case netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress netfilter: nft_fwd_netdev: validate family and chain type netfilter: nft_set_rbtree: Detect partial overlaps on insertion netfilter: nft_set_rbtree: Introduce and use nft_rbtree_interval_start() netfilter: nft_set_pipapo: Separate partial and complete overlap cases on insertion ...
2020-03-25Merge tag 'gpio-v5.6-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - One core quirk by myself to fix the .irq_disable() semantics when the gpiolib core takes over this callback. - The rest is an elaborate series of four patches fixing Intel laptop ACPI wakeup quirks. * tag 'gpio-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk gpiolib: Fix irq_disable() semantics
2020-03-25Merge tag 'samsung-dt-5.7' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.7 1. Various fixes: - Reboot of some Odroid Exynos4412-based boards, - MMC regulators on Arndale5250, - Memory mapping on Artik5, - GPU power domain on Exynos542x boards, - LCD SPI polarity on UniversalC210, 2. Add thermal cooling of GPU on Odroid XU3/XU4 family, 3. Add dynamic-power-coefficient to Exynos5422 for energy model. * tag 'samsung-dt-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Fix polarity of the LCD SPI bus on UniversalC210 board ARM: dts: exynos: Fix G3D power domain supply on Arndale Octa boards ARM: dts: exynos: Fix G3D power domain supply on Odroid XU3/XU4/HC1 boards ARM: dts: exynos: Fix memory on Artik5 evaluation boards ARM: dts: exynos: Make fixed regulators always-on on Arndale5250 ARM: dts: exynos: Fix MMC regulator on Arndale5250 board ARM: dts: exynos: Add dynamic-power-coefficient to Exynos5422 CPUs ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1 ARM: dts: exynos: Fix broken reboot on some Odroid U2/X2/U3 boards Link: https://lore.kernel.org/r/20200316175652.5604-3-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'ux500-dts-v5.7' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt Ux500 DTS updates for the v5.7 kernel: - Fix some DSI nodes - Add GT-S7710 DTS file * tag 'ux500-dts-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: Add devicetree for Samsung GT-S7710 ARM: dts: ux500: Fix up DSI controller nodes Link: https://lore.kernel.org/r/CACRpkdb8T9CZYvYEFYnQTOMoXGsn43N8TgKfvoJZjTwRHW6zhQ@mail.gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'mvebu-dt64-5.7-1' of git://git.infradead.org/linux-mvebu into arm/dtArnd Bergmann
mvebu dt64 for 5.7 (part 1) Improve network support on two Armada 8040 based board: Clearfog GT 8 and Macchiatobin. Add ethernet alias on Espressobin for U-Boot support. Fix various dt compilation issue or warning. * tag 'mvebu-dt64-5.7-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: Fix cpu compatible for AP807-quad arm64: dts: marvell: fix non-existed cpu referrence in armada-ap806-dual.dtsi arm64: dts: marvell: build ESPRESSObin variants arm64: dts: marvell: espressobin: indicate dts version arm64: dts: marvell: espressobin: add ethernet alias arm64: dts: mcbin: support 2W SFP modules arm64: dts: clearfog-gt-8k: set gigabit PHY reset deassert delay Link: https://lore.kernel.org/r/87h7yqx7w2.fsf@FE-laptop Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'tegra-for-5.7-arm64-dt' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.7-rc1 These changes add support for the XUSB pad controller, as well as the XUSB controller on Tegra194. Furthermore, USB device mode is supported across Tegra210 and Tegra186 boards. PCIe endpoint mode support is added for the Jetson AGX Xavier platform. Various minor fixes eliminate warnings on boot related to missing power supplies for some devices. * tag 'tegra-for-5.7-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Add support for PCIe endpoint mode in P2972-0000 platform arm64: tegra: Add PCIe endpoint controllers nodes for Tegra194 arm64: tegra: Add ethernet alias on Jetson TX1 arm64: tegra: Populate LP8557 backlight regulator arm64: tegra: Fix Tegra186 SOR supply arm64: tegra: Add EEPROM supplies arm64: tegra: Enable I2C controller for EEPROM arm64: tegra: smaug: Change clk_out_2 provider to PMC arm64: tegra: Add clock-cells property to Tegra PMC node arm64: tegra: Enable XUDC node on Jetson Nano arm64: tegra: Update OTG port entries for Jetson Nano arm64: tegra: Enable XUDC node on Jetson TX2 arm64: tegra: Add XUDC node for Tegra186 arm64: tegra: Enable XUDC on Jetson TX1 arm64: tegra: Add XUDC node for Tegra210 arm64: tegra: Update OTG port entries for Jetson TX2 arm64: tegra: Update OTG port entries for Jetson TX1 arm64: tegra: Enable XUSB host in P2972-0000 board arm64: tegra: Add XUSB and pad controller on Tegra194 arm64: tegra: Fix Tegra194 PCIe compatible string Link: https://lore.kernel.org/r/20200313165848.2915133-8-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'tegra-for-5.7-arm-dt' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.7-rc1 Minor fixes and additions for 32-bit Tegra SoC device trees. * tag 'tegra-for-5.7-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Update sound node clocks in device tree ARM: tegra: Add clock-cells property to PMC ARM: tegra: Remove USB 2-0 port from Jetson TK1 padctl Link: https://lore.kernel.org/r/20200313165848.2915133-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'tegra-for-5.7-dt-bindings' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.7-rc1 New IDs are added for clocks that are controlled by the PMC. This replaces older IDs that were erroneously provided by the clock and reset controller. This also adds device tree bindings for XUSB pad controller support on Tegra194 as well as USB role switching on NVIDIA Tegra SoCs. * tag 'tegra-for-5.7-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding dt-bindings: phy: tegra-xusb: Add usb-role-switch dt-bindings: phy: tegra: Add Tegra194 support dt-bindings: soc: tegra-pmc: Add ID for Tegra PMC 32 kHz blink clock dt-bindings: soc: tegra-pmc: Add Tegra PMC clock bindings dt-bindings: tegra: Convert Tegra PMC bindings to YAML dt-bindings: clock: tegra: Add IDs for OSC clocks Link: https://lore.kernel.org/r/20200313165848.2915133-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'stm32-dt-for-v5.7-1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.3, round 1 Highlights: ---------- - Add support for DH Electronics DHCOM SoM and PDK2 rev. 400 carrier board. It is based on stm32mp157c SoC. - Add OTG full support on stm32mp15. - Fix issues seen during yaml validation on stpmic and stmfx. - Add i2c power/wakeup support on stm32mp15. - Add card detect on sdcard on stm32mp boards * tag 'stm32-dt-for-v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (25 commits) ARM: dts: stm32: use correct vqmmc regu for eMMC on stm32mp1 ED1/EV1 boards ARM: dts: stm32: add disable-wp property for SD-card on STM32MP1 boards ARM: dts: stm32: add cd-gpios properties for SD-cards on STM32MP1 boards ARM: dts: stm32: Do clean up in stmpic nodes on stm32mp15 boards ARM: dts: stm32: Rename stmfx joystick pins on stm32mp157c-ev1 ARM: dts: stm32: add cpu clock-frequency property on stm32mp15x ARM: dts: stm32: add wakeup-source in all I2C nodes of stm32mp157c ARM: dts: stm32: add i2c4 sleep pinctrl on stm32mp157c-ed1 ARM: dts: stm32: add i2c2/i2c5 sleep pinctrl on stm32mp157c-ev1 ARM: dts: stm32: add i2c4 sleep pinctrl on stm32mp15xx-dkx ARM: dts: stm32: set i2c4 bus freq to 400KHz on stm32mp15 DK boards ARM: dts: stm32: set i2c4 bus freq to 400KHz on stm32mp157c-ed1 ARM: dts: stm32: Correct stmfx node name on stm32mp157c-ev1 board ARM: dts: stm32: Correct stmfx node name on stm32746g-eval board ARM: dts: stm32: add resets property on all DMA nodes on stm32mp151 ARM: dts: stm32: enable USB OTG Dual Role on stm32mp157c-ev1 ARM: dts: stm32: add USB OTG pinctrl to stm32mp15 ARM: dts: stm32: add USB OTG full support on stm32mp151 ARM: dts: stm32: remove useless properties in stm32mp157a-avenger96 stmpic node ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board ... Link: https://lore.kernel.org/r/ded09d01-df47-9572-4679-34669bff8916@st.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'renesas-dt-bindings-for-v5.7-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.7 - Document support for the M3ULCB board with R-Car M3-W+. * tag 'renesas-dt-bindings-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: arm: renesas: Add M3ULCB with R-Car M3-W+ Link: https://lore.kernel.org/r/20200313154304.1636-4-geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'renesas-arm64-dt-for-v5.7-tag2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM64 DT updates for v5.7 (take two) - Thermal support for R-Car M3-W+, - Support for the M3ULCB board with R-Car M3-W+, - CPUIdle support for R-Car M3-N and E3, - Display support for the HiHope RZ/G2M board, - A minor fix. * tag 'renesas-arm64-dt-for-v5.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Add HiHope RZ/G2M board with idk-1110wr display arm64: dts: renesas: r8a77990: Add CPUIdle support for CA53 cores arm64: dts: renesas: r8a77965: Add CPUIdle support for CA57 cores arm64: dts: renesas: r8a77961: salvator-xs: Fix memory unit-address arm64: dts: renesas: Add support for M3ULCB with R-Car M3-W+ arm64: dts: renesas: r8a77961: Add thermal nodes Link: https://lore.kernel.org/r/20200313154304.1636-3-geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'renesas-arm-dt-for-v5.7-tag2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.7 (take two) - LCD/touchscreen support for the iwg22d-sodimm board. * tag 'renesas-arm-dt-for-v5.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: iwg22d-sodimm: Enable touchscreen ARM: dts: iwg22d-sodimm: Enable LCD panel Link: https://lore.kernel.org/r/20200313154304.1636-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'sunxi-dt-for-5.7' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Allwinner Device Tree Changes for v5.7 A fairly large set of changes for v5.7, including some new devices. SoC specific changes: - SPI on H6 SoC enabled - Thermal sensor on R40 SoC enabled - Deinterlace core hardware on A64 SoC enabled - Redundant assigned-clocks properties removed - required clock rates are now enforced by drivers - LVDS panel support on A20 SoC enabled - PMU compatible fixed for H5 and H6 SoCs - Thermal trip points added for A83T and H5 SoCs - (Image) Rotation core hardware on A83T and A64 SoCs enabled Device specific changes: - Pine64 PineTab and PinePhone added - Various cleanups and improvements for Pine64 PineBook - GPIO pin bank regulator supplies added for A64-OlinXino - eMMC enabled on Orange Pi 3 - PocketBook Touch Lux 3 added - Linutronix Testbox v2 added - Ethernet enabled on Orange Pi One Plus - HDMI enabled on H6-based Orange Pi boards * tag 'sunxi-dt-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (46 commits) arm64: dts: allwinner: a64: add node for rotation core ARM: dts: sun8i: a83t: Add device node for rotation core arm64: dts: allwinner: a64: Fix display clock register range ARM: dts: sunxi: Fix DE2 clocks register range arm64: dts: allwinner: h6: orangepi: Enable HDMI arm64: dts: allwinner: h6: orangepi-one-plus: Enable ethernet arm64: dts: allwinner: h6: Move ext. oscillator to board DTs arm64: dts: allwinner: Add initial support for Pine64 PinePhone dt-bindings: arm: sunxi: Add PinePhone 1.0 and 1.1 bindings arm64: dts: sun50i-a64: Add i2c2 pins ARM: dts: sunxi: h3/h5: add r_pwm node arm64: allwinner: a64: enable LCD-related hardware for Pinebook ARM: dts: sun8i-a83t: Add thermal trip points/cooling maps ARM: dts: sun8i-h3: Add thermal trip points/cooling maps arm64: dts: allwinner: h6: Fix PMU compatible arm64: dts: allwinner: h5: Fix PMU compatible ARM: dts: sun8i-a83t-tbs-a711: Drop superfluous dr_mode arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator ARM: dts: sun5i: Add PocketBook Touch Lux 3 support dt-bindings: arm: sunxi: Add PocketBook Touch Lux 3 ... Link: https://lore.kernel.org/r/20200313055459.GA19820@wens.csie.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'arm-soc/for-5.7/devicetree' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 5.7, please pull the following: - Stefan adds GPIO labels to the Raspberry Pi 4 Model B board DTS - Nicolas moves the eMMC2 controller into its separate node in order for platform firmware to perform the necessary "dma-ranges" property patching based on the chip revision since the eMMC controller has different addressing constraints. - Florian convers a whole bunch of Broadcom boards bindings from text to YAML. * tag 'arm-soc/for-5.7/devicetree' of https://github.com/Broadcom/stblinux: dt-bindings: arm: Document Broadcom SoCs 'secondary-boot-reg' dt-bindings: arm: bcm: Convert Vulcan to YAML dt-bindings: arm: bcm: Convert BCM11351 to YAML dt-bindings: arm: bcm: Convert BCM4708 to YAML dt-bindings: arm: bcm: Convert BCM23550 to YAML dt-bindings: arm: bcm: Convert BCM21664 to YAML dt-bindings: arm: bcm: Convert Stingray to YAML dt-bindings: arm: bcm: Convert Northstar 2 to YAML dt-bindings: arm: bcm: Convert Northstar Plus to YAML dt-bindings: arm: bcm: Convert Hurricane 2 to YAML dt-bindings: arm: bcm: Convert Cygnus to YAML ARM: dts: bcm2711: Move emmc2 into its own bus ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels Link: https://lore.kernel.org/r/20200311212012.9418-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25arm64: dts: specify console via command lineChunyan Zhang
The SPRD serial driver need to know which serial port would be used as console in an early period during initialization, otherwise console init would fail since we added this feature[1]. So this patch add console to command line via devicetree. [1] https://lore.kernel.org/lkml/20190826072929.7696-4-zhang.lyra@gmail.com/ Link: https://lore.kernel.org/r/20200311112120.30890-1-zhang.lyra@gmail.com Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'omap-for-v5.7/dt-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.7 merge window Few device tree changes for omaps for v5.7 to configure omap5 AESS module and to add idle_states for am335x and am437x cpuidle. * tag 'omap-for-v5.7/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am4372: Add idle_states for cpuidle ARM: dts: am33xx: Add idle_states for cpuidle ARM: dts: Configure omap5 AESS Link: https://lore.kernel.org/r/pull-1583511417-919838@atomide.com-4 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'versatile-dts-v5.7-1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/dt Versatile DTS updates for the v5.7 series take one: - Schema validation for the top level of all ARM reference designs: Integrator, Versatile, RealView, Juno. - Clean up some node names in the trees so they pass validation fine. - Drop the old text bindings. - A top level DMA ranges patch from Rob. * tag 'versatile-dts-v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM/arm64: dts: Rename SMB bus to just bus dt-bindings: arm: Drop the non-YAML bindings dt-bindings: arm: Add Versatile Express and Juno YAML schema dt-bindings: arm: Add RealView YAML schema dt-bindings: arm: Add Versatile YAML schema dt-bindings: arm: Add Integrator YAML schema ARM: dts: RealView: Fix the name of the SoC node ARM: dts: Versatile: Use syscon as node name for IB2 ARM: dts: integratorap: Remove top level dma-ranges Link: https://lore.kernel.org/r/CACRpkdbbniYVnsE-pAmU2qCerswserNgEFtY48XQ+_K+DUNC9Q@mail.gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'renesas-arm64-dt-for-v5.7-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM64 DT updates for v5.7 - CryptoCell support for R-Car M3-W, M3-W+, M3-N, E3, and D3, - Miscellaneous fixes and improvements. * tag 'renesas-arm64-dt-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: rzg2: Add reset control properties for display arm64: dts: renesas: rcar-gen3: Add reset control properties for display arm64: dts: renesas: Remove use of ARCH_R8A7795 arm64: dts: renesas: rcar-gen3: Add CCREE nodes arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps" arm: dts: renesas: r8a77980: Remove r8a77970 DU compatible Link: https://lore.kernel.org/r/20200226110221.19288-5-geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'renesas-arm-dt-for-v5.7-tag1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.7 - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: rzg1: Add reset control properties for display ARM: dts: rcar-gen2: Add reset control properties for display ARM: dts: r8a7745: Convert to new DU DT bindings ARM: dts: r7s72100: Add SPIBSC clocks ARM: dts: renesas: Group tuples in operating-points properties ARM: dts: renesas: Add missing ethernet PHY reset GPIO on Gen2 reference boards Link: https://lore.kernel.org/r/20200226110221.19288-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'wireless-drivers-2020-03-25' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.6 Fourth, and last, set of fixes for v5.6. Just two important fixes to iwlwifi regressions. iwlwifi * fix GEO_TX_POWER_LIMIT command on certain devices which caused firmware to crash during initialisation * add back device ids for three devices which were accidentally removed ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-25Merge tag 'tegra-for-5.7-cpuidle' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc cpuidle: tegra: Changes for v5.7-rc1 These changes unify CPU idle support for Tegra20, Tegra30 and Tegra114. * tag 'tegra-for-5.7-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: cpuidle: tegra: Disable CC6 state if LP2 unavailable cpuidle: tegra: Squash Tegra114 driver into the common driver cpuidle: tegra: Squash Tegra30 driver into the common driver cpuidle: Refactor and move out NVIDIA Tegra20 driver into drivers/cpuidle Link: https://lore.kernel.org/r/20200313165848.2915133-9-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'zynqmp-soc-for-v5.7' of https://github.com/Xilinx/linux-xlnx into ↵Arnd Bergmann
arm/soc arm64: soc: ZynqMP SoC changes for v5.7 - Change firmware dependency to be able to disable it * tag 'zynqmp-soc-for-v5.7' of https://github.com/Xilinx/linux-xlnx: arm64: zynqmp: Make zynqmp_firmware driver optional include: linux: firmware: Correct config dependency of zynqmp_eemi_ops Link: https://lore.kernel.org/r/ecef6de5-8318-9f88-db8c-7c33fe44901f@monstr.eu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'zynq-soc-for-v5.7' of https://github.com/Xilinx/linux-xlnx into ↵Arnd Bergmann
arm/soc ARM: Xilinx Zynq SoC patches for v5.7 - Use proper clock header in soc code * tag 'zynq-soc-for-v5.7' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: Replace <linux/clk-provider.h> by <linux/of_clk.h> Link: https://lore.kernel.org/r/005af9f0-85b5-7bac-2d99-5bb3857debb3@monstr.eu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'at91-5.7-soc' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.7 - Rework PM to support sam9x60 * tag 'at91-5.7-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: pm: add quirk for sam9x60's ulp1 ARM: at91: pm: add plla disable/enable support for sam9x60 clk: at91: move sam9x60's PLL register offsets to PMC header ARM: at91: pm: s/sfr/sfrbu in pm_suspend.S ARM: at91: pm: add pmc_version member to at91_pm_data ARM: at91: pm: add macros for plla disable/enable ARM: at91: pm: revert do not disable/enable PLLA for ULP modes ARM: at91: pm: use proper master clock register offset ARM: at91: Drop unneeded select of COMMON_CLK Link: https://lore.kernel.org/r/20200322090116.GA208895@piout.net Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'v5.6-next-soc' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/soc pmic wrapper: - add support for MT6779 SoC cmdq-helper: - set knows_txdone in mailbox client * tag 'v5.6-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: pwrap: add support for MT6359 PMIC soc: mediatek: pwrap: add pwrap driver for MT6779 SoCs dt-bindings: pwrap: mediatek: add pwrap support for MT6779 soc: mediatek: knows_txdone needs to be set in Mediatek CMDQ helper Link: https://lore.kernel.org/r/61165e91-f211-ad37-a81c-cbf3ff69fa1b@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'imx-soc-5.7' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC changes for 5.7: - A number of cleanups from Anson Huang to remove unneeded includes, drop unnecessary newlines and base check etc. - Apply Cortex-A9 specific errata only to Cortex-A9 based i.MX SoCs and avoid impacting Cortex-A7 based designs. * tag 'imx-soc-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Drop unnecessary src_base check ARM: imx: Remove unnecessary blank lines ARM: imx: Add missing of_node_put() ARM: imx: Remove unused include of linux/of.h on mach-imx6sl.c ARM: imx: Remove unused includes on mach-imx6q.c ARM: imx: Remove unused include of linux/irqchip/arm-gic.h ARM: imx: limit errata selection to Cortex-A9 based designs Link: https://lore.kernel.org/r/20200318051918.32579-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'mvebu-arm-5.7-1' of git://git.infradead.org/linux-mvebu into arm/socArnd Bergmann
mvebu arm for 5.6 (part 1) Various cleanup: On Orion5x: - Drop unneeded select of PCI_DOMAINS_GENERIC - Remove unneeded variable ret - Replace setup_irq() by request_irq() On Dove: Mark dove_io_desc as __maybe_unused * tag 'mvebu-arm-5.7-1' of git://git.infradead.org/linux-mvebu: arm: mach-dove: Mark dove_io_desc as __maybe_unused ARM: orion: replace setup_irq() by request_irq() ARM: orion5x: ts78xx: Remove unneeded variable ret ARM: orion5x: Drop unneeded select of PCI_DOMAINS_GENERIC Link: https://lore.kernel.org/r/87eetux7um.fsf@FE-laptop Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'tegra-for-5.7-arm-core' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc ARM: tegra: Core changes for v5.7-rc1 These patches a preparatory work to move the CPU idle drivers into drivers/cpuidle. * tag 'tegra-for-5.7-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: cpuidle: Remove unnecessary memory barrier ARM: tegra: cpuidle: Make abort_flag atomic ARM: tegra: cpuidle: Handle case where secondary CPU hangs on entering LP2 ARM: tegra: Make outer_disable() open-coded ARM: tegra: Rename some of the newly exposed PM functions ARM: tegra: Expose PM functions required for new cpuidle driver ARM: tegra: Propagate error from tegra_idle_lp2_last() ARM: tegra: Change tegra_set_cpu_in_lp2() type to void ARM: tegra: Remove pen-locking from cpuidle-tegra20 ARM: tegra: Add tegra_pm_park_secondary_cpu() ARM: tegra: Compile sleep-tegra20/30.S unconditionally Link: https://lore.kernel.org/r/20200313165848.2915133-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'tegra-for-5.7-soc' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc soc/tegra: Changes for v5.7-rc1 These changes implement various clocks that are controlled by the PMC and add support for configuring the voltage level of some pins (needed for example to support high-speed modes on the SD/MMC interfaces). * tag 'tegra-for-5.7-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Cleanup whitespace usage soc/tegra: pmc: Add pins for Tegra194 soc/tegra: Add support for 32 kHz blink clock soc/tegra: Add Tegra PMC clocks registration into PMC driver dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding dt-bindings: phy: tegra-xusb: Add usb-role-switch dt-bindings: phy: tegra: Add Tegra194 support dt-bindings: soc: tegra-pmc: Add ID for Tegra PMC 32 kHz blink clock dt-bindings: soc: tegra-pmc: Add Tegra PMC clock bindings dt-bindings: tegra: Convert Tegra PMC bindings to YAML dt-bindings: clock: tegra: Add IDs for OSC clocks Link: https://lore.kernel.org/r/20200313165848.2915133-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'stm32-soc-for-v5.7-1' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/soc STM32 SoC updates for v5.7, round 1 Highlights: ---------- - Add early console support for all STM32 SoCs: F4/F7/H7/MP1 * tag 'stm32-soc-for-v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: debug: stm32: add UART early console support for STM32MP1 ARM: debug: stm32: add UART early console support for STM32H7 ARM: debug: stm32: add UART early console configuration for STM32F7 ARM: debug: stm32: add UART early console configuration for STM32F4 Link: https://lore.kernel.org/r/4e427e37-99c9-239a-f3f8-a3bf50eb1eb2@st.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'sunxi-core-for-5.7' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/soc Allwinner Core Changes for v5.7 Just one change for our mach code for including the correct clk header. * tag 'sunxi-core-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sunxi: Replace <linux/clk-provider.h> by <linux/of_clk.h> Link: https://lore.kernel.org/r/20200313055342.GA19760@wens.csie.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'arm-soc/for-5.7/soc-arm64' of ↵Arnd Bergmann
https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM64 SoCs changes for 5.7, please pull the following: - Geert drops the non-existent HAVE_ARM_ARCH_TIMER symbol select for ARCH_BCM2835 * tag 'arm-soc/for-5.7/soc-arm64' of https://github.com/Broadcom/stblinux: arm64: bcm2835: Drop select of nonexistent HAVE_ARM_ARCH_TIMER Link: https://lore.kernel.org/r/20200311212012.9418-4-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'arm-soc/for-5.7/soc' of https://github.com/Broadcom/stblinux into ↵Arnd Bergmann
arm/soc This pull request contains Broadcom ARM-based SoCs changes for 5.7, please pull the following: - Geert drops redundant selects for Broadcom SoCs which are already implied by ARCH_MULTI_V6_V7 * tag 'arm-soc/for-5.7/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: Drop unneeded select of PCI_DOMAINS_GENERIC, HAVE_SMP, TIMER_OF Link: https://lore.kernel.org/r/20200311212012.9418-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'omap-for-v5.7/pm33xx-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc PM changes for am335x and am437x for v5.7 merge window A series of changes from Dave Gerlach to enable basic cpuidle support for am335x and am437x based on generic cpuidle-arm driver. * tag 'omap-for-v5.7/pm33xx-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Add CONFIG_ARM_CPUIDLE soc: ti: pm33xx: Add base cpuidle support ARM: OMAP2+: pm33xx-core: Extend platform_data ops for cpuidle ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x dt-bindings: arm: cpu: Add TI AM335x and AM437x enable method Link: https://lore.kernel.org/r/pull-1583511417-919838@atomide.com-2 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-25Merge tag 'omap-for-v5.7/soc-signed' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.7 merge window A change to improve the warning output for device tree data mismatch as compared to legacy platform data for ti-sysc related interconnect target modules. And change omap1 to request_irq() instead of setup_irq(). * tag 'omap-for-v5.7/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: replace setup_irq() by request_irq() ARM: OMAP2+: Improve handling of ti-sysc related sysc_fields Link: https://lore.kernel.org/r/pull-1583511417-919838@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-03-26nvme: cleanup namespace identifier reporting in nvme_init_ns_headChristoph Hellwig
Lift the common namespace identifier reporting between the shared namespace and new nshead cases into common code. This also means one less lock is held while doing I/O. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: rename __nvme_find_ns_head to nvme_find_ns_headChristoph Hellwig
There is no non __-prefixed version, so make the name a little more readable. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: refactor nvme_identify_ns_descs error handlingChristoph Hellwig
Move the handling of an error into the function from the caller, and only do it for an actual error on the admin command itself, not the command parsing, as that should be enough to deal with devices claiming a bogus version compliance. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme-tcp: Add warning on state change failure at nvme_tcp_setup_ctrlIsrael Rukshin
The transition to LIVE state should not fail in case of a new controller. Moving to DELETING state before nvme_tcp_create_ctrl() allocates all the resources may leads to NULL dereference at teardown flow (e.g., IO tagset, admin_q, connect_q). Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme-rdma: Add warning on state change failure at nvme_rdma_setup_ctrlIsrael Rukshin
The transition to LIVE state should not fail in case of a new controller. Moving to DELETING state before nvme_tcp_create_ctrl() allocates all the resources may leads to NULL dereference at teardown flow (e.g., IO tagset, admin_q, connect_q). Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: Fix controller creation races with teardown flowIsrael Rukshin
Calling nvme_sysfs_delete() when the controller is in the middle of creation may cause several bugs. If the controller is in NEW state we remove delete_controller file and don't delete the controller. The user will not be able to use nvme disconnect command on that controller again, although the controller may be active. Other bugs may happen if the controller is in the middle of create_ctrl callback and nvme_do_delete_ctrl() starts. For example, freeing I/O tagset at nvme_do_delete_ctrl() before it was allocated at create_ctrl callback. To fix all those races don't allow the user to delete the controller before it was fully created. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: Make nvme_uninit_ctrl symmetric to nvme_init_ctrlIsrael Rukshin
Put the ctrl reference count at nvme_uninit_ctrl as opposed to nvme_init_ctrl which takes it. This decrease the reference count at the core layer instead of decreasing it on each transport separately. Also move the call of nvme_uninit_ctrl at PCI driver after calling to nvme_release_prp_pools and nvme_dev_unmap, in order to put the reference count after using the dev. This is safe because those functions use nvme_dev which is freed only later at nvme_pci_free_ctrl. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: Fix ctrl use-after-free during sysfs deletionIsrael Rukshin
In case nvme_sysfs_delete() is called by the user before taking the ctrl reference count, the ctrl may be freed during the creation and cause the bug. Take the reference as soon as the controller is externally visible, which is done by cdev_device_add() in nvme_init_ctrl(). Also take the reference count at the core layer instead of taking it on each transport separately. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme-pci: Re-order nvme_pci_free_ctrlIsrael Rukshin
Destroy the resources in the same order like in nvme_probe error flow to improve code readability. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
2020-03-26nvme: Remove unused return code from nvme_delete_ctrl_syncIsrael Rukshin
The return code of nvme_delete_ctrl_sync is never used, so change it to void. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>