Commit graph

1044022 commits

Author SHA1 Message Date
Liu, Zhan
45d65c0f09 drm/amd/display: Fix B0 USB-C DP Alt mode
[Why]
Starting from B0, along with RDPCSTX, RDPCSPIPE registers are also used.

[How]
Make sure RDPCSPIPE registers are programmed correctly.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Zhan Liu <Zhan.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
(cherry picked from commit bdd1a21b52)
2021-10-05 10:17:32 -04:00
Arnd Bergmann
34186b48d2
ARM: sharpsl_param: work around -Wstringop-overread warning
gcc warns that accessing a pointer based on a numeric constant may
be an offset into a NULL pointer, and would therefore has zero
accessible bytes:

arch/arm/common/sharpsl_param.c: In function ‘sharpsl_save_param’:
arch/arm/common/sharpsl_param.c:43:9: error: ‘memcpy’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread]
   43 |         memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this particular case, the warning is bogus since this is the actual
pointer, not an offset on a NULL pointer. Add a local variable to shut
up the warning and hope it doesn't come back.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Mack <daniel@zonque.org>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
Link: https://lore.kernel.org/r/20210927145332.2784005-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:44:56 +02:00
Arnd Bergmann
efa767b372 i.MX fixes for 5.15:
- Revert cc8870bf4c to fix the regression on i.MX6 that suspend
   support becomes broken.
 - Add `qca,clk-out-frequency` property to fix Ethernet support on
   imx6qdl-pico board.
 - Re-enable FB support in imx_v6_v7_defconfig.  It gets lost due to
   f611b1e762 ("drm: Avoid circular dependencies for CONFIG_FB").
 - Fix LP5562 LED support on imx6dl-yapp4 board.
 - Add missing pinctrl-names for panel on M53Menlo board.
 - Fix USB host power regulator polarity on M53Menlo board.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmFMHfQUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7QUwf/dO+FrGSWlVxHeG/oKMb6iQqZs0zb
 40F68OYCF+ucGJlwAkErnLcqxtC7rD8NHsGvxnXMbTNlhtjl5USw0tIki+3cw1EP
 LggbTjlOCRDLnF2YmWfXN+hLz5On38TG9TvvWt8x2CBO9WXgipaG8JHCCsxdXZus
 vk37hZSAlwqmkXHHDApBMsMTqma8ZlDRELrgnXeHL53pYFDxKWoOhL0WHvvZ+kFO
 I3lnIB4FdAOgm+EoAAW2s6v/IJobhC19KoKBrtf3FRo6KQk5A6L8T2CFPMkL0cFf
 zJboFIOmwMnw00O44RWKDPWDQKKMZYJubj+zHaAnUFRfg4D9KKSDQApffA==
 =oDbx
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcVfsACgkQmmx57+YA
 GNmUehAAr7UZBN5CH87GjCp4bzDir3tVgKA1xpGaixsk1DgfweQujxvLcVfsb2OX
 rFJuxsMHg2Yhfya73gq4aAHFY0BX0rkgQQmtrQluU1vnHDzzCZsdEdJEnrUg7OdQ
 x5E/nbG8AumoLxrVKPPvP/fYINB9LTHj+EFj5OpF0psyakGE+G3r2pZuea2sB45l
 dOm8L+b4vgT5VfgPRy3l+7sc1orYMJ6C1NaTMELRSaVl9HjSl/r3grC7oahT+dam
 zFWwFQoM0WJDru05utbmrWx0z4oeMt+nHY/kuMMbTRsqioqYaTin+ZBiyJxQilUf
 5Gy6cZZPE6p8CpNoImQgzVCezwS0g1Jm6/SYafytnhpKSAiHVhcSErL2hbWLS0PV
 2ysxj/vxLHszII7yQnJbyfZJO76oT5uOnaJFzMySrPhgW1FKWv8v+c3f/Tf3hf3y
 SyMdpw7pv1LaY4HB+hxw8GRbGMOOXkanGNjlgb1jr2KNRzC+U+1HYui3Lxq+0HRY
 lPlkavMGrAGHDayd4oSQ/T44+0QfopXIG2Njnu6cV2ekzoJhcnDHVwJs+4eiRqVL
 DWcX4DjRBg1SaAW/F55h0ja8j3Pe3hP1afA7G4HyyhG0maPdUreqg0vdNaQNYk4m
 F6BFeYSRHlVJQIne6CO9wgEhhYK7007tRJacNKU1XAtNMsiyDdQ=
 =giT+
 -----END PGP SIGNATURE-----

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

i.MX fixes for 5.15:

- Revert cc8870bf4c to fix the regression on i.MX6 that suspend
  support becomes broken.
- Add `qca,clk-out-frequency` property to fix Ethernet support on
  imx6qdl-pico board.
- Re-enable FB support in imx_v6_v7_defconfig.  It gets lost due to
  f611b1e762 ("drm: Avoid circular dependencies for CONFIG_FB").
- Fix LP5562 LED support on imx6dl-yapp4 board.
- Add missing pinctrl-names for panel on M53Menlo board.
- Fix USB host power regulator polarity on M53Menlo board.

* tag 'imx-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v6_v7_defconfig: enable fb
  ARM: dts: imx6qdl-pico: Fix Ethernet support
  ARM: dts: imx: Fix USB host power regulator polarity on M53Menlo
  ARM: dts: imx: Add missing pinctrl-names for panel on M53Menlo
  Revert "ARM: imx6q: drop of_platform_default_populate() from init_machine"
  ARM: dts: imx6dl-yapp4: Fix lp5562 LED driver probe

Link: https://lore.kernel.org/r/20210923063356.GK13480@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:41:15 +02:00
Linus Walleij
a694905931
ARM: defconfig: gemini: Restore framebuffer
The framebuffer is gone on the D-Link DIR-685, restore it.

Fixes: f611b1e762 ("drm: Avoid circular dependencies for CONFIG_FB")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210922200933.1825752-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:40:52 +02:00
Arnd Bergmann
b9af50bcbc ARM: dove: mark 'putc' as inline
This can cause a randconfig warning without the 'inline' flag
that every other platform uses:

In file included from arch/arm/boot/compressed/misc.c:29:
arch/arm/mach-dove/include/mach/uncompress.h:14:13: error: 'putc' defined but not used [-Werror=unused-function]
   14 | static void putc(const char c)
      |             ^~~~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20210927095343.1015422-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:40:38 +02:00
Arnd Bergmann
94ad8aacbc ARM: omap1: move omap15xx local bus handling to usb.c
Commit 38225f2ef2 ("ARM/omap1: switch to use dma_direct_set_offset for
lbus DMA offsets") removed a lot of mach/memory.h, but left the USB
offset handling split into arch/arm/mach-omap1/usb.c and
drivers/usb/host/ohci-omap.c.

This can cause a randconfig build warning that now fails the build
with -Werror:

arch/arm/mach-omap1/usb.c:561:30: error: 'omap_1510_usb_ohci_nb' defined but not used [-Werror=unused-variable]
  561 | static struct notifier_block omap_1510_usb_ohci_nb = {
      |                              ^~~~~~~~~~~~~~~~~~~~~

Move it all into the platform file to get rid of the final
location that relies on mach/memory.h.

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210927144118.2464881-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:39:50 +02:00
Arnd Bergmann
6147eb53bb Qualcomm driver fixes for v5.15
This restricts the QCOM_SCM driver to depend on ARCH_QCOM, to reduce
 it's presence after becoming a loadable module.
 
 It then fixes a regression in the mdt_loader, where firmware with the
 hash segment marked as PT_LOAD would no longer be accepted, preventing
 several MSM8974 and SDM660 devices from loading remoteproc firmware.
 
 Lastly it corrects the drvdata associated with the socinfo device during
 probe, to match that expected by the remove function.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmFVJj0bHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FvDEP/iON76XThrTEUVeNGSoj
 19UvpdYhdZuD81H5hHxyqQR1MA2GODoYRzvp3UiWxvJbTN8a3TGX+67O1b5Pe+1g
 CtauaLgUpi8OzariDrLUomvxco1D0Gpmoi1eBmwGD88ZDxnH12qHrvTlezm9NDNa
 GvIdSPBh5ScbICtWQlNu5aYQDlXYLOF6tV85jSdsuA3pGiDtgOriHMwZqVsgLaRG
 ARvvBMPCt3876wEg2mBbLSay/69KHUIGEa8n/j0+oaiGQBlCg3VGKHzUPtwBotpw
 1vPJz3QBg+kJlCAVqv2c+vnTllRwZkpZv7uFteu5IQsnqaRQa3a6OD6G2ywaKDtS
 1wbHTb8cCjLhUU+P1bUXpQwjrB4g1r0OroWiAMA0zK1yf8Qe5RfYfZ8uOkviHhS0
 6dZbHm5i9B2Tj+aCva4BLTTqGUy6Ui0IR8QGo4C437EvXHPVNEYo7xlX2LCN3+31
 zBW9LmGDLbABbRmxi6Xb66JPwlt6RKzNfUxNCEtUiVSrVUEHnkaiqrZ2Mx+2c2iV
 WyrmqPE2oLN5yBk1rfgoZ8klHAcaCZ50/WDIHADyIlxYclW7MybEWAhRrBx8Strj
 V3bj23ek2c0OvZ92FppeFH7xChEzPyMdigoVybOb7LkhJUI7AiNgWS21T55AuR+2
 XdOLoj7vFBkQBiIWGTE/n4rT
 =c3Iv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcVTwACgkQmmx57+YA
 GNl7IhAAj2kkD3PKGfeonFoYThA3G0Fze8j/cJ9cjNnrIJWtly7dAR6CYgbcVzjk
 0jCZl6+OUJAyNN06mDU1aeWNw56iUvLfNyRonHHqIY6uDerYlqme17DcAmTeHS20
 1+wdWGRDZjHmat1gqwtDojxVw+vmYbv21oVm80JaxgbR1ZBpZcrU47j1w5aXV9Jy
 LaehiomJ5LgS1sSpdh8sNq+we7+zuwJV2V4ERR9mIdOWrpD2+nPTVPNMR5tn41ei
 tKl672t9JcbpGaS3h6KDjIGZM5kEJSJyjBlBqgVagHoLebnvaRrugqcBpbGqbuXR
 YkfA87cnMBene0JjO12Ms1S7B2zqKmAUBZQaTwT48SEroE2hfCCos98MYKlMFulU
 GoJoMPN/oCJ9PfOOXcCCC2yaKHc9yDxklWbImVBnl41Lzg6rAFaw33wFdC40jV2X
 bLG3yFeFZpCTM1xpbE3rhC1ilu89/iqQ2ko+ggD+Yl74Sx5qfP/2UxGAY+AqeMdz
 mkRKTMaZIBWOLWPH/tNRxefmOOWzD27gzcelJLc7NG6Zc9/pifXNQ0sRyM0I8uYA
 +RyzToJrguwyfSzL7EdxrGn9HrWFtx1olYpD69VH+XzHHYPsLLc+EzyNFIQgNPvT
 MwvCimWl2NqR/w4bZJ3Az0Mfkk61bOdYjrNrxdv3ndImrZhEbbM=
 =x5sv
 -----END PGP SIGNATURE-----

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

Qualcomm driver fixes for v5.15

This restricts the QCOM_SCM driver to depend on ARCH_QCOM, to reduce
it's presence after becoming a loadable module.

It then fixes a regression in the mdt_loader, where firmware with the
hash segment marked as PT_LOAD would no longer be accepted, preventing
several MSM8974 and SDM660 devices from loading remoteproc firmware.

Lastly it corrects the drvdata associated with the socinfo device during
probe, to match that expected by the remove function.

* tag 'qcom-drivers-fixes-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom_scm: QCOM_SCM should depend on ARCH_QCOM
  soc: qcom: mdt_loader: Drop PT_LOAD check on hash segment
  soc: qcom: socinfo: Fixed argument passed to platform_set_data()

Link: https://lore.kernel.org/r/20210930025456.1035-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:38:04 +02:00
Arnd Bergmann
04e0ae8d2b Qualcomm ARM64 DTS fixes for 5.15
This starts by reverting the SC7280 CPUfreq update, which was merged
 before concensus about the associated drivers changes was reached.
 
 It then moves the reserved-memory changes done to get IPA working on the
 Lenovo Yoga C630 into the Yoga specific DTS, as changing the memory map
 on the platform level did break a couple of the other boards.
 
 It fixes the HDMI audio on Trogdor and add missing Aggre2 NOC qos clocks
 on SDM6{30,36,60} which prevented some boards from booting.
 
 Lastly it enables the PON module on SM8250/QRB5165, as the lack thereof
 is blocking automated testing in LKFT.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmFVJG0bHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FERkQAM3FaUFBCPGOTfUUrn0U
 3SVgzk2i6z+lw3YKWXxsx0248aGwHQX2+DgvnPdP7Fr2B+TVYZFP/bIXLQoL2OFP
 F05g1dXsLxEBsCAt03DrJc6mLDBFVl3qdgBySqtWTjpIaV3lqlR3YBazxxltKWcW
 pFh2fqAZVhaUgP4Di+4CCyW5I87rojnEIRzZ4e/AHF64+96dpjumzjBCgE/azki7
 m981qvT+q4EyErVY83kkwc7B4hDmCoMxqKbFhQCfbw3TbogT8Md6ZZwJUskP5Ku9
 1ILcO7U2fW2PVeqL6cvzxbIkxEYGVeHxoLK1Cw90z5ChOYK5EEH1IPkZ+P6x0mhN
 3SDI0Yl5HnZ1PpLRXMcNWcID7qARN/ZDajP+u48d3cOHB8KeJM7eAQ1mDeAT7/HB
 vFMTQiqiosqSknEoHCI6mtMtZ+mq6CelDEH3Lr0IjK0siH80yfirCcNpWqDTlmmq
 Z9+bFl32unChO1VVAoH+/hTydyFkue0rNG8dvub/QrGZPbVBzKDaDsLIWy1EavgU
 C65uzihAHzywUfGq+iCgqANIsSTld9qS6Q2fNLg9JKkXNTzcpAd6W8kK/SYSId1p
 ozXU8z85PFHEcd+9MbJLL4K1vJy7zaoUU2l0vyrv2zxR2f7oHZODuN/8Sjh5HawF
 bvyXXiQVQjqnBO4yBuuXGZ3/
 =QK4n
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcVP8ACgkQmmx57+YA
 GNnaShAAjz6TDZZTGWga9CVadv6uMOstX/4XQ2sTfvUT3avEP8gJCA6VwffmanBl
 PQSCslzL9YZn55nH9DXd9CAGTtp/WG75ENNoIUr8x/fsSi/Xd2XYnGcWG3MHWSxm
 kn03S1mK+QLKmV+K7IUYL/sGrjDQfMDTxHhUPULvtI9DAvdL94hRpPEl6YSJgUSZ
 bxiK805q3/biQxCmQ6mzTvRxijbb7fEJ5cOTr4gZKGadtiW4NpNFQgRTnBTN9As/
 caGKNcpbEEpddrwdJIwk81ppx6nlNP6VmfYmOc1FJfQKSZNCYRxA4atngKE/WBsr
 O8BEj4JlUFGFx+oL6DgYyq873l5yhGTJb09pq4WU2m/mAFJBV8uEEYrumWgoK3mE
 XT7Pluh9uFOojjDPMzLLd2JHKjQm+aBzXwBqtyemp6we9iR8oL1QvPq6ajHEHelj
 Y4IByE64DsfjAmX4CrpMmLSC1NiOP0Zy18ehTijlcpArfmCdDi9919sm1OQtiWwB
 fNCU1nx/Wu/W1EDzY5rAWedlDa6NqA/gL1kx/OzasQMbC8VTPAtRM/bhZPj6vrle
 nfkhsjKsbof+lxQEyS7VUwYN2Egy/K3YjVHmqckAF4aej6i7ZFeYGdQ4NLp5aPzl
 Mm2yhfh7eT47UdhKeRyGhhdAsPItevrQyvgTxWfgkyYpA15L/eg=
 =lLJz
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DTS fixes for 5.15

This starts by reverting the SC7280 CPUfreq update, which was merged
before concensus about the associated drivers changes was reached.

It then moves the reserved-memory changes done to get IPA working on the
Lenovo Yoga C630 into the Yoga specific DTS, as changing the memory map
on the platform level did break a couple of the other boards.

It fixes the HDMI audio on Trogdor and add missing Aggre2 NOC qos clocks
on SDM6{30,36,60} which prevented some boards from booting.

Lastly it enables the PON module on SM8250/QRB5165, as the lack thereof
is blocking automated testing in LKFT.

* tag 'qcom-arm64-fixes-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: sdm630: Add missing a2noc qos clocks
  arm64: dts: qcom: qrb5165-rb5: enabled pwrkey and resin nodes
  arm64: dts: qcom: pm8150: specify reboot mode magics
  arm64: dts: qcom: pm8150: use qcom,pm8998-pon binding
  arm64: dts: qcom: sc7180-trogdor: Fix lpass dai link for HDMI
  arm64: dts: qcom: sdm850-yoga: Reshuffle IPA memory mappings
  Revert "arm64: dts: qcom: sc7280: Fixup the cpufreq node"

Link: https://lore.kernel.org/r/20210930025509.1091-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:37:03 +02:00
Arnd Bergmann
2ecfddb105 Juno/Vexpress fixes for v5.15
Bunch of DTS fixes to resolve addressing issues with some of the device
 nodes, dropping unused/undocumented properties in various nodes, and
 aligning node names with dtschema.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmFRoAMACgkQAEG6vDF+
 4pg36hAArryRAl9lXly7K6DMK5CmUaRfrwrq+ZRd3Ay/ot3qXjwHenrUtYa5Qgjl
 gzk7O/i/nUZ8snTsf8d6LaI/XBpYIAXiB/VNrFEK+SrejU48h8k+oiPTo8nFcdv7
 HaGtGrAcHRLaQnDnAnpdH/jvUiWSmwItAiHZ15Z5pYjQJo+WOR6MtSCIM//y7755
 1dxLhrKboofs0UN/uTKQnf+3e7tMtFYls7dhGZqx/BPer+EPAiBduxSqfOU6qC0D
 ncgjkXA/ixDCYzbfWorGtYeNEPjQ1+25Eo+miLfD9VSprLtABUhY5mpU6OZdTMLu
 AD498p/14YODD6/iKFWuwxOv9tusVnLYKbCi7f2j2HFNvHo0DvAF+f3wOuvvk6VZ
 euO0ZL9wi8GtuL8ucQG0BEZqowYySOT11O5q3VFdF9Z3hNT3VH01FEJxfSYnuigw
 FGKpW/F34iVUqoN2pfBEoS8TGp8bctrcH6GYNrMc+I+WBvq5oCGXPPxEO2wioYQj
 XxuU2kzAmztkkVnUpzItz+p1uQoyq8FpAhlJHlpRTJ6yD5ADdPJWPko1yKjP82o0
 esZDmwmW86guanC2iCVceijwXl0URlULrp45ZRITnxBxoRYKHu3oikG3xhghEU+d
 5wVtFWYCiERsHqCcHBA3MtD3sJ8iSouQ4wi/deWYOQg7yemvL6c=
 =t92O
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcVMMACgkQmmx57+YA
 GNno/w/+Ore7cFcGJmHnarzStAuf4a1xO62SFVp0vCpxPCDbB8HROOqejjtLZlkZ
 tA2TqToVfyIIkhxddJgpmU3HDyjTI+79pu7/TWbnL2m22l+HH1HYOn66PQra8Omg
 GDgrfYc5wb7ijAcOxyNNy5o4mB3AqksbW6AgE+AMlbZftiaTRIM/pNxkA5xfwcUf
 1Hm1gRvatzegdginF54wCkaKb4hrfEvwQUQHqGcQD8rK8BL10ue2vHBVTvCVESyi
 6daMi3KjKTo/3kKd0LmFG/Z9Z6kYvDq0K0Zkz9tFLpX1FesoMy0nNTf0sIWt5foP
 WSgTOnjOu660kRqBqMuMWF/M9D58zyPA9CjTv43gIkEPttKbh65H3JUJF5AdiBDc
 zkisF5AuXolbJmNfJE0mZRI5gtIYSDTCqOPgMCz0g5HOcaeU4DGXz4Pc3t5PFmRK
 7LlDyWruesblCe41Ry2sdAlfSlHMQ7Nz2+b4oDK6SmtxGgAEL7Kg29nWarCkNdpH
 EEmg/ZmnBPmZEBFKivwPXJoLsR810mmDYP8JBUuaIjr1l78i7FS3PP8jWdcy9KCQ
 222dvYJSDJ8Aack7TileX5/Dgy/5pCgUmzAbQymadhmZGVQ2ck35jDSzW3y1H98y
 iYrOHZEreuspCXb4ruLAxeTanrJStHg1+EYSgLDXutQzt4Gr6Ek=
 =YUKB
 -----END PGP SIGNATURE-----

Merge tag 'juno-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

 Juno/Vexpress fixes for v5.15

Bunch of DTS fixes to resolve addressing issues with some of the device
nodes, dropping unused/undocumented properties in various nodes, and
aligning node names with dtschema.

* tag 'juno-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm: dts: vexpress: Fix motherboard bus 'interrupt-map'
  arm: dts: vexpress: Fix addressing issues with 'motherboard-bus' nodes
  arm: dts: vexpress-v2p-ca9: Fix the SMB unit-address
  arm: dts: vexpress: Drop unused properties from motherboard node
  arm64: dts: arm: drop unused interrupt-names in MHU
  ARM: dts: arm: align watchdog and mmc node names with dtschema
  arm64: dts: arm: align watchdog and mmc node names with dtschema
  arm64: dts: fvp: Remove panel timings

Link: https://lore.kernel.org/r/20210927105249.3583380-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:36:03 +02:00
Arnd Bergmann
c147392b65 Qualcomm DTS fixes for v5.15
This corrects the use of depricated chipid and clock names, for which
 support was finally dropped from the driver. It also ensures that the
 DSI PLL is fed by the correct clock, now that it's being migrated to not
 rely on global clock names.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmFVI2QbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FFUwP+wX+3kpgbggkS3i1WkX7
 A2TKXn35FSbn6co3GLcC8vdtsdAuXo+zdGGvRqScXa2hOIN255hpPCkuPwNr8jlP
 OO1VvxSthrLqnv20iKJGuWjw1UNiGHf8yy1ifPYNXhCWuuQfdpKXZJJNT36sskx5
 cVbMzayUwKyswmGYKvLPCmRZbcuvHq5FUPz9f9OZFxwRBsvL91tDMDPUlPXL3Xb7
 i0Y9sYy1U2sUC9O4NTCEOMO8KQWj5vGgHQ6J/26tIoPfs4dw6NdjLoXHDESi2tlT
 rabNHImvvFkT4/KxIr/Z4STyR5q34Q5miuvslQToCe6DvARE0wP+urlDTngXJe5+
 5UxTYGmZ3hQe+khy+gCJ6VFQU6v2R0YiU+/UvvXJquPkppP7JccX8SrV5FVd6oc7
 zHs6Oej6MSjgH738oqB4d4M8o3Bgo+2vTtNM0N0S6Ccn7GRtaLXsJtQ3cKwZlyAt
 lfrPEoMEAsGXRu6afNidRKv2MF4KCtMKp09ZjyztWJXH4mqN/0h5uAK4Bz8xhGuq
 B3MPjOsRl8pOvszW+mG9Efc5cJt2W+fWH4ZlYDBcEywdTCHD5gLakKFQW8iIxLZb
 QCTkfc+qfjBQMGiFmVJnjj0TxPf3IkCuh8Es397pJxG1Nrj5h8ghazTd51Xvg3/w
 VDilbU0R/0paKQEts4riKmZv
 =xHHw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcVCwACgkQmmx57+YA
 GNkpEw/+OgfIFF/1v9TYSMEIuQLZGpyXu2Efp4bj9hroO9IPZ778ju5XPetp5s6s
 QVZUMWKyFRRKTCn5MHjx15fKrQiW5UhZXPZiXXee9UiAH7/v3o5ZpC0/YEy7rDf/
 qzMyxj623h7zqIYGGpn/DSh9xbdgoHnOU2WXv0xR0Vkkdq+cwLP9684gmtXpl3yY
 KBE5lopoKqortsA1WAxdqKNg1KC9QUvITDZ7J0cNVp4q3BwvxkVDT0/E+vsTbCuy
 OPgdP0BE45XqzQvPL2MqIyTAk8VgTWZ8mAtcIM5wdYGS1n0s7v2tspFCd8PWkfL0
 KBmdojBL//vp7xxzvVGqzwFAfnlnHybnnAeoosh18fKbyKRZ0DNasM8Fiq7PpNKY
 HFy01WYgZGNRFSdXP0Lgwn6iS7Ksf8+H+lUTT1C9hPRse54XCmbclqj46GsoP71w
 o1rC2OafSiUD2LKK4DJA9l/Ygk9a0uj0nl/zBwS/ROYvRu7v90cQtTVI6Up5NC/B
 09Viyntbn5Hh//Wh8QFi7gc38QGwrjqXOUvYXA9vv3A1xdoilodLrD8glz+gMm/W
 +BdhSnSMOIe8dkL5sZMED4Oj1WQggvOpH2jfNRLr0630xAc9A5TDyOmgreRnAC2G
 SyJ18zGfyWQVnwIdDkcFtoVrI2x0/51tpD+Ur5AYIp17oFaxsIY=
 =C1Zc
 -----END PGP SIGNATURE-----

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

Qualcomm DTS fixes for v5.15

This corrects the use of depricated chipid and clock names, for which
support was finally dropped from the driver. It also ensures that the
DSI PLL is fed by the correct clock, now that it's being migrated to not
rely on global clock names.

* tag 'qcom-dts-fixes-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  ARM: dts: qcom: apq8064: update Adreno clock names
  ARM: dts: qcom: apq8064: Use 27MHz PXO clock as DSI PLL reference
  ARM: dts: qcom: apq8064: use compatible which contains chipid

Link: https://lore.kernel.org/r/20210930025526.1146-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:33:32 +02:00
Arnd Bergmann
325c81e3fd AT91 fixes #2 for 5.15:
- More fixes for AT91 platform power management code related to the
   introduction of sama7g5:
   - management of DDR3L regulator rails for sama7g5ek
   - loading of TLB on different cores
 
 - PIO controller slew-rate settings for sama7g5ek: be aligned with
   datasheet requirements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ5TRCVIBiyi/S+BG4fOrpwrNPNDAUCYVrmgAAKCRAfOrpwrNPN
 DC+cAP4xdLuKn1ClN3SVVutTuw9V0gRntjjcNhtWtJMl5RBxoQD/aD7cqFJZbAJA
 FP6nrsy7RYfXLQv87Wm/v5xsTi5Ctwc=
 =x2my
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcU+8ACgkQmmx57+YA
 GNnxeRAAvlG4HA7w9eQ9qhbqd8rh+tOJpXDzhL9M6bDiPby/34k1Mi0Tu9+/CbRQ
 vZj8KCIFLTUWdraESpLHnAuwYG6nqpW6uN+EPMPpMXaLPyPajzJb2jSMDWBSWUNn
 5GuE5pfgsJBC8dK3xy7eiI/AC0+m83K6slkE39jk4WbbqFDAaO+/ST96cW7Th7KI
 NOxnvTjCqzTpwxyi0r90vZ1bRbiPN0NYqNYt/90EliPGFZ6z4BJHPBf9bEzbiepd
 Hhvmlum7iaPIahLCCRTH6cOJruSyKDGWD0QaLx6rlX06tDQI7CueJiD4X2kKginm
 tSSu8PsVwjMDS5tQtuPfmyralTct78l6O2+25TJ/Bc90FUxi79AF3W9Ii6jyxof8
 3fXhVx5n/uUBkU77ri7+/qbVVlz+0J7qpowRB/W9XKCrkXgS7LG7Nhpdv7GFBWeT
 u8F+eLkJwqvwP7Dn9uDRzQfHlQJr2yA9T1rjl4mlWD5P7yam2uqDb3RAlNrk4uZh
 tTtRhLCOPD2QrEEslqCfqq5Z0c4f0FLYN3uAWZxVkQLfBDru7UopNjQZ/uuxvh2q
 bbAU3h08f6ePJRUJ2meT61ByLKTnF0Y3bW/r2+e6mVoHkRu64jIHDP9UQmMT6fTa
 i3rwTXqABZpIyrmcph8qAmyBSHB5WqXoWRCJEH732UPUkUJdIPQ=
 =8NKm
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes

AT91 fixes #2 for 5.15:

- More fixes for AT91 platform power management code related to the
  introduction of sama7g5:
  - management of DDR3L regulator rails for sama7g5ek
  - loading of TLB on different cores

- PIO controller slew-rate settings for sama7g5ek: be aligned with
  datasheet requirements.

* tag 'at91-fixes-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama7g5ek: to not touch slew-rate for SDMMC pins
  ARM: dts: at91: sama7g5ek: use proper slew-rate settings for GMACs
  ARM: at91: pm: preload base address of controllers in tlb
  ARM: at91: pm: group constants and addresses loading
  ARM: dts: at91: sama7g5ek: add suspend voltage for ddr3l rail

Link: https://lore.kernel.org/r/20211004114344.19304-1-nicolas.ferre@microchip.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:32:31 +02:00
Nishanth Menon
dd6a2ed801
MAINTAINERS: Add Vignesh to TI K3 platform maintainership
Add Vignesh to TI K3 platform maintainership. We will rotate roles for
each kernel version to help spread the work load a little better.

Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20210915121308.26795-1-nm@ti.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:31:52 +02:00
Arnd Bergmann
f81fd21476 Fix OP-TEE shm_pool lint warning
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEFV+gSSXZJY9ZyuB5LinzTIcAHJcFAmFB18waHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQLinzTIcAHJfBbQ/+P4A36HbemyujbgGwR9WM
 a6Yp4cjWZj/yelv0/71vpZb9Ly34eGkSoaBOCUd5HuOq58tRmWm7cyPtK2O8EwhY
 a2aAc2mcTFvzRTRJHoaBlPAj4DlOpEybJaSIvU04AOZKhaVtgPJsthFphJ417c98
 +WrBWLVa/Y1u7/wX2yqKrjJB0QNJnqpWnX4mNlwL0b0TINZ+oBsaN7iP3EWGz/rC
 oWB8GKnVHikb0Qk27xLcpcgC2FKFXPtXBpT3Xs/oIBKvmcONzkp2hm8QiFW1pQdJ
 fl7d606utkg9hONSUZj6xM3f9zmqHzR47FCs+Wgp41G+YNjVuvjK4c2+l7KbjtRe
 tYMAFeRIHkEXkWrjhe1eE8keXMGrxeUoxgjZpZP0Xue9A+H0k8M9FvYdjlPOgU8q
 L7ttXqiMN33ALd6DxRGRmYmMYRKG56cXS0vMVEK0sceP9HAsSZ0gvXC7ny/jaFY/
 9TUkSvhHaWw5SWQRvkwI/ZoKDpyKP2UZTRD1NOOJcwFatlpu4JBrLE9QyiAIz2/s
 yLjp4KoZzsA7vSIfpdrHLWKRxrP1mf5D6nIvYNT9l5sohPnPV1xf05JkpZ3pkwTX
 M4MsSMP1WW/Qdanv41Bxg1MzvBMqErjVkerOGnQlunDg6QG3EVODB7nHq5h3ECgE
 S193iaOuLlNc76gmOCBfWnw=
 =htLP
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFcU4wACgkQmmx57+YA
 GNlAxA/+OTYyhxb8FiT1tHqPnO33oA8Gf5XIz/T2uMPKj8uY89Rcrf/rwAFUjMYa
 DgtlsXU0ncP3UpbnqEdY8DyoxyVYglHMJZYUCXH25Wvz7ixY6H/5sRy1885hoZoy
 27vcFtjoUIM8AgkX11eWPBVDcP2kcRwsq9vMcap2tTekxlmkds6gDyK/l3WyM9M8
 zJdlMwdVLok50u3anOk99YyZJu2fPa2n+7hIg1W5fm9gUhzvO0Kt0XrbbEK95CRZ
 +iRT6VpsQZUtxln8czW7suxMsiQshr1EmbDYCiiSmeYrobjh4H6zhwSPQdGIs1Mx
 6yngZCfJjNtBa+ExujnFbwUYTIpvpN/8yAE/7gT/BzjVQLDvyFpqF0JjdEjbTxTA
 IkaIDHS4naM/FobgXuK3XkoKeQQAtkFBnizPi1KgAdZWqJAFudxWeR3tR62pyTTJ
 S3SQWDNDgjMpr7rmFtwMbAYA7CiffVnKQGw8uoTkAz4e06Tu6i/3hRu7fuu6F/oU
 8cvL0u4cnm/IIZ8wwwIfOn6IJqN1b7H+rSt4hI92NaZv6u2307X238Nuo/Nh6rEZ
 4MFL37gxSbsS/x0JGSnYSfuJryGnKOTylXIIiSq4OJtaONLBE/41lGYEOkQ0W0Xd
 vHYQrAKRncSmKDS+ZrW3hrOpRR9QVbHA4RzEPqT3vORjjLfGCRs=
 =66au
 -----END PGP SIGNATURE-----

Merge tag 'optee-fix-for-v5.15' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes

Fix OP-TEE shm_pool lint warning

* tag 'optee-fix-for-v5.15' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee/optee/shm_pool: fix application of sizeof to pointer

Link: https://lore.kernel.org/r/20210915113813.GA509196@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:30:52 +02:00
Eric Dumazet
7707a4d01a netlink: annotate data races around nlk->bound
While existing code is correct, KCSAN is reporting
a data-race in netlink_insert / netlink_sendmsg [1]

It is correct to read nlk->bound without a lock, as netlink_autobind()
will acquire all needed locks.

[1]
BUG: KCSAN: data-race in netlink_insert / netlink_sendmsg

write to 0xffff8881031c8b30 of 1 bytes by task 18752 on cpu 0:
 netlink_insert+0x5cc/0x7f0 net/netlink/af_netlink.c:597
 netlink_autobind+0xa9/0x150 net/netlink/af_netlink.c:842
 netlink_sendmsg+0x479/0x7c0 net/netlink/af_netlink.c:1892
 sock_sendmsg_nosec net/socket.c:703 [inline]
 sock_sendmsg net/socket.c:723 [inline]
 ____sys_sendmsg+0x360/0x4d0 net/socket.c:2392
 ___sys_sendmsg net/socket.c:2446 [inline]
 __sys_sendmsg+0x1ed/0x270 net/socket.c:2475
 __do_sys_sendmsg net/socket.c:2484 [inline]
 __se_sys_sendmsg net/socket.c:2482 [inline]
 __x64_sys_sendmsg+0x42/0x50 net/socket.c:2482
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881031c8b30 of 1 bytes by task 18751 on cpu 1:
 netlink_sendmsg+0x270/0x7c0 net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:703 [inline]
 sock_sendmsg net/socket.c:723 [inline]
 __sys_sendto+0x2a8/0x370 net/socket.c:2019
 __do_sys_sendto net/socket.c:2031 [inline]
 __se_sys_sendto net/socket.c:2027 [inline]
 __x64_sys_sendto+0x74/0x90 net/socket.c:2027
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 18751 Comm: syz-executor.0 Not tainted 5.14.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011

Fixes: da314c9923 ("netlink: Replace rhash_portid with bound")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 13:11:09 +01:00
Wong Vee Khee
e3cf002d5a net: pcs: xpcs: fix incorrect CL37 AN sequence
According to Synopsys DesignWare Cores Ethernet PCS databook, it is
required to disable Clause 37 auto-negotiation by programming bit-12
(AN_ENABLE) to 0 if it is already enabled, before programming various
fields of VR_MII_AN_CTRL registers.

After all these programming are done, it is then required to enable
Clause 37 auto-negotiation by programming bit-12 (AN_ENABLE) to 1.

Fixes: b97b5331b8 ("net: pcs: add C37 SGMII AN support for intel mGbE controller")
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 13:10:24 +01:00
Sean Anderson
25a9da6641 net: sfp: Fix typo in state machine debug string
The string should be "tx_disable" to match the state enum.

Fixes: 4005a7cb4f ("net: phy: sftp: print debug message with text, not numbers")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 13:08:13 +01:00
Johan Hovold
58fc1daa4d USB: cdc-acm: fix break reporting
A recent change that started reporting break events forgot to push the
event to the line discipline, which meant that a detected break would
not be reported until further characters had been receive (the port
could even have been closed and reopened in between).

Fixes: 08dff274ed ("cdc-acm: fix BREAK rx code path adding necessary calls")
Cc: stable@vger.kernel.org
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210929090937.7410-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:50:52 +02:00
Johan Hovold
65a205e611 USB: cdc-acm: fix racy tty buffer accesses
A recent change that started reporting break events to the line
discipline caused the tty-buffer insertions to no longer be serialised
by inserting events also from the completion handler for the interrupt
endpoint.

Completion calls for distinct endpoints are not guaranteed to be
serialised. For example, in case a host-controller driver uses
bottom-half completion, the interrupt and bulk-in completion handlers
can end up running in parallel on two CPUs (high-and low-prio tasklets,
respectively) thereby breaking the tty layer's single producer
assumption.

Fix this by holding the read lock also when inserting characters from
the bulk endpoint.

Fixes: 08dff274ed ("cdc-acm: fix BREAK rx code path adding necessary calls")
Cc: stable@vger.kernel.org
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210929090937.7410-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:50:52 +02:00
Pavel Hofman
0560c9c552 usb: gadget: f_uac2: fixed EP-IN wMaxPacketSize
Async feedback patches broke enumeration on Windows 10 previously fixed
by commit 789ea77310 ("usb: gadget: f_uac2: always increase endpoint
max_packet_size by one audio slot").

While the existing calculation for EP OUT capture for async mode yields
size+1 frame due to uac2_opts->fb_max > 0, playback side lost the +1
feature.  Therefore the +1 frame addition must be re-introduced for
playback. Win10 enumerates the device only when both EP IN and EP OUT
max packet sizes are (at least) +1 frame.

Fixes: e89bb42883 ("usb: gadget: u_audio: add real feedback implementation")
Cc: stable <stable@vger.kernel.org>
Tested-by: Henrik Enquist <henrik.enquist@gmail.com>
Tested-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20210924080027.5362-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:50:09 +02:00
Rikard Falkeborn
04d2b75537 usb: cdc-wdm: Fix check for WWAN
CONFIG_WWAN_CORE was with CONFIG_WWAN in commit 89212e160b ("net: wwan:
Fix WWAN config symbols"), but did not update all users of it. Change it
back to use CONFIG_WWAN instead.

Fixes: 89212e160b ("net: wwan: Fix WWAN config symbols")
Cc: <stable@vger.kernel.org>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20210929194547.46954-2-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:49:23 +02:00
Fabio Estevam
8253a34bfa usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle
When passing 'phys' in the devicetree to describe the USB PHY phandle
(which is the recommended way according to
Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt) the
following NULL pointer dereference is observed on i.MX7 and i.MX8MM:

[    1.489344] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098
[    1.498170] Mem abort info:
[    1.500966]   ESR = 0x96000044
[    1.504030]   EC = 0x25: DABT (current EL), IL = 32 bits
[    1.509356]   SET = 0, FnV = 0
[    1.512416]   EA = 0, S1PTW = 0
[    1.515569]   FSC = 0x04: level 0 translation fault
[    1.520458] Data abort info:
[    1.523349]   ISV = 0, ISS = 0x00000044
[    1.527196]   CM = 0, WnR = 1
[    1.530176] [0000000000000098] user address but active_mm is swapper
[    1.536544] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[    1.542125] Modules linked in:
[    1.545190] CPU: 3 PID: 7 Comm: kworker/u8:0 Not tainted 5.14.0-dirty #3
[    1.551901] Hardware name: Kontron i.MX8MM N801X S (DT)
[    1.557133] Workqueue: events_unbound deferred_probe_work_func
[    1.562984] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
[    1.568998] pc : imx7d_charger_detection+0x3f0/0x510
[    1.573973] lr : imx7d_charger_detection+0x22c/0x510

This happens because the charger functions check for the phy presence
inside the imx_usbmisc_data structure (data->usb_phy), but the chipidea
core populates the usb_phy passed via 'phys' inside 'struct ci_hdrc'
(ci->usb_phy) instead.

This causes the NULL pointer dereference inside imx7d_charger_detection().

Fix it by also searching for 'phys' in case 'fsl,usbphy' is not found.

Tested on a imx7s-warp board.

Fixes: 746f316b75 ("usb: chipidea: introduce imx7d USB charger detection")
Cc: stable@vger.kernel.org
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921113754.767631-1-festevam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:47:26 +02:00
Xu Yang
6d91017a29 usb: typec: tcpm: handle SRC_STARTUP state if cc changes
TCPM for DRP should do the same action as SRC_ATTACHED when cc changes in
SRC_STARTUP state. Otherwise, TCPM will transition to SRC_UNATTACHED state
which is not satisfied with the Type-C spec.

Per Type-C spec:
DRP port should move to Unattached.SNK instead of Unattached.SRC if sink
removed.

Fixes: 4b4e02c831 ("typec: tcpm: Move out of staging")
cc: <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20210928111639.3854174-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:47:00 +02:00
Xu Yang
05300871c0 usb: typec: tcpci: don't handle vSafe0V event if it's not enabled
USB TCPCI Spec, 4.4.3 Mask Registers:
"A masked register will still indicate in the ALERT register, but shall
not set the Alert# pin low."

Thus, the Extended Status will still indicate in ALERT register if vSafe0V
is detected by TCPC even though being masked. In current code, howerer,
this event will not be handled in detection time. Rather it will be
handled when next ALERT event coming(CC evnet, PD event, etc).

Tcpm might transition to a wrong state in this situation. Thus, the vSafe0V
event should not be handled when it's masked.

Fixes: 766c485b86 ("usb: typec: tcpci: Add support to report vSafe0V")
cc: <stable@vger.kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20210926101415.3775058-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:46:46 +02:00
Heikki Krogerus
b87d8d0d4c usb: typec: tipd: Remove dependency on "connector" child fwnode
There is no "connector" child node available on every
platform, so the driver can't fail to probe when it's
missing.

Fixes: 57560ee95c ("usb: typec: tipd: Don't block probing of consumer of "connector" nodes")
Cc: stable@vger.kernel.org # 5.14+
Reported-by: "Regupathy, Rajaram" <rajaram.regupathy@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210930124758.23233-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:46:22 +02:00
Eric Dumazet
a56d447f19 net/sched: sch_taprio: properly cancel timer from taprio_destroy()
There is a comment in qdisc_create() about us not calling ops->reset()
in some cases.

err_out4:
	/*
	 * Any broken qdiscs that would require a ops->reset() here?
	 * The qdisc was never in action so it shouldn't be necessary.
	 */

As taprio sets a timer before actually receiving a packet, we need
to cancel it from ops->destroy, just in case ops->reset has not
been called.

syzbot reported:

ODEBUG: free active (active state 0) object type: hrtimer hint: advance_sched+0x0/0x9a0 arch/x86/include/asm/atomic64_64.h:22
WARNING: CPU: 0 PID: 8441 at lib/debugobjects.c:505 debug_print_object+0x16e/0x250 lib/debugobjects.c:505
Modules linked in:
CPU: 0 PID: 8441 Comm: syz-executor813 Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:debug_print_object+0x16e/0x250 lib/debugobjects.c:505
Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 af 00 00 00 48 8b 14 dd e0 d3 e3 89 4c 89 ee 48 c7 c7 e0 c7 e3 89 e8 5b 86 11 05 <0f> 0b 83 05 85 03 92 09 01 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e c3
RSP: 0018:ffffc9000130f330 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: ffff88802baeb880 RSI: ffffffff815d87b5 RDI: fffff52000261e58
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815d25ee R11: 0000000000000000 R12: ffffffff898dd020
R13: ffffffff89e3ce20 R14: ffffffff81653630 R15: dffffc0000000000
FS:  0000000000f0d300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffb64b3e000 CR3: 0000000036557000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __debug_check_no_obj_freed lib/debugobjects.c:987 [inline]
 debug_check_no_obj_freed+0x301/0x420 lib/debugobjects.c:1018
 slab_free_hook mm/slub.c:1603 [inline]
 slab_free_freelist_hook+0x171/0x240 mm/slub.c:1653
 slab_free mm/slub.c:3213 [inline]
 kfree+0xe4/0x540 mm/slub.c:4267
 qdisc_create+0xbcf/0x1320 net/sched/sch_api.c:1299
 tc_modify_qdisc+0x4c8/0x1a60 net/sched/sch_api.c:1663
 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2403
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2457
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2486
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80

Fixes: 44d4775ca5 ("net/sched: sch_taprio: reset child qdiscs before freeing them")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Davide Caratti <dcaratti@redhat.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Acked-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:45:27 +01:00
Ben Hutchings
4d1aa9112c Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
This reverts commit cb9c1cfc86 for
USB_LED_TRIG.  This config symbol has bool type and enables extra code
in usb_common itself, not a separate driver.  Enabling it should not
force usb_common to be built-in!

Fixes: cb9c1cfc86 ("usb: Kconfig: using select for USB_COMMON dependency")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Link: https://lore.kernel.org/r/20210921143442.340087-1-carnil@debian.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:45:16 +02:00
Andy Shevchenko
268bbde716 usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
The commit c6e23b89a9 ("usb: dwc3: gadget: set gadgets parent to the right
controller") changed the device for the UDC and broke the user space scripts
that instantiate the USB gadget(s) via ConfigFS.

Revert it for now until the better solution will be proposed.

Fixes: c6e23b89a9 ("usb: dwc3: gadget: set gadgets parent to the right controller")
Tested-by: Ferry Toth <fntoth@gmail.com>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211004141839.49079-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:44:24 +02:00
David S. Miller
64506cb928 Merge branch 'bridge-fixes'
Eric Dumazet says:

====================
net: bridge: br_get_linkxstats_size() fixes

This patch series attempts to fix the following syzbot report.

WARNING: CPU: 1 PID: 21425 at net/core/rtnetlink.c:5388 rtnl_stats_get+0x80f/0x8c0 net/core/rtnetlink.c:5388
Modules linked in:
CPU: 1 PID: 21425 Comm: syz-executor394 Not tainted 5.13.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:rtnl_stats_get+0x80f/0x8c0 net/core/rtnetlink.c:5388
Code: e9 9c fc ff ff 4c 89 e7 89 0c 24 e8 ab 8b a8 fa 8b 0c 24 e9 bc fc ff ff 4c 89 e7 e8 9b 8b a8 fa e9 df fe ff ff e8 61 85 63 fa <0f> 0b e9 f7 fc ff ff 41 be ea ff ff ff e9 f9 fc ff ff 41 be 97 ff
RSP: 0018:ffffc9000cf77688 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 000000000000012c RCX: 0000000000000000
RDX: ffff8880211754c0 RSI: ffffffff8711571f RDI: 0000000000000003
RBP: ffff8880175aa780 R08: 00000000ffffffa6 R09: ffff88823bd5c04f
R10: ffffffff87115413 R11: 0000000000000001 R12: ffff8880175aab74
R13: ffff8880175aab40 R14: 00000000ffffffa6 R15: 0000000000000006
FS:  0000000001ff9300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005cfd58 CR3: 000000002cd43000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5562
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1929
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4440d9
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:39:19 +01:00
Eric Dumazet
0854a05133 net: bridge: fix under estimation in br_get_linkxstats_size()
Commit de1799667b ("net: bridge: add STP xstats")
added an additional nla_reserve_64bit() in br_fill_linkxstats(),
but forgot to update br_get_linkxstats_size() accordingly.

This can trigger the following in rtnl_stats_get()

	WARN_ON(err == -EMSGSIZE);

Fixes: de1799667b ("net: bridge: add STP xstats")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:39:07 +01:00
Eric Dumazet
dbe0b88064 net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
bridge_fill_linkxstats() is using nla_reserve_64bit().

We must use nla_total_size_64bit() instead of nla_total_size()
for corresponding data structure.

Fixes: 1080ab95e3 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:39:07 +01:00
Arnd Bergmann
3ea75b3f57 usb: xhci: tegra: mark PM functions as __maybe_unused
The added #ifdefs in the PM rework were almost correct, but still
cause warnings in some randconfig builds:

drivers/usb/host/xhci-tegra.c:2147:12: error: 'tegra_xusb_resume' defined but not used [-Werror=unused-function]
 2147 | static int tegra_xusb_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~
drivers/usb/host/xhci-tegra.c:2105:12: error: 'tegra_xusb_suspend' defined but not used [-Werror=unused-function]
 2105 | static int tegra_xusb_suspend(struct device *dev)

Replace the #ifdef checks with simpler __maybe_unused annotations to
reliably shut up these warnings.

Link: https://lore.kernel.org/all/20210421135613.3560777-2-arnd@kernel.org/
Fixes: 971ee24706 ("usb: xhci: tegra: Enable ELPG for runtime/system PM")
Reviewed-by: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20211005112057.2700888-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-05 13:38:54 +02:00
Hayes Wang
baf33d7a75 r8152: avoid to resubmit rx immediately
For the situation that the disconnect event comes very late when the
device is unplugged, the driver would resubmit the RX bulk transfer
after getting the callback with -EPROTO immediately and continually.
Finally, soft lockup occurs.

This patch avoids to resubmit RX immediately. It uses a workqueue to
schedule the RX NAPI. And the NAPI would resubmit the RX. It let the
disconnect event have opportunity to stop the submission before soft
lockup.

Reported-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Tested-by: Jason-ch Chen <jason-ch.chen@mediatek.com>
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:38:39 +01:00
Jakub Kicinski
3f6cffb860 etherdevice: use __dev_addr_set()
Andrew points out that eth_hw_addr_set() replaces memcpy()
calls so we can't use ether_addr_copy() which assumes
both arguments are 2-bytes aligned.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-05 12:38:39 +01:00
David Howells
5c0522484e afs: Fix afs_launder_page() to set correct start file position
Fix afs_launder_page() to set the starting position of the StoreData RPC at
the offset into the page at which the modified data starts instead of at
the beginning of the page (the iov_iter is correctly offset).

The offset got lost during the conversion to passing an iov_iter into
afs_store_data().

Changes:
ver #2:
 - Use page_offset() rather than manually calculating it[1].

Fixes: bd80d8a80e ("afs: Use ITER_XARRAY for writing")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/YST/0e92OdSH0zjg@casper.infradead.org/ [1]
Link: https://lore.kernel.org/r/162880783179.3421678.7795105718190440134.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/162937512409.1449272.18441473411207824084.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/162981148752.1901565.3663780601682206026.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163005741670.2472992.2073548908229887941.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163221839087.3143591.14278359695763025231.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163292980654.4004896.7134735179887998551.stgit@warthog.procyon.org.uk/ # v2
2021-10-05 11:22:06 +01:00
David Howells
330de47d14 netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
Fix netfs_clear_unread() to pass READ to iov_iter_xarray() instead of WRITE
(the flag is about the operation accessing the buffer, not what sort of
access it is doing to the buffer).

Fixes: 3d3c950467 ("netfs: Provide readahead and readpage netfs helpers")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cifs@vger.kernel.org
cc: linux-nfs@vger.kernel.org
cc: v9fs-developer@lists.sourceforge.net
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/162729351325.813557.9242842205308443901.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/162886603464.3940407.3790841170414793899.stgit@warthog.procyon.org.uk
Link: https://lore.kernel.org/r/163239074602.1243337.14154704004485867017.stgit@warthog.procyon.org.uk
2021-10-05 11:22:06 +01:00
Dave Wysochanski
a0e25f0a0d cachefiles: Fix oops with cachefiles_cull() due to NULL object
When cachefiles_cull() calls cachefiles_bury_object(), it passes
a NULL object.  When this occurs, either trace_cachefiles_unlink()
or trace_cachefiles_rename() may oops due to the NULL object.
Check for NULL object in the tracepoint and if so, set debug_id
to MAX_UINT as was done in 2908f5e101.

The following oops was seen with xfstests generic/100.
BUG: kernel NULL pointer dereference, address: 0000000000000010
...
RIP: 0010:trace_event_raw_event_cachefiles_unlink+0x4e/0xa0 [cachefiles]
...
 Call Trace:
   cachefiles_bury_object+0x242/0x430 [cachefiles]
   ? __vfs_removexattr_locked+0x10f/0x150
   ? vfs_removexattr+0x51/0xd0
   cachefiles_cull+0x84/0x120 [cachefiles]
   cachefiles_daemon_cull+0xd1/0x120 [cachefiles]
   cachefiles_daemon_write+0x158/0x190 [cachefiles]
   vfs_write+0xbc/0x260
   ksys_write+0x4f/0xc0
   do_syscall_64+0x3b/0x90

The following oops was seen with xfstests generic/290.
BUG: kernel NULL pointer dereference, address: 0000000000000010
...
RIP: 0010:trace_event_raw_event_cachefiles_rename+0x54/0xa0 [cachefiles]
...
Call Trace:
  cachefiles_bury_object+0x35c/0x430 [cachefiles]
  cachefiles_cull+0x84/0x120 [cachefiles]
  cachefiles_daemon_cull+0xd1/0x120 [cachefiles]
  cachefiles_daemon_write+0x158/0x190 [cachefiles]
  vfs_write+0xbc/0x260
  ksys_write+0x4f/0xc0
  do_syscall_64+0x3b/0x90

Fixes: 2908f5e101 ("fscache: Add a cookie debug ID and use that in traces")
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://listman.redhat.com/archives/linux-cachefs/2021-October/msg00009.html
2021-10-05 11:22:06 +01:00
Ville Syrjälä
b2d73debfd drm/i915: Extend the async flip VT-d w/a to skl/bxt
Looks like skl/bxt/derivatives also need the plane stride
stretch w/a when using async flips and VT-d is enabled, or
else we get corruption on screen. To my surprise this was
even documented in bspec, but only as a note on the
CHICHKEN_PIPESL register description rather than on the
w/a list.

So very much the same thing as on HSW/BDW, except the bits
moved yet again.

Cc: stable@vger.kernel.org
Cc: Karthik B S <karthik.b.s@intel.com>
Fixes: 55ea1cb178 ("drm/i915: Enable async flips in i915")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930190943.17547-1-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit d08df3b0bd)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-05 11:52:48 +03:00
Lukasz Majczak
fdddf8c3a4 drm/i915/bdb: Fix version check
With patch "drm/i915/vbt: Fix backlight parsing for VBT 234+"
the size of bdb_lfp_backlight_data structure has been increased,
causing if-statement in the parse_lfp_backlight function
that comapres this structure size to the one retrieved from BDB,
always to fail for older revisions.
This patch calculates expected size of the structure for a given
BDB version and compares it with the value gathered from BDB.
Tested on Chromebook Pixelbook (Nocturne) (reports bdb->version = 221)

Fixes: d381baad29 ("drm/i915/vbt: Fix backlight parsing for VBT 234+")

Tested-by: Lukasz Majczak <lma@semihalf.com>
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930134606.227234-1-lma@semihalf.com
(cherry picked from commit 4378daf5d0)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-05 11:52:48 +03:00
Imre Deak
a532cde31d drm/i915/tc: Fix TypeC port init/resume time sanitization
Atm during driver loading and system resume TypeC ports are accessed
before their HW/SW state is synced. Move the TypeC port sanitization to
the encoder's sync_state hook to fix this.

v2: Handle the encoder disabled case in gen11_dsi_sync_state() as well
    (Jose, Jani)

Fixes: f9e76a6e68 ("drm/i915: Add an encoder hook to sanitize its state during init/resume")
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210929132833.2253961-1-imre.deak@intel.com
(cherry picked from commit 7194dc998d)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-05 11:52:48 +03:00
Maarten Lankhorst
0c94777386 drm/i915: Fix runtime pm handling in i915_gem_shrink
We forgot to call intel_runtime_pm_put on error, fix it!

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: cf41a8f1dc ("drm/i915: Finally remove obj->mm.lock.")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: <stable@vger.kernel.org> # v5.13+
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210830121006.2978297-9-maarten.lankhorst@linux.intel.com
(cherry picked from commit 239f3c2ee1)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-05 11:52:47 +03:00
Kai-Heng Feng
ffac30be2a drm/i915/audio: Use BIOS provided value for RKL HDA link
Commit 989634fb49 ("drm/i915/audio: set HDA link parameters in
driver") makes HDMI audio on Lenovo P350 disappear.

So in addition to TGL, extend the logic to RKL to use BIOS provided
value to fix the regression.

Fixes: 989634fb49 ("drm/i915/audio: set HDA link parameters in driver")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210906041300.508458-1-kai.heng.feng@canonical.com
(cherry picked from commit c6b40ee330)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-10-05 11:52:41 +03:00
Jan Beulich
9c11112c0e xen/x86: adjust data placement
Both xen_pvh and xen_start_flags get written just once early during
init. Using the respective annotation then allows the open-coded placing
in .data to go away.

Additionally the former, like the latter, wants exporting, or else
xen_pvh_domain() can't be used from modules.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/8155ed26-5a1d-c06f-42d8-596d26e75849@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:19 +02:00
Jan Beulich
59f7e53741 x86/PVH: adjust function/data placement
Two of the variables can live in .init.data, allowing the open-coded
placing in .data to go away. Another "variable" is used to communicate a
size value only to very early assembly code, which hence can be both
const and live in .init.*. Additionally two functions were lacking
__init annotations.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/3b0bb22e-43f4-e459-c5cb-169f996b5669@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:17 +02:00
Jan Beulich
079c4baa2a xen/x86: hook up xen_banner() also for PVH
This was effectively lost while dropping PVHv1 code. Move the function
and arrange for it to be called the same way as done in PV mode. Clearly
this then needs re-introducing the XENFEAT_mmu_pt_update_preserve_ad
check that was recently removed, as that's a PV-only feature.

Since the string pointed at by pv_info.name describes the mode, drop
"paravirtualized" from the log message while moving the code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/de03054d-a20d-2114-bb86-eec28e17b3b8@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:14 +02:00
Jan Beulich
4d1ab432ac xen/x86: generalize preferred console model from PV to PVH Dom0
Without announcing hvc0 as preferred it won't get used as long as tty0
gets registered earlier. This is particularly problematic with there not
being any screen output for PVH Dom0 when the screen is in graphics
mode, as the necessary information doesn't get conveyed yet from the
hypervisor.

Follow PV's model, but be conservative and do this for Dom0 only for
now.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/582328b6-c86c-37f3-d802-5539b7a86736@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:12 +02:00
Jan Beulich
42bc9716bc xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU
xenboot_write_console() is dealing with these quite fine so I don't see
why xenboot_console_setup() would return -ENOENT in this case.

Adjust documentation accordingly.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/3d212583-700e-8b2d-727a-845ef33ac265@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:05 +02:00
Jan Beulich
8e24d9bfc4 xen/x86: allow "earlyprintk=xen" to work for PV Dom0
With preferred consoles "tty" and "hvc" announced as preferred,
registering "xenboot" early won't result in use of the console: It also
needs to be registered as preferred. Generalize this from being DomU-
only so far.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/d4a34540-a476-df2c-bca6-732d0d58c5f0@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:02 +02:00
Jan Beulich
adf330a7cd xen/x86: make "earlyprintk=xen" work better for PVH Dom0
The xen_hvm_early_write() path better wouldn't be taken in this case;
while port 0xE9 can be used, the hypercall path is quite a bit more
efficient. Put that first, as it may also work for DomU-s (see also
xen_raw_console_write()).

While there also bail from the function when the first
domU_write_console() failed - later ones aren't going to succeed.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/4fd89dcb-cfc5-c740-2e94-bb271e432d3e@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:36:00 +02:00
Jan Beulich
cae7d81a37 xen/x86: allow PVH Dom0 without XEN_PV=y
Decouple XEN_DOM0 from XEN_PV, converting some existing uses of XEN_DOM0
to a new XEN_PV_DOM0. (I'm not convinced all are really / should really
be PV-specific, but for starters I've tried to be conservative.)

For PVH Dom0 the hypervisor populates MADT with only x2APIC entries, so
without x2APIC support enabled in the kernel things aren't going to work
very well. (As opposed, DomU-s would only ever see LAPIC entries in MADT
as of now.) Note that this then requires PVH Dom0 to be 64-bit, as
X86_X2APIC depends on X86_64.

In the course of this xen_running_on_version_or_later() needs to be
available more broadly. Move it from a PV-specific to a generic file,
considering that what it does isn't really PV-specific at all anyway.

Note that xen/interface/version.h cannot be included on its own; in
enlighten.c, which uses SCHEDOP_* anyway, include xen/interface/sched.h
first to resolve the apparently sole missing type (xen_ulong_t).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/983bb72f-53df-b6af-14bd-5e088bd06a08@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:35:56 +02:00
Jan Beulich
9172b5c4a7 xen/x86: prevent PVH type from getting clobbered
Like xen_start_flags, xen_domain_type gets set before .bss gets cleared.
Hence this variable also needs to be prevented from getting put in .bss,
which is possible because XEN_NATIVE is an enumerator evaluating to
zero. Any use prior to init_hvm_pv_info() setting the variable again
would lead to wrong decisions; one such case is xenboot_console_setup()
when called as a result of "earlyprintk=xen".

Use __ro_after_init as more applicable than either __section(".data") or
__read_mostly.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

Link: https://lore.kernel.org/r/d301677b-6f22-5ae6-bd36-458e1f323d0b@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-10-05 08:35:48 +02:00