Commit Graph

1303990 Commits

Author SHA1 Message Date
Ckath
c11619af35 platform/x86: touchscreen_dmi: add nanote-next quirk
Add touschscreen info for the nanote next (UMPC-03-SR).

After checking with multiple owners the DMI info really is this generic.

Signed-off-by: Ckath <ckath@yandex.ru>
Link: https://lore.kernel.org/r/e8dda83a-10ae-42cf-a061-5d29be0d193a@yandex.ru
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-09-14 17:57:35 +02:00
Michael Walle
ac5bfa968b mtd: spi-nor: fix flash probing
Fix flash probing by name. Flash entries without a name are allowed
since commit 15eb8303bb ("mtd: spi-nor: mark the flash name as
obsolete"). But it was just until recently that a flash entry without a
name was actually introduced. This triggers a bug in the legacy probe by
name path. Skip entries without a name to fix it.

Fixes: 2095e7da8049 ("mtd: spi-nor: spansion: Add support for S28HS256T")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/r/66c8ebb0-1324-4ad9-9926-8d4eb7e1e63a@nvidia.com/
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240909072854.812206-1-mwalle@kernel.org
2024-09-14 17:56:31 +02:00
Takahiro Kuwano
1dc6cd4f94 mtd: spi-nor: spansion: Add support for S28HS256T
Infineon S28HS256T is 256Mb Octal SPI device which has same
functionalities with 512Mb and 1Gb parts.

Link: https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240830080428.6994-1-Takahiro.Kuwano@infineon.com
2024-09-14 17:56:31 +02:00
Michael Walle
a84d45217c mtd: spi-nor: winbond: add Zetta ZD25Q128C support
Zetta normally uses BAh as its vendor ID. But for the ZD25Q128C they
took the one from Winbond and messed up the size parameters in SFDP.
Most functions seem compatible with the W25Q128, we just have to fix up
the size.

Link: http://www.zettadevice.com/upload/file/20150821/DS_Zetta_25Q128_RevA.pdf
Link: https://www.lcsc.com/datasheet/lcsc_datasheet_2312081757_Zetta-ZD25Q128CSIGT_C19626875.pdf
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240804221535.291923-1-mwalle@kernel.org
2024-09-14 17:56:31 +02:00
Brian Norris
86fd0e6410 mtd: spi-nor: micron-st: Add n25q064a WP support
These flash chips are used on Google / TP-Link / ASUS OnHub devices, and
OnHub devices are write-protected by default (same as any other
ChromeOS/Chromebook system). I've referred to datasheets, and tested on
OnHub devices.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240726185825.142733-1-computersforpeace@gmail.com
2024-09-14 17:56:31 +02:00
Csókás, Bence
18bcb4aa54 mtd: spi-nor: sst: Factor out common write operation to sst_nor_write_data()
Writing to the Flash in `sst_nor_write()` is a 3-step process:
first an optional one-byte write to get 2-byte-aligned, then the
bulk of the data is written out in vendor-specific 2-byte writes.
Finally, if there's a byte left over, another one-byte write.
This was implemented 3 times in the body of `sst_nor_write()`.
To reduce code duplication, factor out these sub-steps to their
own function.

Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
[pratyush@kernel.org: fixup whitespace, use %zu instead of %i in WARN()]
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20240710091401.1282824-1-csokas.bence@prolan.hu
2024-09-14 17:56:31 +02:00
Linus Torvalds
0babf68378 Pin control fixes for the v6.11 series:
- One Intel patch that I mistakedly merged into for-next
   despite it belongs in fixes: add Arrow Lake-H/U ACPI
   ID so this Arrow Lake chip probes.
 
 - One fix making the CY895x0 reg cache work, which is
   good because it makes the device work too.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmblfkEACgkQQRCzN7AZ
 XXPItw/+MeHzTyU2FPuiqspNiBlkBDpClAMcoBLiFDJdPGkbw8pZUVMSRrxOy5pe
 tR8hNDtrLFZkCTIikXfMjOGhQ6uRc/BbRg/+AFCSXZyNfLQqjmTrk7kx89mqIy+R
 +Wdj+TDTrXCQHVKzvdo6iB9fw5Gg02/MMMIMdFpx9M+OQXILsyyQCPaHn3RWZaCR
 7TLVnPrqLuA1KZQXLDXj/Bk0yFpiQWD8KxlHNLcrHqoLxtfmDyva7J0zJRUQeLcK
 aaPsVc4IlUgO4JIX42a+8hrQX+QaYAbY5ekOsVpGogQQ/yepseNmpFNhN96j+GGQ
 6e541DnY0oaM2GmxbllsevIa8MY7Zlue5ehSEvSGoaYOrqvaruZedyURFQHRaceq
 Jz86yQxDMMxbZ3S4Mn+ED1L8eXQlJAI6ylWcYDx/LWDcyblNWQCID1cNgIMoohFm
 12qC7X4joP4eLWBGCNBQab0ZPOcAsrLUgCBFD/3/LCL4tfA9Cvudp6j5TyQXmTNC
 LUPhw9mFk1Eywt9aiHEqOK9V1JZW7ovXdUUuVHNCn6LslZ1vtdNKlIxScPDp9Js5
 iILAlt4EQ34uXsDi4s6LyKF/9W+imRM8mVEdMa5cNIizk8Xn/VDo7tM6J6Zz0CIu
 tUBKZBhbmqoZldcaWco+aBQ1nwYGBSgu4W7JQZrtdXlFh5lQ2dU=
 =USa2
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:

 - One Intel patch that I mistakenly merged into for-next despite it
   belonging in fixes: add Arrow Lake-H/U ACPI ID so this Arrow Lake
   chip probes.

 - One fix making the CY895x0 reg cache work, which is good because it
   makes the device work too.

* tag 'pinctrl-v6.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: pinctrl-cy8c95x0: Fix regcache
  pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID
2024-09-14 16:58:02 +02:00
Linus Torvalds
57719771a2 sound fixes for 6.11
A few last-minute ASoC fixes and MAINTAINERS update.
 All look small, obvious and nice-to-have fixes for 6.11-final.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmblRZoOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE96zQ/+J77zhEva91kC80LasGa2GlggPIac4hRwBktp
 Xchn4TzeJ5ij/o2IHJnV0GnsUttac2n5INq/eYEbqZpvm0mDESLm3+5qsPOdGYeO
 bQcouXl9+Ju+9y7HymN0lnMSc7UX/NP7Yjjtx97io56Il+Obj2sYjgOhXeDHqq5J
 iZtZl21c0OTD4NPJ1atjtztm3fpgpCv3qP3H5R/+KU4VE3JyXjL9fB7SWfqfamwS
 /L9wERhyaOSi3Tut0olQblQcgIwpLdnf9bvK31uLrwzxMtxw92sOfBuOhoCUXb+2
 rk2l93eW/hLeFbSTLgU+jePN8/YphnFKAr7qysL3SwEw/H6h1al8Rl74h9AFuNxW
 zRjmGaCOQwSLp2UHf2Qwo5F1yynApOhAKYHm0djUKjZfUTswPAGqRYcQaW2tL4DR
 71LjWvwnLGi1uupG+bNWP5L1p0YGQE4rk/QNbv/gYLXPwBI3bMheQjrNhv0Pqk/r
 3FflZTJcjt1KJ3yNw9CkGAhGRnA7YIoZ9DcuGaqi63wl04K2fDH6NWLZ6CbGqlyO
 yBs8eJK4ehZJDm9Knn3zFC9CEM9z6VA0i5aIo13v7G3I1yISxhdAp8NOCqJkl+yQ
 utCsfCyvK0tvVy0u0zOE3w6JZ5Z2u7Q6TGe/LkTKjsF6Na21hueU6wLlUhCtFhu2
 y9jFImk=
 =GUM8
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A few last-minute ASoC fixes and MAINTAINERS update.

  All look small, obvious and nice-to-have fixes for 6.11-final"

* tag 'sound-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: meson: axg-card: fix 'use-after-free'
  ASoC: codecs: avoid possible garbage value in peb2466_reg_read()
  MAINTAINERS: update Pierre Bossart's email and role
  ASoC: tas2781: fix to save the dsp bin file name into the correct array in case name_prefix is not NULL
  ASoC: Intel: soc-acpi-intel-mtl-match: add missing empty item
  ASoC: Intel: soc-acpi-intel-lnl-match: add missing empty item
2024-09-14 11:54:24 +02:00
Linus Torvalds
d9bc226584 fix for packet signing of write
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmbk8HsACgkQiiy9cAdy
 T1Fklgv/ejyQXCCLVWCQoYFxjMtOEGQkITsq2XYjjbyFv8hQGmvFDPbm+/NmZ+SL
 9hER3CjrcDHPaidTWI/1mKCR5+vcjOLqmSC2GF/nsd9x2OdsxpIXazihKPt3nRh4
 4RSeAyNbmRAxi5auBQmW+gfBEquwkqdJbBkZyTbKmfcpWNyJWDZp6LpdKyTTLK6Z
 448QqFWLGNmO5cZDuYSl7R+J2DsCNmpe7vDKUX4dO/aU+fg0+OcCgRWxgYfEPk7b
 Mtizf1soBxVE72yDgRpr6ARr7YIBHRhtC2e5xLb62yvslqk8y5qrqL1u5WU7F1d/
 h0PYE/5YMSvjJxXRMSrfPFyq0yPwsGZJK4epkKxtLV0WC4hNnSWLrg0JNOPZVF5k
 OsofXUOSbtUQkwT/T3epp54Z83bzRUxgdbD80OfFM2SmglZY2zjTAcCUzxEwp56T
 q7ehhmZrl23FzrkFBkQcZbBP3PCKBJ4iPevTLnNt2xsLVjnAVQE9Ss5EIqCYh/Ge
 D3NsmmhS
 =ygm/
 -----END PGP SIGNATURE-----

Merge tag '6.11-rc7-SMB3-client-fix' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fix from Steve French:
 "Fix for packet signing of write"

* tag '6.11-rc7-SMB3-client-fix' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix signature miscalculation
2024-09-14 11:43:24 +02:00
Hans de Goede
e50a57d16f power: supply: hwmon: Fix missing temp1_max_alarm attribute
Temp channel 0 aka temp1 can have a temp1_max_alarm attribute for
power_supply devices which have a POWER_SUPPLY_PROP_TEMP_ALERT_MAX
property.

HWMON_T_MAX_ALARM was missing from power_supply_hwmon_info for
temp channel 0, causing the hwmon temp1_max_alarm attribute to be
missing from such power_supply devices.

Add this to power_supply_hwmon_info to fix this.

Fixes: f1d33ae806 ("power: supply: remove duplicated argument in power_supply_hwmon_info")
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240908185337.103696-2-hdegoede@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-09-14 11:06:07 +02:00
Hans de Goede
78f281e5bd power: supply: Drop use_cnt check from power_supply_property_is_writeable()
power_supply_property_is_writeable() gets called from the is_visible()
callback for the sysfs attributes of power_supply class devices and for
the sysfs attributes of power_supply core instantiated hwmon class devices.

These sysfs attributes get registered by the device_add() respectively
power_supply_add_hwmon_sysfs() calls in power_supply_register().

use_cnt gets initialized to 0 and is incremented only after these calls.
So when power_supply_property_is_writeable() gets called it always return
-ENODEV because of use_cnt == 0.

This causes all the attributes to have permissions of 444 even those which
should be writable. This used to be a problem only for hwmon sysfs
attributes but since commit be6299c6e5 ("power: supply: sysfs: use
power_supply_property_is_writeable()") this now also impacts power_supply
class sysfs attributes.

Fixes: be6299c6e5 ("power: supply: sysfs: use power_supply_property_is_writeable()")
Fixes: e67d4dfc9f ("power: supply: Add HWMON compatibility layer")
Cc: stable@vger.kernel.org
Cc: Thomas Weißschuh <linux@weissschuh.net>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/stable/20240908185337.103696-1-hdegoede%40redhat.com
Link: https://lore.kernel.org/r/20240908185337.103696-1-hdegoede@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-09-14 11:06:07 +02:00
Takashi Iwai
64c0ce555a Merge branch 'for-linus' into for-next
Pull 6.11 fixes to 6.12-devel branch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-09-14 10:16:12 +02:00
Takashi Iwai
1a529af6f8 ASoC: Updates for v6.12
This is a very large set of changes, almost all in drivers rather than
 the core.  Even with the addition of several quite large drivers the
 overall diffstat is negative thanks to the removal of some old Intel
 board support which has been obsoleted by the AVS driver, helped a bit
 by some factoring out into helpers (especially around the Soundwire
 machine drivers for x86).
 
 Highlights include:
 
  - More simplifications and cleanups throughout the subsystem from
    Morimoto-san.
  - Extensive cleanups and refactoring of the Soundwire drivers to make
    better use of helpers.
  - Removal of Intel machine support obsoleted by the AVS driver.
  - Lots of DT schema conversions.
  - Machine support for many AMD and Intel x86 platforms.
  - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320
    SoundWire and rev C, and Texas Instruments TAS2563
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmbko34ACgkQJNaLcl1U
 h9CQiwf9HseC6VkNQ0ISVZ2UsSf8K/HsHsdBGl7/CRr0SEvS3pszYMkKPbhRggsF
 aQ4nfitXeN7Vo6S0tNXx63wzjpMPkjrHdV0XY+WJxfuCaeb3DHFEJ4uvlgv53aoh
 M+wz1aldvKWjDPwhkzcJEaneQ36U7OlUSBsbFHR82dBDguEm+h29tAxTuLlwL5Zb
 M8NuSfbh0cfY9Kk1cPGsqaHD8wjUeg6/Q5qnbDg2kAm0aF1fAxfyFKRX6Z5s9ekd
 LeU3EIdRbI8UlHv7Afl0UKDYtYqL1ubwmjDb45HnsE4FmNEmDEbf8c1adRumZAjm
 Js9yzswiaaHAvotCaEstFC6HYUL+oQ==
 =jugn
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.12

This is a very large set of changes, almost all in drivers rather than
the core.  Even with the addition of several quite large drivers the
overall diffstat is negative thanks to the removal of some old Intel
board support which has been obsoleted by the AVS driver, helped a bit
by some factoring out into helpers (especially around the Soundwire
machine drivers for x86).

Highlights include:

 - More simplifications and cleanups throughout the subsystem from
   Morimoto-san.
 - Extensive cleanups and refactoring of the Soundwire drivers to make
   better use of helpers.
 - Removal of Intel machine support obsoleted by the AVS driver.
 - Lots of DT schema conversions.
 - Machine support for many AMD and Intel x86 platforms.
 - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320
   SoundWire and rev C, and Texas Instruments TAS2563
2024-09-14 09:09:59 +02:00
Takashi Iwai
134536c212 ASoC: Fixes for v6.11
A few last minute fixes, plus an update for Pierre's contact details and
 status.  It'd be good to get these into v6.11 (especially the
 MAINTAINERS update) but it wouldn't be the end of the world if they
 waited for the merge window, none of them are super remarkable and it's
 just a question of timing that they're last minute.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmbkhH0ACgkQJNaLcl1U
 h9BoIQf+JXnJ0ue9/Jk/jMrXm9IsbXFV0ejhRX1+QYNVsucMymoqPl3mlK0gklFi
 j16V7P6aNUnm0Z8eOct24T/5INKiwBIWQH3FdnzHbMhf7xswIHBittMk9A0T5twH
 l+RWeYRjCE6YCuGnnWGC33j+0itN5cQLI0lP4bStJxiWV+uxUOk7QK12legYoWNG
 rvboiJIxBAJ04xogCIXNeTQmaxOU6GTvuoD/yz+e4G0+UDET1nijRpfTcJLs1Vam
 ngebgCrkBG2nOk9z5p1FEt85ullp34H6SNQ9b+tChsrKH/RPEcqk3iWrOHUApYON
 82tj9pCZq9mbeqZJSseWnvyhPm7uOw==
 =BJvu
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.11-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.11

A few last minute fixes, plus an update for Pierre's contact details and
status.  It'd be good to get these into v6.11 (especially the
MAINTAINERS update) but it wouldn't be the end of the world if they
waited for the merge window, none of them are super remarkable and it's
just a question of timing that they're last minute.
2024-09-14 09:09:11 +02:00
Boqun Feng
a49f48cc7d MAINTAINERS: Add the dedicated maillist info for LKMM
A dedicated mail list has been created for Linux kernel memory model
discussion, which could help people more easily track memory model
related discussions.  This could also help bring memory model discussions
to a broader audience.  Therefore, add the list information to the LKMM
maintainers entry.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
2024-09-13 23:56:44 -07:00
Akira Yokosawa
2040c9cb14 docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY"
Commit 8ca924aeb4 ("Documentation/barriers: Remove references to
[smp_]read_barrier_depends()") removed the entire section of "CACHE
COHERENCY", without getting rid of its traces.

Remove them.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
2024-09-13 23:56:44 -07:00
Akira Yokosawa
b9a6e87af5 tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt
There has never been recipes-paris.txt at least since v5.11.
Fix the typo.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2024-09-13 23:56:44 -07:00
Akira Yokosawa
9bc931e9e1 tools/memory-model: Add locking.txt and glossary.txt to README
locking.txt and glossary.txt have been in LKMM's documentation for
quite a while.

Add them in README's introduction of docs and the list of docs at the
bottom.  Add access-marking.txt in the former as well.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Acked-by: Andrea Parri <parri.andrea@gmail.com>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2024-09-13 23:56:44 -07:00
Andrea Parri
e8adbac0d4 tools/memory-model: Document herd7 (abstract) representation
The Linux-kernel memory model (LKMM) source code and the herd7 tool are
closely linked in that the latter is responsible for (pre)processing
each C-like macro of a litmus test, and for providing the LKMM with a
set of events, or "representation", corresponding to the given macro.
This commit therefore provides herd-representation.txt to document
the representations of the concurrency macros, following their
"classification" in Documentation/atomic_t.txt.

Link: https://lore.kernel.org/all/ZnFZPJlILp5B9scN@andrea/

Suggested-by: Hernan Ponce de Leon <hernan.poncedeleon@huaweicloud.com>
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Hernan Ponce de Leon <hernan.poncedeleon@huaweicloud.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2024-09-13 23:56:43 -07:00
Namjae Jeon
c5a709f08d ksmbd: handle caseless file creation
Ray Zhang reported ksmbd can not create file if parent filename is
caseless.

Y:\>mkdir A
Y:\>echo 123 >a\b.txt
The system cannot find the path specified.
Y:\>echo 123 >A\b.txt

This patch convert name obtained by caseless lookup to parent name.

Cc: stable@vger.kernel.org # v5.15+
Reported-by: Ray Zhang <zhanglei002@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-09-14 00:03:15 -05:00
Hobin Woo
ca4974ca95 ksmbd: make __dir_empty() compatible with POSIX
Some file systems may not provide dot (.) and dot-dot (..) as they are
optional in POSIX. ksmbd can misjudge emptiness of a directory in those
file systems, since it assumes there are always at least two entries:
dot and dot-dot.
Just don't count dot and dot-dot.

Cc: stable@vger.kernel.org # v6.1+
Signed-off-by: Hobin Woo <hobin.woo@samsung.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-09-14 00:03:15 -05:00
Namjae Jeon
ee426bfb9d ksmbd: add refcnt to ksmbd_conn struct
When sending an oplock break request, opinfo->conn is used,
But freed ->conn can be used on multichannel.
This patch add a reference count to the ksmbd_conn struct
so that it can be freed when it is no longer used.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-09-14 00:03:15 -05:00
Namjae Jeon
2fb9b5dc80 ksmbd: allow write with FILE_APPEND_DATA
Windows client write with FILE_APPEND_DATA when using git.
ksmbd should allow write it with this flags.

Z:\test>git commit -m "test"
fatal: cannot update the ref 'HEAD': unable to append to
 '.git/logs/HEAD': Bad file descriptor

Fixes: 0626e6641f ("cifsd: add server handler for central processing and tranport layers")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-09-14 00:03:14 -05:00
Jakub Kicinski
34c44eb31d Merge branch 'net-ibm-emac-modernize-a-bit'
Rosen Penev says:

====================
net: ibm: emac: modernize a bit
====================

Link: https://patch.msgid.link/20240912024903.6201-1-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:49:00 -07:00
Rosen Penev
39b9b78065 net: ibm: emac: get rid of wol_irq
This is completely unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-10-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:58 -07:00
Rosen Penev
c092d0be38 net: ibm: emac: remove all waiting code
EPROBE_DEFER, which probably wasn't available when this driver was
written, can be used instead of waiting manually.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20240912024903.6201-9-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:58 -07:00
Rosen Penev
cc0c92ff66 net: ibm: emac: replace of_get_property
of_property_read_u32 can be used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-8-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:58 -07:00
Rosen Penev
baab9de385 net: ibm: emac: use netdev's phydev directly
Avoids having to use own struct member.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-7-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Rosen Penev
a4dd8535a5 net: ibm: emac: use devm for register_netdev
Cleans it up automatically. No need to handle manually.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-6-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Rosen Penev
93a6d4e036 net: ibm: emac: remove mii_bus with devm
Switching to devm management of mii_bus allows to remove
mdiobus_unregister calls and thus avoids needing a mii_bus global struct
member.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-5-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Rosen Penev
969b002d7b net: ibm: emac: use devm for of_iomap
Allows removing manual iounmap.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-4-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Rosen Penev
dcc34ef7c8 net: ibm: emac: manage emac_irq with devm
It's the last to go in remove. Safe to let devm handle it.

Also move request_irq to probe for clarity. It's removed in _remove not
close.

Use dev_err_probe instead of printk. Handles EPROBE_DEFER automatically.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-3-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Rosen Penev
b9758c4342 net: ibm: emac: use devm for alloc_etherdev
Allows to simplify the code slightly. This is safe to do as free_netdev
gets called last.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20240912024903.6201-2-rosenp@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:48:57 -07:00
Linu Cherian
beb2baa9e5 octeontx2-af: debugfs: Add Channel info to RPM map
Display channel info in the RPM map debugfs output.

With this, cat /sys/kernel/debug/cn10k/rvu_pf_rpm_map
would display channel number for each device in addition to
the existing data.

Sample output:
PCI dev         RVU PF Func     NIX block       rpm     LMAC    CHAN
0002:02:00.0    0x400           NIX0            rpm0    LMAC0   256

Signed-off-by: Linu Cherian <lcherian@marvell.com>
Link: https://patch.msgid.link/20240912161450.164402-3-lcherian@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:42:21 -07:00
Maxime Chevallier
1ad84a151a net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP
The context info allows continuing DUMP requests, shall they fill the
netlink buffer.

In the case of filtered DUMP requests, a reference on the netdev is
grabbed in the .start() callback and release in .done().

Unfiltered DUMP request don't need the dev pointer to be set in the context
info, doing so will trigger an unwanted netdev_put() in .done().

Reported-by: syzbot+e9ed4e4368d450c8f9db@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/000000000000d3bf150621d361a7@google.com/
Fixes: 17194be4c8 ("net: ethtool: Introduce a command to list PHYs on an interface")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20240913100515.167341-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:40:12 -07:00
Jakub Kicinski
06a104d55d linux-can-next-for-6.12-20240911
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEUEC6huC2BN0pvD5fKDiiPnotvG8FAmbhXBwTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRAoOKI+ei28byH+B/0ctrcmzjguuddiCiUkMS0EJaocxnE7
 Et3eZtV66QlxLahTOQDAcePVIyeq1Rzc8vsruNu0QJje2Yp21WITQbl9x2dX/JEl
 sPggkKpu7ERKE1vS4+HEgr3PXbjXFbF6k38jygiswG0vYzKkBT5keHJ7f9qPC+cU
 BdXr+ZjYK0I5TQBOQKSH4FlKVtXSidxvYRVT4AHcQ0k3vegMc7J+/fgAaznsS85p
 nwV1PsXXNQh7nM5jqdMSbibL8jvgDFiSyxtQLDogqd0ah0bYOAmyiEONv6v4UGkF
 1blHqiyHUnslMYgHL/C3U0cQF8ETrDd25FOpPr1pbKbW+/KueO9Y1IyP
 =kclM
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-next-for-6.12-20240911' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2024-09-11

The first patch is by Uwe Kleine-König targets all CAN platform driver
and switches back the remove function to struct
platform_driver::remove().

A patch by Stefan Mätje fixes the help text of the ESD USB driver.

Jake Hamby's patch masks an unneeded interrupt in the m_can driver.

The last 2 patches target the rockchip_canfd driver. Arnd Bergmann's
patch reworks the delay calculation for the timekeeping worker, a
patch by me fixes the decoding of the error code register.

* tag 'linux-can-next-for-6.12-20240911' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next:
  can: rockchip_canfd: rkcanfd_handle_error_int_reg_ec(): fix decoding of error code register
  can: rockchip_canfd: rkcanfd_timestamp_init(): rework delay calculation
  can: m_can: m_can_chip_config(): mask timestamp wraparound IRQ
  can: usb: Kconfig: Fix list of devices for esd_usb driver
  can: Switch back to struct platform_driver::remove()
====================

Link: https://patch.msgid.link/20240912080438.2826895-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:27:10 -07:00
Dan Carpenter
37551b4540 rtase: Fix error code in rtase_init_board()
Return an error if dma_set_mask_and_coherent() fails.  Don't return
success.

Fixes: a36e9f5cfe ("rtase: Add support for a pci table in this module")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/f53ed942-5ac2-424b-a1ed-9473c599905e@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:23:43 -07:00
Jakub Kicinski
36f6b72cb8 linux-can-fixes-for-6.11-20240912
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEUEC6huC2BN0pvD5fKDiiPnotvG8FAmbinMQTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRAoOKI+ei28b1V2B/40hS58fS5dW5jVr1jhakU7AvRBxUQL
 SCqWmqPv2Ul7Si5pqoWTrS1Ehn5KDnHolms4XjTNi7+9F9DMpEmOJGivZ+WP4GAK
 bNg0UV32UY9rZ6UQiVyBkits60/+F1D1l/aDTs9D9FswLaihBHrX81wAByo0bYFt
 +jLC3B29vfW+Cvh9lxKWGIThQi5aLPwZO1VVmBDqny4FsPZrTI6WUgjLL1nLFJ3r
 8/qJeAua62wylWpTZCcBZT+zUS6CvfNfuCOqN5gwvEv/MlJqZg1XAsnwxKKA/jqx
 MYO+0YO0mzqdweQkBEqwGWPWrSF+/i0iIktnAWHpc/5LEnzlPQ6q/y9+
 =OwTb
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-6.11-20240912' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2024-09-12

Kuniyuki Iwashima's patch fixes an incomplete bug fix in the CAN BCM
protocol, which was introduced during v6.11.

A patch by Stefan Mätje removes the unsupported CAN_CTRLMODE_3_SAMPLES
mode for CAN-USB/3-FD devices in the esd_usb driver.

The next patch is by Martin Jocic and enables 64-bit DMA addressing
for the kvaser_pciefd driver.

The last two patches both affect the m_can driver. Jake Hamby's patch
activates NAPI before interrupts are activated, a patch by me moves
the stopping of the clock after the device has been shut down.

* tag 'linux-can-fixes-for-6.11-20240912' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: m_can: m_can_close(): stop clocks after device has been shut down
  can: m_can: enable NAPI before enabling interrupts
  can: kvaser_pciefd: Enable 64-bit DMA addressing
  can: esd_usb: Remove CAN_CTRLMODE_3_SAMPLES for CAN-USB/3-FD
  can: bcm: Clear bo->bcm_proc_read after remove_proc_entry().
====================

Link: https://patch.msgid.link/20240912075804.2825408-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:20:13 -07:00
Gaosheng Cui
1b8c9cb315 MIPS: Remove the obsoleted code for include/linux/mv643xx.h
Most of the drivers which used this header have been deleted, most
of these code is obsoleted, move the only defines that are actually
used into arch/powerpc/platforms/chrp/pegasos_eth.c and delete the
file completely.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://patch.msgid.link/20240912011949.2726928-1-cuigaosheng1@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:18:42 -07:00
Jakub Kicinski
158135dcb4 Merge branch 'enic-report-per-queue-stats'
Nelson Escobar says:

====================
enic: Report per queue stats

Patch #1: Use a macro instead of static const variables for array sizes.  I
          didn't want to add more static const variables in the next patch
          so clean up the existing ones first.

Patch #2: Collect per queue statistics

Patch #3: Report per queue stats in netdev qstats

Patch #4: Report some per queue stats in ethtool

 # NETIF="eno6" tools/testing/selftests/drivers/net/stats.py
KTAP version 1
1..5
ok 1 stats.check_pause # XFAIL pause not supported by the device
ok 2 stats.check_fec # XFAIL FEC not supported by the device
ok 3 stats.pkt_byte_sum
ok 4 stats.qstat_by_ifindex
ok 5 stats.check_down

 # tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
     --dump qstats-get --json '{"ifindex": "34"}'
[{'ifindex': 34,
  'rx-bytes': 66762680,
  'rx-csum-unnecessary': 1009345,
  'rx-hw-drop-overruns': 0,
  'rx-hw-drops': 0,
  'rx-packets': 1009673,
  'tx-bytes': 137936674899,
  'tx-csum-none': 125,
  'tx-hw-gso-packets': 2408712,
  'tx-needs-csum': 2431531,
  'tx-packets': 15475466,
  'tx-stop': 0,
  'tx-wake': 0}]

v2: https://lore.kernel.org/20240905010900.24152-1-neescoba@cisco.com
v1: https://lore.kernel.org/20240823235401.29996-1-neescoba@cisco.com
====================

Link: https://patch.msgid.link/20240912005039.10797-1-neescoba@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:17:15 -07:00
Nelson Escobar
bde04d9876 enic: Report some per queue statistics in ethtool
Make 'ethtool -S <intf>' output show some per rq/wq statistics that
don't exist in the netdev qstats.

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Link: https://patch.msgid.link/20240912005039.10797-5-neescoba@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:17:12 -07:00
Nelson Escobar
77805ddb57 enic: Report per queue statistics in netdev qstats
Report per queue wq/rq statistics in netdev qstats.

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Link: https://patch.msgid.link/20240912005039.10797-4-neescoba@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:17:12 -07:00
Nelson Escobar
f3f9150994 enic: Collect per queue statistics
Collect and per rq/wq statistics.

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Link: https://patch.msgid.link/20240912005039.10797-3-neescoba@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:17:11 -07:00
Nelson Escobar
a59571ad6d enic: Use macro instead of static const variables for array sizes
In enic_ethtool.c there is no need to use static const variables to store
array sizes when a macro can be used instead.

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Link: https://patch.msgid.link/20240912005039.10797-2-neescoba@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:17:11 -07:00
Jakub Kicinski
7bb50f30c1 Merge branch 'net-fib_rules-add-dscp-selector-support'
Ido Schimmel says:

====================
net: fib_rules: Add DSCP selector support

Currently, the kernel rejects IPv4 FIB rules that try to match on the
upper three DSCP bits:

 # ip -4 rule add tos 0x1c table 100
 # ip -4 rule add tos 0x3c table 100
 Error: Invalid tos.

The reason for that is that historically users of the FIB lookup API
only populated the lower three DSCP bits in the TOS field of the IPv4
flow key ('flowi4_tos'), which fits the TOS definition from the initial
IPv4 specification (RFC 791).

This is not very useful nowadays and instead some users want to be able
to match on the six bits DSCP field, which replaced the TOS and IP
precedence fields over 25 years ago (RFC 2474). In addition, the current
behavior differs between IPv4 and IPv6 which does allow users to match
on the entire DSCP field using the TOS selector.

Recent patchsets made sure that callers of the FIB lookup API now
populate the entire DSCP field in the IPv4 flow key. Therefore, it is
now possible to extend FIB rules to match on DSCP.

This is done by adding a new DSCP attribute which is implemented for
both IPv4 and IPv6 to provide user space programs a consistent behavior
between both address families.

The behavior of the old TOS selector is unchanged and IPv4 FIB rules
using it will only match on the lower three DSCP bits. The kernel will
reject rules that try to use both selectors.

Patch #1 adds the new DSCP attribute but rejects its usage.

Patches #2-#3 implement IPv4 and IPv6 support.

Patch #4 allows user space to use the new attribute.

Patches #5-#6 add selftests.
====================

Link: https://patch.msgid.link/20240911093748.3662015-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:47 -07:00
Ido Schimmel
2bf1259a6e selftests: fib_rule_tests: Add DSCP selector connect tests
Test that locally generated traffic from a socket that specifies a DS
Field using the IP_TOS / IPV6_TCLASS socket options is correctly
redirected using a FIB rule that matches on DSCP. Add negative tests to
verify that the rule is not it when it should not. Test with both IPv4
and IPv6 and with both TCP and UDP sockets.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-7-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:45 -07:00
Ido Schimmel
ac6ad3f3b5 selftests: fib_rule_tests: Add DSCP selector match tests
Add tests for the new FIB rule DSCP selector. Test with both IPv4 and
IPv6 and with both input and output routes.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-6-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:45 -07:00
Ido Schimmel
4b041d286e net: fib_rules: Enable DSCP selector usage
Now that both IPv4 and IPv6 support the new DSCP selector, enable user
space to configure FIB rules that make use of it by changing the policy
of the new DSCP attribute so that it accepts values in the range of [0,
63].

Use NLA_U8 rather than NLA_UINT as the field is of fixed size.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-5-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:45 -07:00
Ido Schimmel
2cf630034e ipv6: fib_rules: Add DSCP selector support
Implement support for the new DSCP selector that allows IPv6 FIB rules
to match on the entire DSCP field. This is done despite the fact that
the above can be achieved using the existing TOS selector, so that user
space program will be able to work with IPv4 and IPv6 rules in the same
way.

Differentiate between both selectors by adding a new bit in the IPv6 FIB
rule structure that is only set when the 'FRA_DSCP' attribute is
specified by user space. Reject rules that use both selectors.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-4-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:45 -07:00
Ido Schimmel
b9455fef8b ipv4: fib_rules: Add DSCP selector support
Implement support for the new DSCP selector that allows IPv4 FIB rules
to match on the entire DSCP field, unlike the existing TOS selector that
only matches on the three lower DSCP bits.

Differentiate between both selectors by adding a new bit in the IPv4 FIB
rule structure (in an existing one byte hole) that is only set when the
'FRA_DSCP' attribute is specified by user space. Reject rules that use
both selectors.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240911093748.3662015-3-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:15:44 -07:00