Commit Graph

1169205 Commits (887185649c7ee8a9cc2d4e94de92bbbae6cd3747)

Author SHA1 Message Date
Takashi Sakamoto c7a806d9ce ALSA: firewire-motu: fix unreleased lock warning in hwdep device
Smatch static analysis tool detects that acquired lock is not released
in hwdep device when condition branch is passed due to no event. It is
unlikely to occur, while fulfilling is preferable for better coding.

Reported-by: Dan Carpenter <error27@gmail.com>
Fixes: 634ec0b290 ("ALSA: firewire-motu: notify event for parameter change in register DSP model")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230130141540.102854-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-01-31 09:34:04 +01:00
Takashi Sakamoto d8dc872046 ALSA: firewire-lib: fix uninitialized local variable
The function local variable, curr_cycle_time is declared without
initialization. When tracepoints event is not probed, it looks to be
used as is. This commit fixes it. Fortunately, the value of local variable
is not used unless the event is probed, thus this commit is for better
coding.

Reported-by: Dan Carpenter <error27@gmail.com>
Fixes: fef4e61b0b ("ALSA: firewire-lib: extend tracepoints event including CYCLE_TIME of 1394 OHCI")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230130141532.102838-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-01-31 09:32:10 +01:00
Arnd Bergmann ae3147bb30 i.MX SoC update for 6.3:
- Call ida_simple_remove() to free up ID allocated by ida_simple_get()
   for MMDC driver.
 - Add i.MX6ULZ compatible string to match table.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmPXGWgUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4FwQf/fM5s0A1RanOP1vwznuZw3SiJu2MO
 F3vjBdifg80I+ZrokOEHFwCDG4KsDw7dSA1B5Uqdt+mQ3sXJDQwQfJMJvtR7496T
 MiLLQemfNpiP+aSSV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E=
 =b4Oy
 -----END PGP SIGNATURE-----

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

i.MX SoC update for 6.3:

- Call ida_simple_remove() to free up ID allocated by ida_simple_get()
  for MMDC driver.
- Add i.MX6ULZ compatible string to match table.

* tag 'imx-soc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx: mach-imx6ul: add imx6ulz support
  ARM: imx: Call ida_simple_remove() for ida_simple_get

Link: https://lore.kernel.org/r/20230130023947.11780-2-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:15:16 +01:00
Arnd Bergmann 3f0f5d224c Samsung mach/soc changes for v6.3
1. Correct s3c64xx_set_timer_source() prototype.
 2. Re-work MIPI and DP phys as children of Exynos PMU system controller.
    This both better reflects actual device hierarchy and allows to
    remove later few warnings from dtc W=1 and dtbs_check.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmPWgyoQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1zm5D/0SnGyimYCVmaE1GeiWOSAZgnN2XQ4YEx++
 Qa77zf6CSWVhjQVberlIswfjFI+Qmv4lVk5Z2OOJbIVRhP9fDS0dI/Q5kMwrQfRf
 c5Bh+orG2f/8HgeHy1P0PdZO9QbW+irUWZ8utxmBRQedwLlkD8MkiOG/H0Bclo8z
 RKiOYdqsVe4y7LHuZBfUL8yFIEdhF4HWL9iMsCftwnEpzr4ImCr7djMlxV1QtsLC
 f25klrZYOwX8jUKjI5IaDS+/MW70qWNMO/grYnaGpTfxMrxdWKIQ7P1vfeOfbsCi
 aEahnWw0tn7YTqZoLv3IoMJbWCtRs0jcXK+bUvssSa/1mM3FpP9fK/psvB37j9u6
 SzWzjutgiJV1VeqXiKRlrbV9+QaS9WvVFV4br/GV3ZzlmB+vIJWQVdD61vlrn1EY
 xLi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Gpa1Pk8N5avq3ZO5807M2EPMCFCME=
 =+4aK
 -----END PGP SIGNATURE-----

Merge tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung mach/soc changes for v6.3

1. Correct s3c64xx_set_timer_source() prototype.
2. Re-work MIPI and DP phys as children of Exynos PMU system controller.
   This both better reflects actual device hierarchy and allows to
   remove later few warnings from dtc W=1 and dtbs_check.

* tag 'samsung-soc-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: soc: samsung: exynos-pmu: allow phys as child
  ARM: s3c: fix s3c64xx_set_timer_source prototype

Link: https://lore.kernel.org/r/20230129143944.5104-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:14:15 +01:00
Arnd Bergmann 521d844dc8 This pull request contains Broadcom ARM SoCs machine updates for 6.3,
please pull the following:
 
 - Dario removes an useless goto in the BCM63xx SMP bring up code
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmPVeYMACgkQh9CWnEQH
 BwTSShAAumaB5ywYr1E5GzXNQoxUBxgT4wRd7YokI34HcHDp4h4s2aV6fsYQehdo
 YrunKnLg46JNIw8PAgfyeMvAKumsdHIwB4h+AzQnUigGMYHZtJFrwi819TytHj62
 VP8G1JP3vEBBy9uR7E6uSAPD/L8COhra77BqjRIhrW5vSl21C0gZWBZNuavzZO6V
 hPqKf8/TNAdk9unrcS2aAw31CZ0qvZvhqKBvCsPIpy6uYbLitjChlDfSoI/4REq3
 8Bpfm3mtWSBuIdpbyuJ5H/cMgr2+K9AiIRjQXRtDR14ZqhfX+ABYIDPrXNv3mALS
 6kjfpJm4wHhuKh+8FkVaZh7tnAgt7iVK+K92E99GDBkZTCdhZBWTCwrrnpFfsqJB
 SyBoAp/iS7JCdyk1GFIP7smfB/G8OUN+03mOFHRLP0H2luDR6nLkkWN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EjQFbZAMKS90TYWP/ZwrSw=
 =jzGc
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux into arm/soc

This pull request contains Broadcom ARM SoCs machine updates for 6.3,
please pull the following:

- Dario removes an useless goto in the BCM63xx SMP bring up code

* tag 'arm-soc/for-6.3/soc' of https://github.com/Broadcom/stblinux:
  ARM: BCM63xx: remove useless goto statement

Link: https://lore.kernel.org/r/20230128193849.1628945-1-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:13:31 +01:00
Greg Kroah-Hartman 90be1f15c3 driver core: soc: remove layering violation for the soc_bus
The soc_bus code pokes around in the internal bus structures assuming
that it "knows" if a field is not set that it has not been registered
yet.  That isn't a safe assumption, so just remove the layering
violation entirely and keep track if the bus has been registered or not
ourselves.

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20230130171059.1784057-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-31 09:09:53 +01:00
Arnd Bergmann f6fae7ab6d i.MX defconfig change for 6.3:
- Drop PROVE_LOCKING option from imx_v6_v7_defconfig.
 - Enable i.MX ICC and DEVFREQ driver as they are required by i.MX8MP
   boot.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmPXLAIUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM5s6AgAjLR8Daa7NQaO8QLvuGzsuDtBT0uz
 fMNE9OvD2EGmzHdAQFYSVbYvRWZaVYXfWflXMu56Q2rJbX/6UASxQOjfS9FvVVxx
 Wj6tLyWwcddB5kpq3Bdo7z8/VUbK2ib7OQZbXYs3DQT85BDX1nm0bRA6bD2yOZ4a
 Z96NCXR4WBVS/Qbb4ezq5vKOAc+hhBG7OlCeeiZ/r3DPN8IXwgFHmhJITDKh9j0D
 Yl9lBQB/fT0VnZC/5A912tke37qqYPbPOnllMHf0HQgT8Sl4PlXSuaLi0DWse380
 cdeC0S3mUkpWBZiYSfNe7vS2GdUfZ1+Dev+R9DRdT5MFrovl0GyrefPoeg==
 =JvT4
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPYzHoACgkQmmx57+YA
 GNkxRg/+IRM8xWn4mX9vbDq/NfRcyrVX5aSee5J3oeNvMd7VuxG8mebf8dYc3sef
 UPWxhSiIhVzIDiImV5Dnfno/WKRQBjM1wQ2+Y6s2AeKqqvJefBzQfkw/T/WZ0o9R
 4kCphgNISveJ1xkBhMb6jUcfpbnh9IdAsDer+v6smeYxiFT/IEoBMbxaOvcOXGMi
 YQ+tMEHiWRam2XJtNWCGNyWlG2c1bvqzuJUdpdav/klyz2RaP0eaRpsoPFT8+rpa
 Y/S653cDurEy6ynFIMrkcGIka1F7/dPfLEPInPjs8ZURRVB27fogF3/UNQIzD4R9
 XYQ8GTF8qTSLQKcfpBMFj9atZNgtdxgnfr939KJHTJvp7TpUmrd4GsRYylXinq3l
 MHDU2RppiKKNOcOVhMV+fyFPg48o5g1qPbwaMZ6x8e8M1NDAiKqCzW2I1EzgRyqR
 auCZPyR09lPzgE5Tu2gUS21oAIJrBvpy6KgIcHwAsJ37bL4Ec6wFyretDvZwBapT
 SvMmjJ4yhVcn72B8PQbz3lQOwROfBmfHS+eOAB77vxCRIfvgYdb+dFxZ/dR93gRy
 6bpGgRe0M9NjkReeoGUoYb221cgd2o0Wr5la3OhqOq99xWy233aRT7xJpAUWV40W
 2yqBCHZkYyLStejtqWopsWaOZuJPx3HyYHYGsN6UZkSLmhCRSVU=
 =k18R
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig

i.MX defconfig change for 6.3:

- Drop PROVE_LOCKING option from imx_v6_v7_defconfig.
- Enable i.MX ICC and DEVFREQ driver as they are required by i.MX8MP
  boot.

* tag 'imx-defconfig-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v6_v7_defconfig: Don't enable PROVE_LOCKING
  arm64: defconfig: select i.MX ICC and DEVFREQ

Link: https://lore.kernel.org/r/20230130023947.11780-6-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:08:26 +01:00
Arnd Bergmann 7d576289b2 This pull request contains Broadcom ARM SoCs defconfig updates for 6.3,
please pull the following:
 
 - Stefan enables the necessary configuration options to make use of the
   framebuffer on Raspberry Pi devices
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmPVeEYACgkQh9CWnEQH
 BwRvuRAAjJ0ZpYewUS71QjO7RdthbxCIuuA5UW75VzYE8GpRD2sOQRrBaQkpRR7i
 9Gd/09xUq2NBY/DXdtwirNBmDP0oFDzF6mN8MzmydM+3gHPJoICg0SwR/Aey6sLf
 pNEnAfhZ+cglTY6Lzuy3Tz851/Bqc18S1txQyEcKtHx2y8F1tkhj6FO17PxO9184
 +Cq4B9XU7PIF6tMOyOVvhXf8ptl3Fy0XCnjDzcxb4XHpk1kbIxDqkvF5CVPtlo13
 /lcsr0LPZ0Yb56w/6iBiiAjKFCIlImV4kLzSYqRSV0Ku7Ec2cKca/mt0uGrGBY1d
 AZ4q+10hgcd4+Nq7cybiKa3mhFvh5jTQWrq0rD75c5UtEa3kwAr7croOcltT/X5h
 VTWcQgqilOp3akGctNdZM87pIGYdk1xDk9teUwlM9DebhlHr9+nXbHIgR5Yv3KCO
 z5NTsV6C67/Gh66RoBajwHclDySRST+m0C1Gf0FeF9dwk7pFZV9B9byovhcX1bD/
 wKugbYcBY/ufrSZ/0wHsT04CRN1st4pMSxbJ/9uU8OAaOwMX0/bV9ivmmQPE3jSi
 G7Y/YX4JkqYFgrcbK9xSGCSke3pHGOjTe+XB25A2F8YqGMi21Yx6yHmk0xqWEXUJ
 GvpIPTQei11pSZ92kLf0+ocPaesBTXAaU+JmgtmF1JELj8RXpM8=
 =s2GZ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPYzFYACgkQmmx57+YA
 GNlRHBAAxJnMK4F/vRvbwvKVgLs+YnlqeiyvvKWeX6iNFO+F6OUZGiuVgCq9azfP
 C63tc7wkZr2zGkIOejqZPkpUxxkzTZztywO44dpx2/U1aTIdPTL/9xIKAGmNQY5B
 XQ9YEEkgiNnenZR8pOf3YsxFjsjuR4IBenlnXxd+840qv4Hr0mu2OgJDGwy3CpBp
 Bh/cBJZC/yhtn0NhIvU95gwDBk2MncWTSWVOsZEytDUxMShuTfjnWrV+GDJ66bz+
 1RcWKjktOIV9OWm4zG3x6ZTvfWvVqrUC5n80FKr/W+3NSm7H/1WeLobqVP61wEAG
 9ojlkrk4VvH2aruotD07Q+AGuMe9yai1lmG+e3Xxr5oj9hoyvpfp/CV4AM4WFAzg
 kufmEfZo+chueaA6EZmoKU/CCFc3V01CzOWrWaytXk30BVh4zwSyEYLnvFDXcFOk
 OYz+lmt0Cca9IVSYy7Ls5Y2qv6BQkxUUgJUJmp9WpXaXgJ9UFdz7lcAl9UcTyLwd
 0b9vVdDKB5kGmP9DB5t5PPWkpQkvBVbj73lCJeNVP+JjjDjedD5skp6HGfnF97RJ
 Sm0fHtnDMA5lG+cHcu/pahcSpKsDxkw9vf7DXPiWCbGk6kvYkuVbc3l/aejb+Ltc
 hmWY0gE4gbZd63zrUlStDe7DCfmQICKAWKJzeNa2HfWSACsl//U=
 =564E
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux into soc/defconfig

This pull request contains Broadcom ARM SoCs defconfig updates for 6.3,
please pull the following:

- Stefan enables the necessary configuration options to make use of the
  framebuffer on Raspberry Pi devices

* tag 'arm-soc/for-6.3/defconfig' of https://github.com/Broadcom/stblinux:
  ARM: bcm2835_defconfig: Switch to SimpleDRM
  ARM: bcm2835_defconfig: Enable the framebuffer

Link: https://lore.kernel.org/r/20230128193823.1628716-1-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:07:50 +01:00
Arnd Bergmann 7ba26a7201 - Enable Allwinner D1 platform and drivers
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCY9RSUAAKCRB0Ba7+DO8k
 k+OBAP9/thzK03rpILAjN/qdpVgspns0hnpgtzMwIN+ErT1/LgEA16QSOD3eedyt
 SdrsxfNdGovOoQiyFNvgkoyA5sZD0QI=
 =Nf9R
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmPYzDcACgkQmmx57+YA
 GNn3SxAAwxECAbVaGTklCu9JJbskd/girYIN4tyNONxszuvNNWosy0dN0Tcm4BBU
 ls0AH91Owe/CDlRnFaCexeyeBFcNj+PMwl03OE8gFz0by7s8SlzliFV3eZpl+djA
 qPoKL7ssardIqfE5UfiNnoARmFow3+Sb6XPWozSvyFyE/7Ggfgt/OHN+LXEFI7Sm
 gDyqrsu1ktSr8HYACZD6gIPGYSteM32aT94jtHq8S2Q2WHyVK0wAYiRMcc80vtO3
 Tb1e8/xoImqo2ME95v7WKEq+7//3a9u4UyjrhJV8m25axLtu32Df7kLNMrFDzc/p
 2T9JzfbaXeWrExreHdLNytXc7ua2VJXSQwDXAvrXKhc3bXpRbuo0e4oUBoBn2wLX
 4J5g+lJS5t1dekW2E6I8gg0W3zzH4MPxxURNrmzvb0n+x9FnwBDTmXYfH1i9CobT
 Z76id/g8bfMQ2h7znH7IMHezRl9y2jmU7ijrlZsBmp0Bc83S5H/yintzclur2ShE
 T0G8dIkvySshZfv1FehwZHLX7pdb1a8sk2u35E3JZfSrmT18UCzJJtWfHGcXQU8W
 5DlrPbDe2DzrjRJmlc1x4VcfDVV2meoQIn+U9B/T3wpHE7yXMha5GMtTBHV/jRXY
 MTgkTEdkHCuMGS2Su8Hj1VV7WRThQS2zaE840aC5qlthS/scpDY=
 =898J
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/defconfig

- Enable Allwinner D1 platform and drivers

* tag 'sunxi-config-for-6.3-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  riscv: defconfig: Enable the Allwinner D1 platform and drivers

Link: https://lore.kernel.org/r/Y9Ra7dxkfMI9Xp3F@jernej-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-01-31 09:07:19 +01:00
Arnd Bergmann 6755dee834 cc2520: move to gpio descriptors
cc2520 supports both probing from static platform_data and
from devicetree, but there have never been any definitions
of the platform data in the mainline kernel, so it's safe
to assume that only the DT path is used.

After folding cc2520_platform_data into the driver itself,
the GPIO handling can be simplified by moving to the modern
gpiod interface.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230126161658.2983292-1-arnd@kernel.org
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
2023-01-31 09:05:36 +01:00
Jakub Kicinski 9b3fc325c2 Merge tag 'ieee802154-for-net-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
Stefan Schmidt says:

====================
ieee802154 for net 2023-01-30

Only one fix this time around.

Miquel Raynal fixed a potential double free spotted by Dan Carpenter.

* tag 'ieee802154-for-net-2023-01-30' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan:
  mac802154: Fix possible double free upon parsing error
====================

Link: https://lore.kernel.org/r/20230130095646.301448-1-stefan@datenfreihafen.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:11:11 -08:00
Jakub Kicinski 6a8ab43683 Merge branch 'add-support-for-the-the-vsc7512-internal-copper-phys'
Colin Foster says:

====================
add support for the the vsc7512 internal copper phys

This patch series is a continuation to add support for the VSC7512:
https://patchwork.kernel.org/project/netdevbpf/list/?series=674168&state=*

That series added the framework and initial functionality for the
VSC7512 chip. Several of these patches grew during the initial
development of the framework, which is why v1 will include changelogs.
It was during v9 of that original MFD patch set that these were dropped.

With that out of the way, the VSC7512 is mainly a subset of the VSC7514
chip. The 7512 lacks an internal MIPS processor, but otherwise many of
the register definitions are identical. That is why several of these
patches are simply to expose common resources from
drivers/net/ethernet/mscc/*.

This patch only adds support for the first four ports (swp0-swp3). The
remaining ports require more significant changes to the felix driver,
and will be handled in the future.
====================

Link: https://lore.kernel.org/r/20230127193559.1001051-1-colin.foster@in-advantage.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:23 -08:00
Colin Foster 8dccdd277e mfd: ocelot: add external ocelot switch control
Utilize the existing ocelot MFD interface to add switch functionality to
the Microsemi VSC7512 chip.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Acked-for-MFD-by: Lee Jones <lee@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:21 -08:00
Colin Foster 3d7316ac81 net: dsa: ocelot: add external ocelot switch control
Add control of an external VSC7512 chip.

Currently the four copper phy ports are fully functional. Communication to
external phys is also functional, but the SGMII / QSGMII interfaces are
currently non-functional.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:21 -08:00
Colin Foster 11fc80cbb2 dt-bindings: mfd: ocelot: add ethernet-switch hardware support
The main purpose of the Ocelot chips are the Ethernet switching
functionalities. Document the support for these features.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:21 -08:00
Colin Foster dd43f5e768 dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512
The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be
controlled either internally by a memory-mapped CPU, or externally via
interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512
don't have the resources to run Linux, so must be controlled via these
external interfaces in a DSA configuration.

Add mscc,vsc7512-switch compatible string to indicate that the chips are
being controlled externally in a DSA configuration.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:21 -08:00
Colin Foster fde0b6ced8 mfd: ocelot: prepend resource size macros to be 32-bit
The *_RES_SIZE macros are initally <= 0x100. Future resource sizes will be
upwards of 0x200000 in size.

To keep things clean, fully align the RES_SIZE macros to 32-bit to do
nothing more than make the code more consistent.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Acked-for-MFD-by: Lee Jones <lee@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster de879a016a net: dsa: felix: add functionality when not all ports are supported
When the Felix driver would probe the ports and verify functionality, it
would fail if it hit single port mode that wasn't supported by the driver.

The initial case for the VSC7512 driver will have physical ports that
exist, but aren't supported by the driver implementation. Add the
OCELOT_PORT_MODE_NONE macro to handle this scenario, and allow the Felix
driver to continue with all the ports that are currently functional.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster dc454fa4b7 net: dsa: felix: add support for MFD configurations
The architecture around the VSC7512 differs from existing felix drivers. In
order to add support for all the chip's features (pinctrl, MDIO, gpio) the
device had to be laid out as a multi-function device (MFD).

One difference between an MFD and a standard platform device is that the
regmaps are allocated to the parent device before the child devices are
probed. As such, there is no need for felix to initialize new regmaps in
these configurations, they can simply be requested from the parent device.

Add support for MFD configurations by performing this request from the
parent device.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster 1dc6a2a023 net: dsa: felix: add configurable device quirks
The define FELIX_MAC_QUIRKS was used directly in the felix.c shared driver.
Other devices (VSC7512 for example) don't require the same quirks, so they
need to be configured on a per-device basis.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster 2efaca411c net: mscc: ocelot: expose vsc7514_regmap definition
The VSC7514 target regmap is identical for ones shared with similar
hardware, specifically the VSC7512. Share this resource, and change the
name to match the pattern of other exported resources.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster b67f550213 net: mscc: ocelot: expose ocelot_reset routine
Resetting the switch core is the same whether it is done internally or
externally. Move this routine to the ocelot library so it can be used by
other drivers.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster beb9a74e0b net: mscc: ocelot: expose vcap_props structure
The vcap_props structure is common to other devices, specifically the
VSC7512 chip that can only be controlled externally. Export this structure
so it doesn't need to be recreated.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster 728d8019f1 net: mscc: ocelot: expose regfield definition to be used by other drivers
The ocelot_regfields struct is common between several different chips, some
of which can only be controlled externally. Export this structure so it
doesn't have to be duplicated in these other drivers.

Rename the structure as well, to follow the conventions of other shared
resources.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Colin Foster c6a9321b08 net: mscc: ocelot: expose ocelot wm functions
Expose ocelot_wm functions so they can be shared with other drivers.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:07:20 -08:00
Pietro Borrello ffe2a22562 net/tls: tls_is_tx_ready() checked list_entry
tls_is_tx_ready() checks that list_first_entry() does not return NULL.
This condition can never happen. For empty lists, list_first_entry()
returns the list_entry() of the head, which is a type confusion.
Use list_first_entry_or_null() which returns NULL in case of empty
lists.

Fixes: a42055e8d2 ("net/tls: Add support for async encryption of records for performance")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
Link: https://lore.kernel.org/r/20230128-list-entry-null-check-tls-v1-1-525bbfe6f0d0@diag.uniroma1.it
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:06:08 -08:00
Frank Sae 3c1dc22162 net: phy: motorcomm: change the phy id of yt8521 and yt8531s to lowercase
The phy id is usually defined in lower case.

Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230128063558.5850-2-Frank.Sae@motor-comm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:05:36 -08:00
Frank Sae 4104a71320 net: phy: fix the spelling problem of Sentinel
CHECK: 'sentinal' may be misspelled - perhaps 'sentinel'?

Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230128063558.5850-1-Frank.Sae@motor-comm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:05:26 -08:00
Jakub Kicinski 2083656bb3 sh: checksum: add missing linux/uaccess.h include
SuperH does not include uaccess.h, even tho it calls access_ok().

Fixes: 68f4eae781 ("net: checksum: drop the linux/uaccess.h include")
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230128073108.1603095-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:04:21 -08:00
Jiapeng Chong 1586f31e30 net: b44: Remove the unused function __b44_cam_read()
The function __b44_cam_read() is defined in the b44.c file, but not called
elsewhere, so remove this unused function.

drivers/net/ethernet/broadcom/b44.c:199:20: warning: unused function '__b44_cam_read'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3858
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230128090413.79824-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:03:51 -08:00
Jakub Kicinski 84115f0e74 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2023-01-27 (ice)

This series contains updates to ice driver only.

Dave prevents modifying channels when RDMA is active as this will break
RDMA traffic.

Michal fixes a broken URL.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: Fix broken link in ice NAPI doc
  ice: Prevent set_channel from changing queues while RDMA active
====================

Link: https://lore.kernel.org/r/20230127225333.1534783-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-30 21:02:44 -08:00
Konrad Dybcio 68d8ad3bd9 dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array
In some instances (particularly with CPRh) we might want to specifiy
more than one qcom,opp-fuse-level, as the same OPP subnodes may be
used by different "CPR threads". We need to make sure that
n = num_threads entries is legal and so far nobody seems to use more
than two, so let's allow that.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-01-31 09:01:35 +05:30
Jianbo Liu f741db1a51 net/mlx5e: kTLS, Improve connection rate by using fast update encryption key
As the fast DEK update is fully implemented, use it for kTLS to get
better performance.
TIS pool was already supported to recycle the TISes. With this series
and TIS pool, TLS CPS is improved by 9x higher, from 11k/s to 101k/s.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:06 -08:00
Jianbo Liu 8a6fa6df61 net/mlx5: Keep only one bulk of full available DEKs
One bulk with full available keys is left undestroyed, to service the
possible requests from users quickly.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:06 -08:00
Jianbo Liu 12a9e1b73d net/mlx5: Add async garbage collector for DEK bulk
After invalidation, the idle bulk with all DEKs available for use, is
destroyed, to free keys and mem.

To get better performance, the firmware destruction operation is done
asynchronously. So idle bulks are enqueued in destroy_list first, then
destroyed in system workqueue. This will improve performance, as the
destruction doesn't need to hold pool's mutex.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:06 -08:00
Jianbo Liu 709f07fe1a net/mlx5: Reuse DEKs after executing SYNC_CRYPTO command
To fast update encryption keys, those freed keys with need_sync bit 1
and in_use bit 0 in a bulk, can be recycled. The keys are cached
internally by the NIC, so invalidating internal NIC caches by
SYNC_CRYPTO command is required before reusing them. A threshold in
driver is added to avoid invalidating for every update. Only when the
number of DEKs, which need to be synced, is over this threshold, the
sync process will start. Besides, it is done in system workqueue.

After SYNC_CRYPTO command is executed successfully, the bitmaps of
each bulk must be reset accordingly, so that the freed DEKs can be
reused. From the analysis in previous patch, the number of reused DEKs
can be calculated by hweight_long(need_sync XOR in_use), and the
need_sync bits can be reset by simply copying from in_use bits.

Two more list (avail_list and sync_list) are added for each pool. The
avail_list is for a bulk when all bits in need_sync are reset after
sync. If there is no avail deks, and all are be freed by users, the
bulk is moved to sync_list, instead of being destroyed in previous
patch, and waiting for the invalidation. While syncing, they are
simply reset need_sync bits, and moved to avail_list.

Besides, add a wait_for_free list for the to-be-free DEKs. It is to
avoid this corner case: when thread A is done with SYNC_CRYPTO but just
before starting to reset the bitmaps, thread B is alloc dek, and free
it immediately. It's obvious that this DEK can't be reused this time,
so put it to waiting list, and do free after bulk bitmaps reset is
finished.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:06 -08:00
Jianbo Liu c6e7d81710 net/mlx5: Use bulk allocation for fast update encryption key
We create a pool for each key type. For the pool, there is a struct
to store the info for all DEK objects of one bulk allocation. As we
use crypto->log_dek_obj_range, which is set to 12 in previous patch,
for the log_obj_range of bulk allocation, 4096 DEKs are allocated in
one time.

To trace the state of all the keys in a bulk, two bitmaps are created.
The need_sync bitmap is used to indicate the available state of the
corresponding key. If the bit is 0, it can be used (available) as it
either is newly created by FW, or SYNC_CRYPTO is executed and bit is
reset after it is freed by upper layer user (this is the case to be
handled in later patch). Otherwise, the key need to be synced. The
in_use bitmap is used to indicate the key is being used, and reset
when user free it.

When ktls, ipsec or macsec need a key from a bulk, it get one with
need_sync bit 0, then set both need_sync and in_used bit to 1. When
user free a key, only in_use bit is reset to 0. So, for the
combinations of (need_sync, in_use) of one DEK object,
   - (0,0) means the key is ready for use,
   - (1,1) means the key is currently being used by a user,
   - (1,0) means the key is freed, and waiting for being synced,
   - (0,1) is invalid state.

There are two lists in each pool, partial_list and full_list,
according to the number for available DEKs in a bulk. When user need a
key, it get a bulk, either from partial list, or create new one from
FW. Then the bulk is put in the different pool's lists according to
the num of avail deks it has. If there is no avail deks, and all of
them are be freed by users, for now, the bulk is destroyed.

To speed up the bitmap search, a variable (avail_start) is added to
indicate where to start to search need_sync bitmap for available key.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:06 -08:00
Jianbo Liu 4d570c7117 net/mlx5: Add bulk allocation and modify_dek operation
To support fast update of keys into hardware, we optimize firmware to
achieve the maximum rate. The approach is to create DEK objects in
bulk, and update each of them with modify command.
This patch supports bulk allocation and modify_dek commands for new
firmware. However, as log_obj_range is 0 for now, only one DEK obj is
allocated each time, and then updated with user key by modify_dek.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu 7a5b72c2a8 net/mlx5: Add support SYNC_CRYPTO command
Add support for SYNC_CRYPTO command. For now, it is executed only when
initializing DEK, but needed when reusing keys in later patch.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu 204369e718 net/mlx5: Add new APIs for fast update encryption key
New APIs are added to support fast update DEKs. As a pool is created
for each key purpose (type), one pair of pool APIs to get/put pool.
Anotehr pair of DEKs APIs is to get DEK object from pool and update it
with user key, or free it back to the pool. As The bulk allocation
and destruction will be supported in later patches, old implementation
is used here.

To support these APIs, pool and dek structs are defined first. Only
small number of fields are stored in them. For example, key_purpose
and refcnt in pool struct, DEK object id in dek struct. More fields
will be added to these structs in later patches, for example, the
different bulk lists for pool struct, the bulk pointer dek struct
belongs to, and a list_entry for the list in a pool, which is used to
save keys waiting for being freed while other thread is doing sync.

Besides the creation and destruction interfaces, new one is also added
to get obj id.

Currently these APIs are planned to used by TLS only.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu 9421925416 net/mlx5: Refactor the encryption key creation
Move the common code to general functions which can be used by fast
update encryption key in later patches.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu 55f0d6d200 net/mlx5: Add const to the key pointer of encryption key creation
Change key pointer to const void *, as there is no need to change the
key content. This is also to avoid modifying the key by mistake.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu fe298bdf6f net/mlx5: Prepare for fast crypto key update if hardware supports it
Add CAP for crypto offload, do the simple initialization if hardware
supports it. Currently set log_dek_obj_range to 12, so 4k DEKs will be
created in one bulk allocation.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:05 -08:00
Jianbo Liu 60c8972d2c net/mlx5: Change key type to key purpose
Change the naming of key type in DEK fields and macros, to be
consistent with the device spec.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:04 -08:00
Jianbo Liu 9a0ed4f2bf net/mlx5: Add IFC bits and enums for crypto key
Add and extend structure layouts and defines for fast crypto key
update. This is a prerequisite to support bulk creation, key
modification and destruction, software wrapped DEK, and SYNC_CRYPTO
command.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:04 -08:00
Jianbo Liu 4744c7ad22 net/mlx5: Add IFC bits for general obj create param
Before this patch, the log_obj_range was defined inside
general_obj_in_cmd_hdr to support bulk allocation. However, we need to
modify/query one of the object in the bulk in later patch, so change
those fields to param bits for parameters specific for cmd header, and
add general_obj_create_param according to what was updated in spec.
We will also add general_obj_query_param for modify/query later.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:04 -08:00
Tariq Toukan c673b6772a net/mlx5: Header file for crypto
Take crypto API out of the generic mlx5.h header into a dedicated
header.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-01-30 19:10:04 -08:00
Colin Ian King 7a17c61ee3 ksmbd: Fix spelling mistake "excceed" -> "exceeded"
There is a spelling mistake in an error message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-01-30 20:49:30 -06:00
Steve French d280a958f8 ksmbd: update Kconfig to note Kerberos support and fix indentation
Fix indentation of server config options, and also since
support for very old, less secure, NTLM authentication was removed
(and quite a while ago), remove the mention of that in Kconfig, but
do note Kerberos (not just NTLMv2) which are supported and much
more secure.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-01-30 20:49:30 -06:00
Dawei Li 7010357004 ksmbd: Remove duplicated codes
ksmbd_neg_token_init_mech_token() and ksmbd_neg_token_targ_resp_token()
share same implementation, unify them.

Signed-off-by: Dawei Li <set_pte_at@outlook.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-01-30 20:49:30 -06:00