Commit graph

917201 commits

Author SHA1 Message Date
Andrey Konovalov
61d2658db4 usb: raw-gadget: documentation updates
Mention the issue with fixed UDC addresses.

Links external examples and test suite.

Add more implmenetation details and potential improvements.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-05-14 12:30:18 +03:00
Andrey Konovalov
c61769bd47 usb: raw-gadget: support stalling/halting/wedging endpoints
Raw Gadget is currently unable to stall/halt/wedge gadget endpoints,
which is required for proper emulation of certain USB classes.

This patch adds a few more ioctls:

- USB_RAW_IOCTL_EP0_STALL allows to stall control endpoint #0 when
  there's a pending setup request for it.
- USB_RAW_IOCTL_SET/CLEAR_HALT/WEDGE allow to set/clear halt/wedge status
  on non-control non-isochronous endpoints.

Fixes: f2c2e71764 ("usb: gadget: add raw-gadget interface")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-05-14 12:30:18 +03:00
Andrey Konovalov
97df5e5758 usb: raw-gadget: fix gadget endpoint selection
Currently automatic gadget endpoint selection based on required features
doesn't work. Raw Gadget tries iterating over the list of available
endpoints and finding one that has the right direction and transfer type.
Unfortunately selecting arbitrary gadget endpoints (even if they satisfy
feature requirements) doesn't work, as (depending on the UDC driver) they
might have fixed addresses, and one also needs to provide matching
endpoint addresses in the descriptors sent to the host.

The composite framework deals with this by assigning endpoint addresses
in usb_ep_autoconfig() before enumeration starts. This approach won't work
with Raw Gadget as the endpoints are supposed to be enabled after a
set_configuration/set_interface request from the host, so it's too late to
patch the endpoint descriptors that had already been sent to the host.

For Raw Gadget we take another approach. Similarly to GadgetFS, we allow
the user to make the decision as to which gadget endpoints to use.

This patch adds another Raw Gadget ioctl USB_RAW_IOCTL_EPS_INFO that
exposes information about all non-control endpoints that a currently
connected UDC has. This information includes endpoints addresses, as well
as their capabilities and limits to allow the user to choose the most
fitting gadget endpoint.

The USB_RAW_IOCTL_EP_ENABLE ioctl is updated to use the proper endpoint
validation routine usb_gadget_ep_match_desc().

These changes affect the portability of the gadgets that use Raw Gadget
when running on different UDCs. Nevertheless, as long as the user relies
on the information provided by USB_RAW_IOCTL_EPS_INFO to dynamically
choose endpoint addresses, UDC-agnostic gadgets can still be written with
Raw Gadget.

Fixes: f2c2e71764 ("usb: gadget: add raw-gadget interface")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-05-14 12:30:17 +03:00
Andrey Konovalov
17ff3b72e7 usb: raw-gadget: improve uapi headers comments
Fix typo "trasferred" => "transferred".

Don't call USB requests URBs.

Fix comment style.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-05-14 12:30:17 +03:00
Dave Airlie
f59bcda883 Merge tag 'amd-drm-fixes-5.7-2020-05-13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
amd-drm-fixes-5.7-2020-05-13:

amdgpu:
- Clockgating fixes
- Fix fbdev with scatter/gather display
- S4 fix for navi
- Soft recovery for gfx10
- Freesync fixes
- Atomic check cursor fix
- Add a gfxoff quirk
- MST fix

amdkfd:
- Fix GEM reference counting

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200514034046.3988-1-alexander.deucher@amd.com
2020-05-14 13:48:16 +10:00
Dave Airlie
6da9b046af drm/tegra: Fixes for v5.7
This contains a pair of patches which fix SMMU support on Tegra124 and
 Tegra210 for host1x and the Tegra DRM driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl61MHQTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoT65EACPbxxrm3oBPuZ3pBT7EYkr+CmdQhew
 qY1RsicV0CI1isDc5NCkTO0ykWAk2PM5pYRw3xHx3r3/cQY3ct+j2yMYQXJRPDTX
 fneP+HJjUm4Jr6oAq0X04mjx7ZjhIqRHY1xJY5S7vOTVfzmVtQhzRYXiCkX1ezvU
 /F/jWKCHms6bAsXgx85yTV4odVEQs1wO9Gg3Y0zskIIV4YQ7jWuheHwMHL8Z0zVm
 2/V9wHio9hn/I7Rsf0W0sEs36PN8UvctCipGsphc/n2/q/U+XRZsWylblV5Ad3c4
 1L3FX896X78pu1mz1RMezoWrIRTLJrMdkJkzJ3/HalLUuPvgx3W3nXECKHn4ZRLQ
 2OayQC4JWpGwuy41z/85GfB65heVZTVW2oEobVLb5LnOkJmTDeQCi2LmWc8qPw+B
 oFm+p31BDgXjtSAj+SwMW2zkyjFVlmiguYL6HZ/fDu4CkUbR3UNbB/eFZjJ/qA2N
 6poho5Eg5UkxY9hjgYh5PdL59lltxw7BOq2uC3L63SVfHOouYcJ6MRNK3V8Py7RH
 bkd1k52JWaGGTPYy6REXBeNzStvZkI4SYy3nqNfctjN2j99T1IgFhrxCjkodgPMB
 FuBCKLcw1K4jmufMTYewcOqX0RPX5DrlCOv/3TocpHOw8ytX8hGSVa8rJb/oZjgL
 PavAcfMoaQmOuA==
 =DZJ0
 -----END PGP SIGNATURE-----

Merge tag 'drm/tegra/for-5.7-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-fixes

drm/tegra: Fixes for v5.7

This contains a pair of patches which fix SMMU support on Tegra124 and
Tegra210 for host1x and the Tegra DRM driver.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200508101355.3031268-1-thierry.reding@gmail.com
2020-05-14 12:29:50 +10:00
Dave Airlie
0c77ca2f9d - Fixes on execlist to avoid GPU hang situation (Chris)
- Fixes couple deadlocks (Chris)
 - Timeslice preemption fixes (Chris)
 - Fix Display Port interrupt handling on Tiger Lake (Imre)
 - Reduce debug noise around Frame Buffer Compression (Peter)
 - Fix logic around IPC W/a for Coffee Lake and Kaby Lake (Sultan)
 - Avoid dereferencing a dead context (Chris)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAl607QgACgkQ+mJfZA7r
 E8oP4gf+MxxjhkjPI+kmBDVE7f1kSnjYDdITWbmGPdzkaVEqTNwdmu2liYuy+Be0
 qKtncD6/3Xs16JU905Ew7EbBODvDhWHkRJ2QH3MAPnu28qjFgDHl/tbbnYzWQsDJ
 JNt0vYJ1jUpm+QrRy1W2woWO95fjsYzYDsVHhKZzVoiHmoEULH1XyFqJfYh4yoLZ
 puKSj/LXGeVTRPEU9HL9Hhs2wpB5SI/pda7UgLMj0Cjc+3MkdDMPI9qKTOtlype8
 yErtqGMYsMifSrKhaMXYPZCtGexScknUS5mq9WjGJITgd8LqACEeciP7twkO0ZMx
 Del31B21K3Gjq9mdmv32Bur0LA++Dg==
 =Byvp
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-fixes-2020-05-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- Fixes on execlist to avoid GPU hang situation (Chris)
- Fixes couple deadlocks (Chris)
- Timeslice preemption fixes (Chris)
- Fix Display Port interrupt handling on Tiger Lake (Imre)
- Reduce debug noise around Frame Buffer Compression (Peter)
- Fix logic around IPC W/a for Coffee Lake and Kaby Lake (Sultan)
- Avoid dereferencing a dead context (Chris)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200508052437.GA3212215@intel.com
2020-05-14 12:24:58 +10:00
Kefeng Wang
ed1ed4c0da
riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id'
In file included from ./../include/linux/compiler_types.h:68,
                 from <command-line>:
../include/asm-generic/mmiowb.h: In function ‘mmiowb_set_pending’:
../include/asm-generic/percpu.h:34:38: error: implicit declaration of function ‘smp_processor_id’; did you mean ‘raw_smp_processor_id’? [-Werror=implicit-function-declaration]
 #define my_cpu_offset per_cpu_offset(smp_processor_id())
                                      ^~~~~~~~~~~~~~~~
../include/linux/compiler-gcc.h:58:26: note: in definition of macro ‘RELOC_HIDE’
  (typeof(ptr)) (__ptr + (off));     \
                          ^~~
../include/linux/percpu-defs.h:249:2: note: in expansion of macro ‘SHIFT_PERCPU_PTR’
  SHIFT_PERCPU_PTR(ptr, my_cpu_offset);    \
  ^~~~~~~~~~~~~~~~
../include/asm-generic/percpu.h:34:23: note: in expansion of macro ‘per_cpu_offset’
 #define my_cpu_offset per_cpu_offset(smp_processor_id())
                       ^~~~~~~~~~~~~~
../include/linux/percpu-defs.h:249:24: note: in expansion of macro ‘my_cpu_offset’
  SHIFT_PERCPU_PTR(ptr, my_cpu_offset);    \
                        ^~~~~~~~~~~~~
../include/asm-generic/mmiowb.h:30:26: note: in expansion of macro ‘this_cpu_ptr’
 #define __mmiowb_state() this_cpu_ptr(&__mmiowb_state)
                          ^~~~~~~~~~~~
../include/asm-generic/mmiowb.h:37:28: note: in expansion of macro ‘__mmiowb_state’
  struct mmiowb_state *ms = __mmiowb_state();
                            ^~~~~~~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2020-05-13 17:11:46 -07:00
Kefeng Wang
9a6630aef9
riscv: pgtable: Fix __kernel_map_pages build error if NOMMU
riscv64-none-linux-gnu-ld: mm/page_alloc.o: in function `.L0 ':
page_alloc.c:(.text+0xd34): undefined reference to `__kernel_map_pages'
riscv64-none-linux-gnu-ld: page_alloc.c:(.text+0x104a): undefined reference to `__kernel_map_pages'
riscv64-none-linux-gnu-ld: mm/page_alloc.o: in function `__pageblock_pfn_to_page':
page_alloc.c:(.text+0x145e): undefined reference to `__kernel_map_pages'

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2020-05-13 17:11:39 -07:00
Heiner Kallweit
9de5d235b6 net: phy: fix aneg restart in phy_ethtool_set_eee
phy_restart_aneg() enables aneg in the PHY. That's not what we want
if phydev->autoneg is disabled. In this case still update EEE
advertisement register, but don't enable aneg and don't trigger an
aneg restart.

Fixes: f75abeb833 ("net: phy: restart phy autonegotiation after EEE advertisment change")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 15:21:59 -07:00
Max Krummenacher
39572dd33b arm64: defconfig: add MEDIA_PLATFORM_SUPPORT
Commit 06b93644f4 ("media: Kconfig: add an option to filter in/out
platform drivers") adds a new Kconfig symbol which now hides drivers
currently enabled in the arm64 defconfig. Enable it to get those
drivers back.

Link: https://lore.kernel.org/r/20200427134003.45188-5-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:38 +02:00
Max Krummenacher
c226669674 arm64: defconfig: ARCH_R8A7795: follow changed config symbol name
Completes commit b925adfceb ("soc: renesas: Add ARCH_R8A7795[01] for
existing R-Car H3") and commit 361c5dbb44 ("arm64: dts: renesas:
Remove use of ARCH_R8A7795").

CONFIG_ARCH_R8A7795 was split in CONFIG_ARCH_R8A77950 and
CONFIG_ARCH_R8A77951.

Link: https://lore.kernel.org/r/20200427134003.45188-4-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:24 +02:00
Max Krummenacher
50045c730d arm64: defconfig: add DRM_DISPLAY_CONNECTOR
Add DRM_DISPLAY_CONNECTOR. This got introduced with the bridge rework
Which renamed among others DRM_DUMB_VGA_DAC.

Link: https://lore.kernel.org/r/20200427134003.45188-3-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:14:07 +02:00
Max Krummenacher
5f450f6713 arm64: defconfig: DRM_DUMB_VGA_DAC: follow changed config symbol name
This occurrence wasn't changed in the original rename commit.

Fixes commit 0411374bdf ("drm/bridge: dumb-vga-dac: Rename driver to
simple-bridge").

Link: https://lore.kernel.org/r/20200427134003.45188-2-max.krummenacher@toradex.com
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:13:49 +02:00
Arnd Bergmann
6034cc5a37 - mach-oxnas: make ox820_boot_secondary static to fix sparse warning
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAl67w0gACgkQd9zb2sjI
 SdEtJw//crgU7PE6J8FfK/tTNNF+rMpeQJB7gPWGNrmuk0uTwR2tiVBk2PFqrb7b
 63PcUpo+ftYOBSwYLZ3/ebokEQE2zxvZIr1AK72oPvpx7AgEIuaoREFwr8+WwVEE
 jtN62On0QGlT+41AdmZMSv9MNHxnlIAeCPyACFA69gAu3pvY7FEOgHfBSNpJoyRX
 FOfGCYAv4exyLK6+s1188l5MG/jPnb91sXE/LSJl1eDIcD3r732e0Y3ZyRRHgV8t
 a+zW+3pdqncGSlLAkVzd4XDP5dYBZNrGMhi1jgytlQXItW2iBo5DhOjidqE8uY9b
 tUzrj/HTs1rl2Rt8FOLx3xNjm1PozCUeIQBCu1efkzboZxJtJbGE2wTFV74QIq/s
 V0BsJNnIsXk5/oKud1wbFClCrf/+WyM4gAP7vE06ftkUgobnJufStjAfuiRnb1rN
 /yYNRQzhxRhtHNCHasZWPK6M6mC951bKfPaR9IGu62rM7UZlxDPsIuWBUhkZ/1k+
 Ijjl/t6plvSLHYx3PKllfTJZW6R4Ww+PZo0PwEftd5rrKpR0OmAnCZrOBM1m85v7
 2G8naTACGeJJK/933zxpAG0cevHHw4ZCiOYyG1Xdeocj0TTu10zmOL1qGg+hJkrZ
 B1ZoRij6HBO3X5Qu1V/bY06PF5TzAniXoQiFHg3zC7CF9ElRrWw=
 =JSC+
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas into arm/fixes

- mach-oxnas: make ox820_boot_secondary static to fix sparse warning

* tag 'arm-soc-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas:
  ARM: oxnas: make ox820_boot_secondary static

Link: https://lore.kernel.org/r/95bf4813-93a1-735d-1d27-2cbe59986845@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:08:07 +02:00
Arnd Bergmann
43f3b777a6 arm64: dts: fixes for v5.7-rc
Misc arm64 DT-only fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl618H0ACgkQWTcYmtP7
 xmVJ3Q/+MpOYMznZERRxosRf5VAI+jqO9QX2gLGM/sVnlt/OPm16Py58pUjZC3/o
 liGtCKiLW7wCYb25+kKFvs4en8MoSane/OpNoxJSnh8kvhDflKQwAUd5PES1LhSH
 dvmj737fBjvyof+tVoGoV2E1+mfef32iCIEenhtqW93nHRMtCQF+fCKMk8W5O4zT
 JJGc9UHxiqa37APiZpenaKBTbntb4TvqURJnRgB8xiWF8LRMXpbRIL4XnddzrzbM
 cQWn4/FR/iBPMNtFHo17rlr+mXfJUMiXxZk/PiLy3YRkFCHo6qwaLCg3fBHZFDe5
 qT1rAgUXJkfBPms7YfjYCe1tnGSQgvR/XBrb2lTE2/b+PxQQlQJRGHJuwxres7O4
 O1PCYvSFsQPFD9oVzBtGk+AtagfXEa/7uUtuf25Qwb2WGJ46ShY4zvKehSSqvmrK
 pS9WQrJPya3EaQfMDeRQTl28jIgxIZRcQ2OcfKvrZsROfV8CHCUl/9emmaXB1kzL
 T1+VRsyJX89CPBwVTAj79GcI+Zag6TRE4hrKz4ubd1rxFa+4iO2ctgLO9FRHEeZO
 bV3TF8UOhes0fWT7qNWGcZeqErXjp2We3HJz3eS6hmZx3EA3eK2WefHmR0/mGKQo
 F7fC7E2KqCbalklsMPmvpE+PP7+6fUGYgpLMAagB59hcFoNpgjY=
 =KRNA
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes

arm64: dts: fixes for v5.7-rc

Misc arm64 DT-only fixes

* tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-g12: remove spurious blank line
  arm64: dts: meson-g12b-khadas-vim3: add missing frddr_a status property
  arm64: dts: meson-g12-common: fix dwc2 clock names
  arm64: dts: meson-g12b-ugoos-am6: fix usb vbus-supply

Link: https://lore.kernel.org/r/7hmu6iyoc5.fsf@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:07:36 +02:00
Arnd Bergmann
deca1d1c3c Fixes for omaps for v5.6-rc cycle
Few device tree fixes for various devices:
 
 - A regression fix for non-existing can device on am534x-idk
 
 - Fix missing dma-ranges for dra7 pcie
 
 - Fix flakey wlan on droid4 where some devices would not connect
   at all because of internal pull being used with an external pull
 
 - Fix occasional missed wake-up events on droid4 modem uart
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAl60Rf8RHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXOX6A/9EswTZAAALWG/e4NsXFQ+qejz0vV7ssnY
 wVgqaN9syo8QzADOompSl00KK6OS4+kykanM4LV6WeqLX+IyMHH29C1V2Phi8GxT
 A6clVAspS9VsJeR1XC46JxGdR3+wBHKIA3GywPliWqONG8NmEVKQM4SMIRgUqrh4
 Ed+GJg5O3ZU9IuamJgetrWh5M2/VCGQTcUsJZvi80aa8sQtf0fFdDb+0v9Ze1Cl6
 LQ2SYPcYtwEQspnPMFS2LKYg2M25jcquAhNZFyFepLSmg8qu6db//8gSaBPnZmpO
 q1Vp9lkB19zUlkLImoEFp0u62lPuHkdTPfAI/S+kDU8g/KAz8IZfK1oXTW8pyuRi
 NB1OthbNXSv7MGmS7bC2/1WOtirNQV6NTlpb/A8GOtYc/pApW11xokw2OqdvbpV/
 MuMoH2HiDgcxyDLujXkS+u4dWF20570uWh0GyYNHT3aJzGbhanQnwJp8Fq2zmByE
 h3o/zyF9SR2XK6f2YOW96hEPeCU8g95VZnGo9jJfkUVi5qXFhFOs7Yd5KVnN0VeA
 irHBm66E0t/xgioCRquAvev83u8gXzPu9eXpebB6/D2wdw7y1SFTpIRnlzKeajws
 A/oldWXxkEAMa8UN+g46bkgFpIIjMQo5BjWlXXhbYmAIBdOXLpiYcrUbQ8ecFVkG
 DuCV/UwycrM=
 =umsu
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v5.6/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes

Fixes for omaps for v5.6-rc cycle

Few device tree fixes for various devices:

- A regression fix for non-existing can device on am534x-idk

- Fix missing dma-ranges for dra7 pcie

- Fix flakey wlan on droid4 where some devices would not connect
  at all because of internal pull being used with an external pull

- Fix occasional missed wake-up events on droid4 modem uart

* tag 'omap-for-v5.6/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap4-droid4: Fix occasional lost wakeirq for uart1
  ARM: dts: omap4-droid4: Fix flakey wlan by disabling internal pull for gpio
  ARM: dts: dra7: Fix bus_dma_limit for PCIe
  ARM: dts: am574x-idk: Disable m_can node

Link: https://lore.kernel.org/r/pull-1588872844-804667@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:06:44 +02:00
Arnd Bergmann
3b3e88e067 Some fixes for the newly added Pinebook Pro and other fixes to
make dtc and the new dtscheck against yaml bindings happy.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl6yA9QQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgeX0CACEwXPa8ChfXg+N4846D/wcwkpMVQqnTbMR
 WrnqVLUNHf71h7Yej/aXpBSgEq5er1Q/HVgbjvkAAYNw633MNWgaNMi9AFl03gTF
 uSOSUoiwauUUlvWt2aZ44IHxHS/WC0FB9/wIROpnD0SJvmYX9MJF8AVITNDsTDGv
 EsSswwAXiBxILDWWdBM2QgAZxEhan3MwBbHQrmPRePDAWylluT3tMGjEfLgIapcW
 9w44tw0kR8g7Zwgq+MYcfyHoNhUXOr1iMlCCA0LWOOtNBJAbXKM4XDp4cWwHLiI3
 nktZSWXN7B08dx4hi/++18izC6N/ZwoGycMN4wG9kvdaRnpwh3KN
 =vkl2
 -----END PGP SIGNATURE-----

Merge tag 'v5.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

Some fixes for the newly added Pinebook Pro and other fixes to
make dtc and the new dtscheck against yaml bindings happy.

* tag 'v5.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi
  arm64: dts: rockchip: Fix Pinebook Pro FUSB302 interrupt
  ARM: dts: rockchip: swap clock-names of gpu nodes
  arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node
  arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts
  arm64: dts: rockchip: remove extra assigned-clocks property from &gmac2phy node in rk3328-evb.dts
  ARM: dts: rockchip: fix phy nodename for rk3229-xms6
  ARM: dts: rockchip: fix phy nodename for rk3228-evb
  arm64: dts: rockchip: Rename dwc3 device nodes on rk3399 to make dtc happy
  arm64: dts: rockchip: drop #address-cells, #size-cells from rk3399 pmugrf node
  arm64: dts: rockchip: drop #address-cells, #size-cells from rk3328 grf node
  arm64: dts: rockchip: drop non-existent gmac2phy pinmux options from rk3328
  arm64: dts: rockchip: Replace RK805 PMIC node name with "pmic" on rk3328 boards
  arm64: dts: rockchip: enable DC charger detection pullup on Pinebook Pro
  arm64: dts: rockchip: fix inverted headphone detection on Pinebook Pro
  arm64: dts: rockchip: Correct PMU compatibles for PX30 and RK3308

Link: https://lore.kernel.org/r/1738941.6LdaBJIBqS@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:02:56 +02:00
Arnd Bergmann
6d9ac5160d arm64: tegra: Default configuration fixes
This contains a single fix to reenable the Tegra194 PCIe host support by
 default that was inadvertently dropped as a result of the host/endpoint
 mode support that was added in v5.7-rc1.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl6qrkUTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoRoREACiEsfrfBcCltBdxNcSpguKj4OBwDny
 sAgl+hVivPe2n2EJzo7/35R63OEIaHczsqUnIyrpunYXEIiSuBQMkjkXPPfTQX/Y
 sL5kf9niYe2ZlXvrHxo/dgzpuwginrv79dOodYV0+ptVVUkMmC3/bttCRsDIGNJL
 +0pnFRxI4jiHMuhonEHFDJjqYk0D731FzmrpsP8b52w+s859nGY1zrP7FaGVl1/G
 cnt6ue7WpqT5f8rFHpcrkqkjM66luDRkDcDlJV46/nPBoDbbh4sUM9yK87BV4M3W
 0rIa1+qGi3+lTZdB+M9B59LRn6f3k2jhjZfjM+YDWO2085VPXMH3dImc6nHOhgzm
 ck+a8OtB9Y33k7XvbAVCxLjByGlqdZ9jPJKrhfpe40qZZev4+XMTbiwYBQIqD2fK
 LXHZlMl6kliYCXS3B0hchayRfr/jnBw5gibwNmOuYxFoUigW0n1VBB7bX7uMqdOz
 W2mZHu2ekXfhEmfukI6iDvlMR1OPGMSuNIKo/eDOLGNnMTb+n3L0mQ8Ac+U8oDIT
 Ppd7vtdkk+7l6+0DlMNh98PQOa04H3LDgvsqlsdwj3r8uKPeiD6YA3zCqRppm4nr
 Qre3aRWyvBPpNGo5RuAQe+i10zTcfPK/DN9+Nt1DgJxXVYm3GJEWSMM64z/Vpme5
 3A4E0Ms0CX/Shg==
 =DB0J
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.7-arm64-defconfig-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes

arm64: tegra: Default configuration fixes

This contains a single fix to reenable the Tegra194 PCIe host support by
default that was inadvertently dropped as a result of the host/endpoint
mode support that was added in v5.7-rc1.

* tag 'tegra-for-5.7-arm64-defconfig-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Re-enable Tegra PCIe host driver

Link: https://lore.kernel.org/r/20200430105700.167199-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:01:44 +02:00
Arnd Bergmann
5258bba832 Renesas fixes for v5.7
- Fix IOMMU support on R-Car V3H,
   - Minor fixes that are fast-tracked to avoid introducing regressions
     during conversion of DT bindings to json-schema.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXqqEEQAKCRCKwlD9ZEnx
 cK6VAQDEYT5s4bzgLANPkTuvz3n5NgmS1nSC9tGrUX9co4OEUgD+OkwEnFJgLF1+
 LbwisW1fNfCz1looPeyyZTl9Q8o5Yg0=
 =cIRT
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes

Renesas fixes for v5.7

  - Fix IOMMU support on R-Car V3H,
  - Minor fixes that are fast-tracked to avoid introducing regressions
    during conversion of DT bindings to json-schema.

* tag 'renesas-fixes-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: dts: r7s9210: Remove bogus clock-names from OSTM nodes
  arm64: dts: renesas: r8a77980: Fix IPMMU VIP[01] nodes
  ARM: dts: r8a73a4: Add missing CMT1 interrupts

Link: https://lore.kernel.org/r/20200430084834.1384-1-geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:01:07 +02:00
Arnd Bergmann
896e18f4dc i.MX fixes for 5.7:
- Set correct AHB clock for i.MX8MN SDMA1 device to fix a "Timeout
    waiting for CH0" error.
  - Fix a linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n,
    which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW
    are selected.
  - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board.
  - Fix i.MX8M  AIPS 'reg' properties to remove DTC simple_bus_reg
    warnings.
  - Add missing compatible "fsl,vf610-edma" for LS1028A EDMA device, so
    that bootloader can fix up the IOMMU entries there.  Otherwise, EDMA
    just doesn't work on LS1028A with shipped bootloader.
  - Fix imx6dl-yapp4-ursa board Ethernet connection.
  - Fix input_val for AUDIOMIX_BIT_STREAM pinctrl defines on i.MX8MP
    according to Reference Manual.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl6pHtIUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM69sAgAp/H4BASI7SAbrjYsFjCP+ymPVgeS
 Y9oeLm09Q2XEF6GiRhK4SDqN56BOUelRI6nqWx3k6sU5A7SuZMqGSaZZEhCtHhjl
 iixyxSccxh4prUWSEDQPHyIJ6yjBt+QkKhycOVLwq7FFLdlrSaRuameNQAkjEU4a
 YPSL0oBd1xNbz75RaqgmyI0lzOuQg1P+GMQqmVOYfrucK94bq62FMSezyEBQxKU+
 0MVG/hEkeLtxFgzE6OpkBs1p1m+KgXE7qvV0W84VyZOKgri1qJ74V1Pl/RJNNVA0
 p46c3PH66OATAU7+pbshC0x/hsN8ZVAoBhPit5oLF7ugDNpi377jT/zRrw==
 =z3sI
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 5.7:

 - Set correct AHB clock for i.MX8MN SDMA1 device to fix a "Timeout
   waiting for CH0" error.
 - Fix a linker error for i.MX6 configurations that have ARM_CPU_SUSPEND=n,
   which can happen if neither CONFIG_PM, CONFIG_CPU_IDLE, nor ARM_PSCI_FW
   are selected.
 - Fix I2C1 pinctrl configuration for i.MX27 phytec-phycard board.
 - Fix i.MX8M  AIPS 'reg' properties to remove DTC simple_bus_reg
   warnings.
 - Add missing compatible "fsl,vf610-edma" for LS1028A EDMA device, so
   that bootloader can fix up the IOMMU entries there.  Otherwise, EDMA
   just doesn't work on LS1028A with shipped bootloader.
 - Fix imx6dl-yapp4-ursa board Ethernet connection.
 - Fix input_val for AUDIOMIX_BIT_STREAM pinctrl defines on i.MX8MP
   according to Reference Manual.

* tag 'imx-fixes-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: freescale: imx8mp: update input_val for AUDIOMIX_BIT_STREAM
  arm64: dts: imx8m: Fix AIPS reg properties
  arm64: dts: imx8mn: Change SDMA1 ahb clock for imx8mn
  ARM: dts: imx27-phytec-phycard-s-rdk: Fix the I2C1 pinctrl entries
  ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
  ARM: dts: imx6dl-yapp4: Fix Ursa board Ethernet connection
  arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
  dt-bindings: dma: fsl-edma: fix ls1028a-edma compatible

Link: https://lore.kernel.org/r/20200429063226.GT32592@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-14 00:00:07 +02:00
Arnd Bergmann
b130b0ad8a Qualcomm ARM64 DT fixes for v5.7
This reduces the (hard coded) CPU voltage to a safe level on MSM8996 and
 updates the audio nodes on db820c, db845c and c630 to reflect audio
 changes that landed late in the cycle.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl6pECQbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F9roQAKFCXXBcH3bnAUuBawpS
 vmHz2d22tEYfGRgjc5IDed/ix0eC8dAErNulSzN3UUhfAnEPZoe4X35Ij2USm3Ra
 4vvs4/Krzjw2ndYwgM22EtIvj4h95MfKvQz2SdJbZyFH+ITZId6sUfqcooGV2XZy
 MABVysd8tvK7v18QsawvkA+XZrEzL3jgw2W32kz2NSR5eI++98TPvArif0MsPAoa
 aHyGMBRvmTBXd6naDjkGQOsKCXzX7Uaw4a+XgaOMn/mH0489nYaRicRD4uYbi4uR
 toEbZsyPaVXYYSxqLbCIDPxDclHyvJuWA1nHrEtj3IdacFXrp/9VsmM6l4ckBdcN
 2u+8X6LIjySvJtmbUptz/6zufl9A7Vti0UY0VgdDUtOb0wkohivhOFmXcseLUuUH
 t9LGwvYidKVFqmyL0VUVFWOSoUgA1L9jcnIoiP3Was+WjYo3DYCgabnZaZgL3bhS
 XGM88s3u/HzkkbkhCQu5MtnuU2KXtEoxX7bcJCKH/UnFzH/wlkfP9ZJ2RZa2/4yY
 lYQdjvUpzYU9OBb6GZGEuspCWYdLCJFINLhJcQw0fN1d7Er0XzZXoMR7FEaCa3g7
 THonwbIw6c1MaTsLXOYpFJVvIBw2/RBP5mBGvvfP2XcCHv248nrIZ1qUoGfHxqns
 RCkV1UPEUfpR0KGUK8o8y3xn
 =AD+5
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm ARM64 DT fixes for v5.7

This reduces the (hard coded) CPU voltage to a safe level on MSM8996 and
updates the audio nodes on db820c, db845c and c630 to reflect audio
changes that landed late in the cycle.

* tag 'qcom-arm64-fixes-for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: db820c: fix audio configuration
  arm64: dts: qcom: db845c: fix asm dai setup
  arm64: qcom: c630: fix asm dai setup
  arm64: dts: qcom: msm8996: Reduce vdd_apc voltage

Link: https://lore.kernel.org/r/20200429052932.GA2627045@builder.lan
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-05-13 23:59:58 +02:00
Chris Wilson
955da9d774 drm/i915: Handle idling during i915_gem_evict_something busy loops
i915_gem_evict_something() is charged with finding a slot within the GTT
that we may reuse. Since our goal is not to stall, we first look for a
slot that only overlaps idle vma. To this end, on the first pass we move
any active vma to the end of the search list. However, we only stopped
moving active vma after we see the first active vma twice. If during the
search, that first active vma completed, we would not notice and keep on
extending the search list.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1746
Fixes: 2850748ef8 ("drm/i915: Pull i915_vma_pin under the vm->mutex")
Fixes: b1e3177bd1 ("drm/i915: Coordinate i915_active with its own mutex")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v5.5+
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200509115217.26853-1-chris@chris-wilson.co.uk
(cherry picked from commit 73e28cc40b)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2020-05-13 14:39:41 -07:00
Florian Fainelli
99addbe31f net: broadcom: Select BROADCOM_PHY for BCMGENET
The GENET controller on the Raspberry Pi 4 (2711) is typically
interfaced with an external Broadcom PHY via a RGMII electrical
interface. To make sure that delays are properly configured at the PHY
side, ensure that we the dedicated Broadcom PHY driver
(CONFIG_BROADCOM_PHY) is enabled for this to happen.

Fixes: 402482a6a7 ("net: bcmgenet: Clear ID_MODE_DIS in EXT_RGMII_OOB_CTRL when not needed")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:49:07 -07:00
David S. Miller
69cad59d8a Merge branch 'tipc-fixes'
Tuong Lien says:

====================
tipc: add some patches

This series adds patches to fix some issues in TIPC streaming & service
subscription.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:33:19 -07:00
Tuong Lien
88690b1079 tipc: fix failed service subscription deletion
When a service subscription is expired or canceled by user, it needs to
be deleted from the subscription list, so that new subscriptions can be
registered (max = 65535 per net). However, there are two issues in code
that can cause such an unused subscription to persist:

1) The 'tipc_conn_delete_sub()' has a loop on the subscription list but
it makes a break shortly when the 1st subscription differs from the one
specified, so the subscription will not be deleted.

2) In case a subscription is canceled, the code to remove the
'TIPC_SUB_CANCEL' flag from the subscription filter does not work if it
is a local subscription (i.e. the little endian isn't involved). So, it
will be no matches when looking for the subscription to delete later.

The subscription(s) will be removed eventually when the user terminates
its topology connection but that could be a long time later. Meanwhile,
the number of available subscriptions may be exhausted.

This commit fixes the two issues above, so as needed a subscription can
be deleted correctly.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:33:19 -07:00
Tuong Lien
0771d7df81 tipc: fix memory leak in service subscripting
Upon receipt of a service subscription request from user via a topology
connection, one 'sub' object will be allocated in kernel, so it will be
able to send an event of the service if any to the user correspondingly
then. Also, in case of any failure, the connection will be shutdown and
all the pertaining 'sub' objects will be freed.

However, there is a race condition as follows resulting in memory leak:

       receive-work       connection        send-work
              |                |                |
        sub-1 |<------//-------|                |
        sub-2 |<------//-------|                |
              |                |<---------------| evt for sub-x
        sub-3 |<------//-------|                |
              :                :                :
              :                :                :
              |       /--------|                |
              |       |        * peer closed    |
              |       |        |                |
              |       |        |<-------X-------| evt for sub-y
              |       |        |<===============|
        sub-n |<------/        X    shutdown    |
    -> orphan |                                 |

That is, the 'receive-work' may get the last subscription request while
the 'send-work' is shutting down the connection due to peer close.

We had a 'lock' on the connection, so the two actions cannot be carried
out simultaneously. If the last subscription is allocated e.g. 'sub-n',
before the 'send-work' closes the connection, there will be no issue at
all, the 'sub' objects will be freed. In contrast the last subscription
will become orphan since the connection was closed, and we released all
references.

This commit fixes the issue by simply adding one test if the connection
remains in 'connected' state right after we obtain the connection lock,
then a subscription object can be created as usual, otherwise we ignore
it.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Reported-by: Thang Ngo <thang.h.ngo@dektech.com.au>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:33:18 -07:00
Tuong Lien
c726858945 tipc: fix large latency in smart Nagle streaming
Currently when a connection is in Nagle mode, we set the 'ack_required'
bit in the last sending buffer and wait for the corresponding ACK prior
to pushing more data. However, on the receiving side, the ACK is issued
only when application really  reads the whole data. Even if part of the
last buffer is received, we will not do the ACK as required. This might
cause an unnecessary delay since the receiver does not always fetch the
message as fast as the sender, resulting in a large latency in the user
message sending, which is: [one RTT + the receiver processing time].

The commit makes Nagle ACK as soon as possible i.e. when a message with
the 'ack_required' arrives in the receiving side's stack even before it
is processed or put in the socket receive queue...
This way, we can limit the streaming latency to one RTT as committed in
Nagle mode.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:33:18 -07:00
David S. Miller
f3fbc5a380 Merge branch 's390-fixes'
Ursula Braun says:

====================
s390/net: updates 2020-05-13

please apply the fix from Wei Yongjun to netdev's net tree and
add Karsten Graul as co-maintainer for drivers/s390/net.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:14:51 -07:00
Ursula Braun
be7fa20f05 MAINTAINERS: add Karsten Graul as S390 NETWORK DRIVERS maintainer
Add Karsten as additional maintainer for drivers/s390/net .
One of his focal points is the ism driver.

Cc: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:14:51 -07:00
Wei Yongjun
29b74cb75e s390/ism: fix error return code in ism_probe()
Fix to return negative error code -ENOMEM from the smcd_alloc_dev()
error handling case instead of 0, as done elsewhere in this function.

Fixes: 684b89bc39 ("s390/ism: add device driver for internal shared memory")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-13 12:14:51 -07:00
Jens Axboe
9d9e88a24c io_uring: polled fixed file must go through free iteration
When we changed the file registration handling, it became important to
iterate the bulk request freeing list for fixed files as well, or we
miss dropping the fixed file reference. If not, we're leaking references,
and we'll get a kworker stuck waiting for file references to disappear.

This also means we can remove the special casing of fixed vs non-fixed
files, we need to iterate for both and we can just rely on
__io_req_aux_free() doing io_put_file() instead of doing it manually.

Fixes: 0558955373 ("io_uring: refactor file register/unregister/update handling")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-13 13:00:00 -06:00
Samu Nuutamo
333e22db22 hwmon: (da9052) Synchronize access with mfd
When tsi-as-adc is configured it is possible for in7[0123]_input read to
return an incorrect value if a concurrent read to in[456]_input is
performed. This is caused by a concurrent manipulation of the mux
channel without proper locking as hwmon and mfd use different locks for
synchronization.

Switch hwmon to use the same lock as mfd when accessing the TSI channel.

Fixes: 4f16cab19a ("hwmon: da9052: Add support for TSI channel")
Signed-off-by: Samu Nuutamo <samu.nuutamo@vincit.fi>
[rebase to current master, reword commit message slightly]
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-05-13 10:06:09 -07:00
Babu Moger
37486135d3 KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c
Though rdpkru and wrpkru are contingent upon CR4.PKE, the PKRU
resource isn't. It can be read with XSAVE and written with XRSTOR.
So, if we don't set the guest PKRU value here(kvm_load_guest_xsave_state),
the guest can read the host value.

In case of kvm_load_host_xsave_state, guest with CR4.PKE clear could
potentially use XRSTOR to change the host PKRU value.

While at it, move pkru state save/restore to common code and the
host_pkru field to kvm_vcpu_arch.  This will let SVM support protection keys.

Cc: stable@vger.kernel.org
Reported-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Message-Id: <158932794619.44260.14508381096663848853.stgit@naples-babu.amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-05-13 11:27:41 -04:00
Amy Shih
7b2fd270af hwmon: (nct7904) Fix incorrect range of temperature limit registers
The format of temperature limitation registers are 8-bit 2's complement
and the range is -128~127.
Converts the reading value to signed char to fix the incorrect range
of temperature limitation registers.

Signed-off-by: Amy Shih <amy.shih@advantech.com.tw>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-05-13 07:24:51 -07:00
Amy Shih
6d44e43f22 hwmon: (nct7904) Read all SMI status registers in probe function
When nct7904 power up, it compares current sensor readings against the
default threshold immediately. This results in false alarms on startup.
Read all SMI status registers in probe function to clear the alarms.

Signed-off-by: Amy Shih <amy.shih@advantech.com.tw>
[groeck: Reworded description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-05-13 07:23:11 -07:00
Trond Myklebust
4fa7ef69e2 NFS/pnfs: Don't use RPC_TASK_CRED_NOREF with pnfs
When we're doing pnfs then the credential being used for the RPC call
is not necessarily the same as the one used in the open context, so
don't use RPC_TASK_CRED_NOREF.

Fixes: 6129650720 ("NFSv4: Avoid referencing the cred unnecessarily during NFSv4 I/O")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2020-05-13 09:55:36 -04:00
Prashant Malani
5c4edcdbcd usb: typec: mux: intel: Fix DP_HPD_LVL bit field
According to the PMC Type C Subsystem (TCSS) Mux programming guide rev
0.6, the PMC HPD request LVL bit field is bit 4.
Fix the definition here to match the programming guide.

Since this bit field is changing, explicitly define a field for the
HPD_HIGH mode data bit.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Fixes: 6701adfa96 ("usb: typec: driver for Intel PMC mux control")
Reviewed-by: Benson Leung <bleung@chromium.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200511091837.102508-1-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:33:51 +02:00
Greg Kroah-Hartman
c34a4f9ddf USB: fixes for v5.7-rc5
Fixing raw-gadget's IOCTL return value. Enabling EXTCON for Intel
 Merrifield. Couple leaks have been plugged in net2272 and
 twl6030-usb. Returning an error code when things fail in cdc and ncm
 legacy gadgets. An old bug on dwc3 regarding HWO bit handling has been
 fixed.
 
 Apart from these, some minor fixes.
 
 Signed-off-by: Felipe Balbi <balbi@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEElLzh7wn96CXwjh2IzL64meEamQYFAl62ZQ4RHGJhbGJpQGtl
 cm5lbC5vcmcACgkQzL64meEamQaGOxAA4EgEisBUMVM3Y2GGe0TN0YPMRZg6nwdx
 clo0/04I/+LyeR4BMkoTb7VEOwBJ6nLm8pl7LPlREXXGq+0EpyKMOA1YWQAfBrxi
 WvA6Q6U71hFcqdz/6PqWwKV6FugRFA/OKzJy/au4ZLqFFy+scapOmhDv2w/HjZdB
 D4Srh9gFGZwxrvtjHH5MAtdBp1jPqo+iU0sEokuz6Gl0dj4yUMUvewgljA++WSvn
 DBuxfvRFu28aAmGk5J85WFjwrVBfeADNdUAxM9EAdGxFFuf+LmU0n16mwi/g7eHC
 e1e7eDQcxdjPBSmMDICfK+injf1/dHH90LukfG8agtimW53/HvqMXxu/CGDuH1VF
 Z4H9B3oFPjTL0nE38GUhTSke+vCReleW2bw/H1yMu9eXzpEN8NZQ75srok9vawOX
 weevIMOO+F4vlzbMs0qr0lQUChJX4652V3cCnLTydCDRbG6zlQ7PqwGpecOF3QTv
 3QoLqLG8YOIVfFb/i+VvrbUe+CbEj5OpfEmNH1g9/qY/3sgO4dD91O0VZBGjUpqp
 34VFxEgqnffV3El2RbLI5X1Tv6+FJK0rCF+NNlpd1M7iSGTT8hRVjVH4EG5U8QEx
 IzFRpfal8cwSQy6ePIVyC2DxddyQ4CMy59R1Ra4UaBa9pVVQYf+kx05btY9i2XaJ
 JnPyzw7KwVU=
 =RbWM
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

USB: fixes for v5.7-rc5

Fixing raw-gadget's IOCTL return value. Enabling EXTCON for Intel
Merrifield. Couple leaks have been plugged in net2272 and
twl6030-usb. Returning an error code when things fail in cdc and ncm
legacy gadgets. An old bug on dwc3 regarding HWO bit handling has been
fixed.

Apart from these, some minor fixes.

Signed-off-by: Felipe Balbi <balbi@kernel.org>

* tag 'fixes-for-v5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
  usb: raw-gadget: fix return value of ep read ioctls
  usb: dwc3: select USB_ROLE_SWITCH
  usb: gadget: legacy: fix error return code in gncm_bind()
  usb: gadget: legacy: fix error return code in cdc_bind()
  usb: gadget: legacy: fix redundant initialization warnings
  usb: gadget: tegra-xudc: Fix idle suspend/resume
  usb: gadget: net2272: Fix a memory leak in an error handling path in 'net2272_plat_probe()'
  usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()'
  usb: cdns3: gadget: prev_req->trb is NULL for ep0
  usb: gadget: audio: Fix a missing error return value in audio_bind()
  usb: dwc3: pci: Enable extcon driver for Intel Merrifield
  dwc3: Remove check for HWO flag in dwc3_gadget_ep_reclaim_trb_sg()
2020-05-13 14:31:56 +02:00
Al Cooper
c33f4f24b8 usb: host: Add ability to build new Broadcom STB USB drivers
Add the build system changes needed to get the Broadcom STB XHCI,
EHCI and OHCI functionality working. The OHCI support does not
require anything unique to Broadcom so the standard ohci-platform
driver is being used. Also update MAINTAINERS.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20200512150019.25903-6-alcooperx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:29:09 +02:00
Al Cooper
9df231511b usb: ehci: Add new EHCI driver for Broadcom STB SoC's
Add a new EHCI driver for Broadcom STB SoC's. A new EHCI driver
was created instead of adding support to the existing ehci platform
driver because of the code required to work around bugs in the EHCI
controller. The primary workaround is for a bug where the Core
violates the SOF interval between the first two SOFs transmitted after
resume. This only happens if the resume occurs near the end of a
microframe. The fix is to intercept the ehci-hcd request to complete
RESUME and align it to the start of the next microframe.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200512150019.25903-5-alcooperx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:28:01 +02:00
Al Cooper
1036e760d8 usb: xhci: xhci-plat: Add support for Broadcom STB SoC's
Add support for Broadcom STB SoC's to the xhci platform driver

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20200512150019.25903-4-alcooperx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:28:01 +02:00
Al Cooper
4e6cc9d07f dt-bindings: Add Broadcom STB USB support
Add DT bindings for Broadcom STB USB EHCI and XHCI drivers.

NOTE: The OHCI driver is not included because it uses the generic
      platform driver.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20200512150019.25903-3-alcooperx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:28:01 +02:00
Bryan O'Donoghue
18a6c866bb usb: typec: tps6598x: Add USB role switching logic
This patch adds USB role switch support to the tps6598x.

The setup to initiate or accept a data-role switch is both assumed and
currently required to be baked-into the firmware as described in TI's
document here.

Link: https://www.ti.com/lit/an/slva843a/slva843a.pdf

With this change its possible to use the USB role-switch API to detect and
notify role-switches to downstream consumers.

Tested with a ChipIdea controller on a Qualcomm MSM8939.

Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20200511231930.2825183-2-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:23:25 +02:00
Bryan O'Donoghue
0ef1f6e380 usb: typec: tps6598x: Add OF probe binding
Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
setting.

Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507214733.1982696-3-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:23:25 +02:00
Bryan O'Donoghue
5f3173370e dt-bindings: usb: Add TI tps6598x device tree binding documentation
Add device tree binding documentation for the Texas Instruments tps6598x
Type-C chip driver.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20200507214733.1982696-2-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:23:25 +02:00
Heikki Krogerus
2cab683fda MAINTAINERS: Add entry for Intel PMC mux driver
I will be maintaining the Intel PMC mux control driver.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507150900.12102-5-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:20:50 +02:00
Heikki Krogerus
1f478dc2a1 usb: typec: Add firmware documentation for the Intel PMC mux control
Adding documentation that describes how the PMC mux-agent
function is described in the ACPI tables.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507150900.12102-4-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:20:49 +02:00
Heikki Krogerus
ff4a30d5e2 usb: typec: mux: intel_pmc_mux: Support for static SBU/HSL orientation
The SBU and HSL orientation may be fixed/static from the mux
PoW. Apparently the retimer may take care of the orientation
of these lines. Handling the static SBU (AUX) and HSL
orientation with device properties.

If the SBU orientation is static, a device property
"sbu-orintation" can be used. When the property exists, the
driver always sets the SBU orientation according to the
property value, and when it's not set, the driver uses the
cable plug orientation with SBU.

And with static HSL orientation, "hsl-orientation" device
property can be used in the same way.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507150900.12102-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:20:49 +02:00
Heikki Krogerus
8c49c9ee4a usb: typec: Add typec_find_orientation()
Function that converts orientation string into orientation
value.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507150900.12102-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 14:20:49 +02:00