Philipp Hortmann [Wed, 13 Jul 2022 05:00:57 +0000 (07:00 +0200)]
staging: vt6655: Rename MACvWordRegBitsOff
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b8d4b72ddfdefb6b8a73fb95f6851e0f365118ba.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 05:01:10 +0000 (07:01 +0200)]
staging: vt6655: Rename MACvRegBitsOff
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e6bea6707f20a53d0631dd1f477ce72d36cd6f3e.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 05:00:25 +0000 (07:00 +0200)]
staging: vt6655: Rename MACvWordRegBitsOn
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b3873e1103d642a804d42c945dc0c73d94b0c1cf.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 05:00:40 +0000 (07:00 +0200)]
staging: vt6655: Rename MACvRegBitsOn
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7fb9627441ff97897d132c62d59676355b6d14ea.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 05:00:12 +0000 (07:00 +0200)]
staging: vt6655: Rename wData to reg_value in two macros
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8f2e9451a24e380c997fcf7c87249f7ed9b66787.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 04:59:58 +0000 (06:59 +0200)]
staging: vt6655: Rename byData to reg_value in two macros
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/159014866cce40913d360a0692fb3c426d4cb840.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 04:59:38 +0000 (06:59 +0200)]
staging: vt6655: Rename wBits to bit_mask in two macros
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/8929407dc7355df515b7f9fdd195b45ff44f6b98.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 04:59:18 +0000 (06:59 +0200)]
staging: vt6655: Rename byBits to bit_mask in two macros
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/5ac7e8860ecb23232cf5befea024872e7db76d59.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 13 Jul 2022 04:58:56 +0000 (06:58 +0200)]
staging: vt6655: Rename byRegOfs to reg_offset in four macros
Fix name of a variable in four macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/82f65d22ac8cd75b2c7790c13be3d0068968925b.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Wed, 13 Jul 2022 07:55:52 +0000 (09:55 +0200)]
staging: r8188eu: fall back to random mac address
Call eth_random_addr to generate a random mac address if we cannot load
the mac address from the efuses.
Do not use a constant mac address as fallback. This may create conflicts
if we have several r8188eu devices on the network.
Suggested-by: Joe Perches <joe@perches.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220713075552.140927-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Wed, 13 Jul 2022 07:58:04 +0000 (09:58 +0200)]
staging: r888eu: use dynamic allocation for efuse buffer
Use kmalloc to allocate the efuse buffer in ReadAdapterInfo8188EU and
free it on exit. This is better than using a 512 byte array on the stack.
It's ok to drop the __aligned(4) qualifier. kmalloc aligns to
ARCH_KMALLOC_MINALIGN, this is at least 8 bytes.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220713075804.140986-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binyi Han [Wed, 13 Jul 2022 08:00:23 +0000 (01:00 -0700)]
staging: qlge: Avoid multiplication while keep the same logic
Avoid the more expensive multiplication while keep the same logic.
Signed-off-by: Binyi Han <dantengknight@gmail.com>
Link: https://lore.kernel.org/r/31fe21bf4a9e8f13cf27bd50073e9d5d197654ea.1657697683.git.dantengknight@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Binyi Han [Wed, 13 Jul 2022 07:59:25 +0000 (00:59 -0700)]
staging: qlge: Fix indentation issue under long for loop
Fix indentation issue to adhere to Linux kernel coding style, issue
found by checkpatch. And change the long for loop into 3 lines.
Signed-off-by: Binyi Han <dantengknight@gmail.com>
Link: https://lore.kernel.org/r/4e18dabcce7f589386a33ceed59096aa049779f0.1657697683.git.dantengknight@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Mon, 11 Jul 2022 17:44:17 +0000 (19:44 +0200)]
staging: r8188eu: remove HW_VAR_MLME_SITESURVEY from SetHwReg8188EU()
Remove the HW_VAR_MLME_SITESURVEY case from SetHwReg8188EU() and move
the functionality to two new functions in rtw_mlme_ext.c. This is part
of the ongoing effort to get rid of SetHwReg8188EU().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220711174417.10721-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:10:00 +0000 (19:10 +0200)]
staging: r8188eu: the bcnhead parameter is always 0
The only caller of efuse_read_phymap_from_txpktbuf sets bcnhead to 0.
Remove this function parameter and simplify the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:59 +0000 (19:09 +0200)]
staging: r8188eu: efuse_utilized is never read
The efuse_utilized variable in function efuse_phymap_to_logical is
written to but never read. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:58 +0000 (19:09 +0200)]
staging: r8188eu: _offset is always 0 in efuse_phymap_to_logical
The _offset parameter of iol_read_efuse is always 0. Remove the
parameter and use 0 in the function body.
We can now replace the bytewise copy from efuseTbl to pbuf with memcpy.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:57 +0000 (19:09 +0200)]
staging: r8188eu: offset is always 0 in iol_read_efuse
The offset parameter of iol_read_efuse is always 0. Remove the
parameter and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:56 +0000 (19:09 +0200)]
staging: r8188eu: offset is always 0 in rtl8188e_ReadEFuse
The offset parameter of rtl8188e_ReadEFuse is always 0. Remove the
parameter and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:55 +0000 (19:09 +0200)]
staging: r8188eu: txpktbuf_bndy is always 0
The only caller of iol_read_efuse sets the txpktbuf_bndy parameter to 0.
Remove the parameter from iol_read_efuse and use 0 in the function body.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:54 +0000 (19:09 +0200)]
staging: r8188eu: merge ReadEFuseByIC into rtl8188e_ReadEFuse
The rtl8188e_ReadEFuse function is just a wrapper to call ReadEFuseByIC.
Copy ReadEFuseByIC into rtl8188e_ReadEFuse and remove ReadEFuseByIC.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:53 +0000 (19:09 +0200)]
staging: r8188eu: use memcpy for fallback mac address
Use memcpy to store the fallback mac address in eeprom->mac_addr. Do not
copy byte by byte.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:52 +0000 (19:09 +0200)]
staging: r8188eu: always initialise efuse buffer with 0xff
If BOOT_FROM_EEPROM is set, efuse_buf is not initialised before it is
passed to functions that read from it.
The buffer will be filled with 0x00 in this case like all local variables.
However, the parsing functions expect the buffer to be filled with 0xFF if
reading eeprom/efuse data failed. Fill the buffer with 0xFF before we try
to read the data.
Please note that this problem existed before we started using a local
buffer. Adapter->eeprompriv->efuse_eeprom_data was allocated as a part of
struct adapter by a vzalloc call in rtw_usb_if1_init.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:51 +0000 (19:09 +0200)]
staging: r8188eu: use a local buffer for efuse data
The efuse_eeprom_data array in struct eeprom_priv is used only by
ReadAdapterInfo8188EU. We can remove efuse_eeprom_data and use a local
buffer instead.
Use EFUSE_MAP_LEN_88E as buffer size. Its value is the same as
HWSET_MAX_SIZE_512. The functions that access the buffer use
EFUSE_MAP_LEN_88E for its size.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:50 +0000 (19:09 +0200)]
staging: r8188eu: merge EFUSE_ShadowMapUpdate with its caller
Merge the EFUSE_ShadowMapUpdate function into ReadAdapterInfo8188EU, which
is the only caller.
Merging the two functions makes it clearer that eeprom->efuse_eeprom_data
is in fact a temporary buffer that stores info read from efuses.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:49 +0000 (19:09 +0200)]
staging: r8188eu: remove eeprom function prototypes
Remove prototypes for non-existing eeprom functions. It seems that r8188eu
has efuses but no eeprom.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:48 +0000 (19:09 +0200)]
staging: r8188eu: remove EepromOrEfuse from struct eeprom_priv
The EepromOrEfuse flag in struct eeprom_priv is used only in the
ReadAdapterInfo8188EU function. We can remove EepromOrEfuse from struct
eeprom_priv.
As the meaning of EepromOrEfuse isn't obvious, there is a macro
is_boot_from_eeprom that's used for checking the value. We don't need the
macro, writing the check as !(eeValue & BOOT_FROM_EEPROM) makes it clear
what is checked.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Sat, 9 Jul 2022 17:09:47 +0000 (19:09 +0200)]
staging: r8188eu: remove unused eeprom defines
Remove some eeprom-related defines which are not used by the r8188eu
driver. This driver uses BOOT_FROM_EEPROM and EEPROM_EN instead of the
defines that this patch removes.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 9 Jul 2022 09:44:58 +0000 (11:44 +0200)]
staging: r8188eu: remove HW_VAR_DM_FUNC_CLR from SetHwReg8188EU()
Remove the HW_VAR_DM_FUNC_CLR case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing effort
to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 9 Jul 2022 09:44:57 +0000 (11:44 +0200)]
staging: r8188eu: remove HW_VAR_DM_FUNC_RESET from SetHwReg8188EU()
Remove the HW_VAR_DM_FUNC_RESET case from SetHwReg8188EU() and move
its functionality to a static function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 9 Jul 2022 09:44:56 +0000 (11:44 +0200)]
staging: r8188eu: remove HW_VAR_DM_FLAG from SetHwReg8188EU()
Remove the HW_VAR_DM_FLAG case from SetHwReg8188EU() and move its
functionality to a static function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 9 Jul 2022 09:44:55 +0000 (11:44 +0200)]
staging: r8188eu: remove HW_VAR_DM_FUNC_OP from SetHwReg8188EU()
Remove the HW_VAR_DM_FUNC_OP case from SetHwReg8188EU() and move the
functionality to the functions that call SetHwReg8188EU() with
HW_VAR_DM_FUNC_OP. This is part of the ongoing effort to get rid of
SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 9 Jul 2022 09:44:54 +0000 (11:44 +0200)]
staging: r8188eu: remove HW_VAR_BASIC_RATE from SetHwReg8188EU()
Remove the HW_VAR_BASIC_RATE case from SetHwReg8188EU() and move the
functionality to a separate function. This is part of the ongoing
effort to get rid of SetHwReg8188EU().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220709094458.9578-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Duoming Zhou [Sun, 10 Jul 2022 10:30:02 +0000 (18:30 +0800)]
staging: rtl8192u: Fix sleep in atomic context bug in dm_fsync_timer_callback
There are sleep in atomic context bugs when dm_fsync_timer_callback is
executing. The root cause is that the memory allocation functions with
GFP_KERNEL or GFP_NOIO parameters are called in dm_fsync_timer_callback
which is a timer handler. The call paths that could trigger bugs are
shown below:
(interrupt context)
dm_fsync_timer_callback
write_nic_byte
kzalloc(sizeof(data), GFP_KERNEL); //may sleep
usb_control_msg
kmalloc(.., GFP_NOIO); //may sleep
write_nic_dword
kzalloc(sizeof(data), GFP_KERNEL); //may sleep
usb_control_msg
kmalloc(.., GFP_NOIO); //may sleep
This patch uses delayed work to replace timer and moves the operations
that may sleep into the delayed work in order to mitigate bugs.
Fixes:
8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220710103002.63283-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 11 Jul 2022 07:25:23 +0000 (09:25 +0200)]
Merge 5.19-rc6 into staging-next
We need the staging driver fix in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 10 Jul 2022 21:40:51 +0000 (14:40 -0700)]
Linux 5.19-rc6
Linus Torvalds [Sun, 10 Jul 2022 21:26:49 +0000 (14:26 -0700)]
Merge branch 'hot-fixes' (fixes for rc6)
This is a collection of three fixes for small annoyances.
Two of these are already pending in other trees, but I really don't want
to release another -rc with these issues pending, so I picked up the
patches for these things directly. We'll end up with duplicate commits
eventually, I prefer that over having these issues pending.
The third one is just me getting rid of another BUG_ON() just because it
was reported and I dislike those things so much.
* merge 'hot-fixes' branch:
ida: don't use BUG_ON() for debugging
drm/aperture: Run fbdev removal before internal helpers
ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
Linus Torvalds [Sun, 10 Jul 2022 20:55:49 +0000 (13:55 -0700)]
ida: don't use BUG_ON() for debugging
This is another old BUG_ON() that just shouldn't exist (see also commit
a382f8fee42c: "signal handling: don't use BUG_ON() for debugging").
In fact, as Matthew Wilcox points out, this condition shouldn't really
even result in a warning, since a negative id allocation result is just
a normal allocation failure:
"I wonder if we should even warn here -- sure, the caller is trying to
free something that wasn't allocated, but we don't warn for
kfree(NULL)"
and goes on to point out how that current error check is only causing
people to unnecessarily do their own index range checking before freeing
it.
This was noted by Itay Iellin, because the bluetooth HCI socket cookie
code does *not* do that range checking, and ends up just freeing the
error case too, triggering the BUG_ON().
The HCI code requires CAP_NET_RAW, and seems to just result in an ugly
splat, but there really is no reason to BUG_ON() here, and we have
generally striven for allocation models where it's always ok to just do
free(alloc());
even if the allocation were to fail for some random reason (usually
obviously that "random" reason being some resource limit).
Fixes:
88eca0207cf1 ("ida: simplified functions for id allocation")
Reported-by: Itay Iellin <ieitayie@gmail.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 10 Jul 2022 18:23:01 +0000 (11:23 -0700)]
Merge tag 'dmaengine-fix-5.19' of git://git./linux/kernel/git/vkoul/dmaengine
Pull dmaengine fixes from Vinod Koul:
"One core fix for DMA_INTERRUPT and rest driver fixes.
Core:
- Revert verification of DMA_INTERRUPT capability as that was
incorrect
Bunch of driver fixes for:
- ti: refcount and put_device leak
- qcom_bam: runtime pm overflow
- idxd: force wq context cleanup and call idxd_enable_system_pasid()
on success
- dw-axi-dmac: RMW on channel suspend register
- imx-sdma: restart cyclic channel when enabled
- at_xdma: error handling for at_xdmac_alloc_desc
- pl330: lockdep warning
- lgm: error handling path in probe
- allwinner: Fix min/max typo in binding"
* tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
dt-bindings: dma: allwinner,sun50i-a64-dma: Fix min/max typo
dmaengine: lgm: Fix an error handling path in intel_ldma_probe()
dmaengine: pl330: Fix lockdep warning about non-static key
dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
dmaengine: imx-sdma: only restart cyclic channel when enabled
dmaengine: dw-axi-dmac: Fix RMW on channel suspend register
dmaengine: idxd: force wq context cleanup on device disable path
dmaengine: qcom: bam_dma: fix runtime PM underflow
dmaengine: imx-sdma: Allow imx8m for imx7 FW revs
dmaengine: Revert "dmaengine: add verification of DMA_INTERRUPT capability for dmatest"
dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
Linus Torvalds [Sun, 10 Jul 2022 16:51:56 +0000 (09:51 -0700)]
Merge tag 'staging-5.19-rc6' of git://git./linux/kernel/git/gregkh/staging
Pull staging driver fix from Greg KH:
"Here is a single staging driver fix for a reported problem that showed
up in 5.19-rc1 in the wlan-ng driver. It has been in linux-next for a
week with no reported problems"
* tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging/wlan-ng: get the correct struct hfa384x in work callback
Linus Torvalds [Sun, 10 Jul 2022 16:45:29 +0000 (09:45 -0700)]
Merge tag 'char-misc-5.19-rc6' of git://git./linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are four small char/misc driver fixes for 5.19-rc6 to resolve
some reported issues. They only affect two drivers:
- rtsx_usb: fix for of-reported DMA warning error, the driver was
handling memory buffers in odd ways, it has now been fixed up to be
much simpler and correct by Shuah.
- at25 eeprom driver bugfix for reported problem
All of these have been in linux-next for a week with no reported
problems"
* tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
misc: rtsx_usb: set return value in rsp_buf alloc err path
misc: rtsx_usb: use separate command and response buffers
misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
eeprom: at25: Rework buggy read splitting
Linus Torvalds [Sun, 10 Jul 2022 16:14:54 +0000 (09:14 -0700)]
Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block
Pull io_uring fix from Jens Axboe:
"A single fix for an issue that came up yesterday that we should plug
for -rc6.
This is a regression introduced in this cycle"
* tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
io_uring: check that we have a file table when allocating update slots
Linus Torvalds [Sun, 10 Jul 2022 15:59:02 +0000 (08:59 -0700)]
Merge tag 'kbuild-fixes-v5.19-3' of git://git./linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- Adjust gen_compile_commands.py to the format change of *.mod files
- Remove unused macro in scripts/Makefile.modinst
* tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: remove unused cmd_none in scripts/Makefile.modinst
gen_compile_commands: handle multiple lines per .mod file
Linus Torvalds [Sun, 10 Jul 2022 15:52:12 +0000 (08:52 -0700)]
Merge tag 'irq_urgent_for_v5.19_rc6' of git://git./linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov:
- Gracefully handle failure to request MMIO resources in the GICv3
driver
- Make a static key static in the Apple AIC driver
- Fix the Xilinx intc driver dependency on OF_ADDRESS
* tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/apple-aic: Make symbol 'use_fast_ipi' static
irqchip/xilinx: Add explicit dependency on OF_ADDRESS
irqchip/gicv3: Handle resource request failure consistently
Linus Torvalds [Sun, 10 Jul 2022 15:43:52 +0000 (08:43 -0700)]
Merge tag 'x86_urgent_for_v5.19_rc6' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Borislav Petkov:
- Prepare for and clear .brk early in order to address XenPV guests
failures where the hypervisor verifies page tables and uninitialized
data in that range leads to bogus failures in those checks
- Add any potential setup_data entries supplied at boot to the identity
pagetable mappings to prevent kexec kernel boot failures. Usually,
this is not a problem for the normal kernel as those mappings are
part of the initially mapped 2M pages but if kexec gets to allocate
the second kernel somewhere else, those setup_data entries need to be
mapped there too.
- Fix objtool not to discard text references from the __tracepoints
section so that ENDBR validation still works
- Correct the setup_data types limit as it is user-visible, before 5.19
releases
* tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/boot: Fix the setup data types max limit
x86/ibt, objtool: Don't discard text references from tracepoint section
x86/compressed/64: Add identity mappings for setup_data entries
x86: Fix .brk attribute in linker script
x86: Clear .brk area at early boot
x86/xen: Use clear_bss() for Xen PV guests
Masahiro Yamada [Thu, 30 Jun 2022 08:09:35 +0000 (17:09 +0900)]
kbuild: remove unused cmd_none in scripts/Makefile.modinst
Commit
65ce9c38326e ("kbuild: move module strip/compression code into
scripts/Makefile.modinst") added this unused code.
Perhaps, I thought cmd_none was useful for CONFIG_MODULE_COMPRESS_NONE,
but I did not use it after all.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Borislav Petkov [Sun, 10 Jul 2022 09:15:47 +0000 (11:15 +0200)]
x86/boot: Fix the setup data types max limit
Commit in Fixes forgot to change the SETUP_TYPE_MAX definition which
contains the highest valid setup data type.
Correct that.
Fixes:
5ea98e01ab52 ("x86/boot: Add Confidential Computing type to setup_data")
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/ddba81dd-cc92-699c-5274-785396a17fb5@zytor.com
Linus Torvalds [Sat, 9 Jul 2022 18:20:15 +0000 (11:20 -0700)]
Merge tag 'i2c-for-5.19-rc6' of git://git./linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"Two I2C driver bugfixes preventing resource leaks"
* tag 'i2c-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: cadence: Unregister the clk notifier in error path
i2c: piix4: Fix a memory leak in the EFCH MMIO support
Thomas Zimmermann [Fri, 17 Jun 2022 12:10:27 +0000 (14:10 +0200)]
drm/aperture: Run fbdev removal before internal helpers
Always run fbdev removal first to remove simpledrm via sysfb_disable().
This clears the internal state.
The later call to drm_aperture_detach_drivers() then does nothing.
Otherwise, with drm_aperture_detach_drivers() running first, the call to
sysfb_disable() uses inconsistent state.
Example backtrace show below:
BUG: KASAN: use-after-free in device_del+0x79/0x5f0
Read of size 8 at addr
ffff888108185050 by task systemd-udevd/311
CPU: 0 PID: 311 Comm: systemd-udevd Tainted: G E 5.19.0-rc2-1-default+ #1689
Hardware name: HP ProLiant DL120 G7, BIOS J01 04/21/2011
Call Trace:
device_del+0x79/0x5f0
platform_device_del.part.0+0x19/0xe0
platform_device_unregister+0x1c/0x30
sysfb_disable+0x2d/0x70
remove_conflicting_framebuffers+0x1c/0xf0
remove_conflicting_pci_framebuffers+0x130/0x1a0
drm_aperture_remove_conflicting_pci_framebuffers+0x86/0xb0
mgag200_pci_probe+0x2d/0x140 [mgag200]
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes:
873eb3b11860 ("fbdev: Disable sysfb device registration when removing conflicting FBs")
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Changcheng Deng <deng.changcheng@zte.com.cn>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sven Schnelle [Wed, 6 Jul 2022 10:16:25 +0000 (12:16 +0200)]
ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
CI reported the following splat while running the strace testsuite:
WARNING: CPU: 1 PID: 3570031 at kernel/ptrace.c:272 ptrace_check_attach+0x12e/0x178
CPU: 1 PID: 3570031 Comm: strace Tainted: G OE 5.19.0-
20220624.rc3.git0.
ee819a77d4e7.300.fc36.s390x #1
Hardware name: IBM 3906 M04 704 (z/VM 7.1.0)
Call Trace:
[<
00000000ab4b645a>] ptrace_check_attach+0x132/0x178
([<
00000000ab4b6450>] ptrace_check_attach+0x128/0x178)
[<
00000000ab4b6cde>] __s390x_sys_ptrace+0x86/0x160
[<
00000000ac03fcec>] __do_syscall+0x1d4/0x200
[<
00000000ac04e312>] system_call+0x82/0xb0
Last Breaking-Event-Address:
[<
00000000ab4ea3c8>] wait_task_inactive+0x98/0x190
This is because JOBCTL_TRACED is set, but the task is not in TASK_TRACED
state. Caused by ptrace_unfreeze_traced() which does:
task->jobctl &= ~TASK_TRACED
but it should be:
task->jobctl &= ~JOBCTL_TRACED
Fixes:
31cae1eaae4f ("sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 9 Jul 2022 17:34:08 +0000 (10:34 -0700)]
Merge tag 'powerpc-5.19-5' of git://git./linux/kernel/git/powerpc/linux
Pull powerpc fix from Michael Ellerman:
- On Power8 bare metal, fix creation of RNG platform devices, which are
needed for the /dev/hwrng driver to probe correctly.
Thanks to Jason A. Donenfeld, and Sachin Sant.
* tag 'powerpc-5.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/powernv: delay rng platform device creation until later in boot
Jens Axboe [Sat, 9 Jul 2022 13:02:10 +0000 (07:02 -0600)]
io_uring: check that we have a file table when allocating update slots
If IORING_FILE_INDEX_ALLOC is set asking for an allocated slot, the
helper doesn't check if we actually have a file table or not. The non
alloc path does do that correctly, and returns -ENXIO if we haven't set
one up.
Do the same for the allocated path, avoiding a NULL pointer dereference
when trying to find a free bit.
Fixes:
a7c41b4687f5 ("io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Linus Torvalds [Fri, 8 Jul 2022 23:08:48 +0000 (16:08 -0700)]
Merge tag 'fscache-fixes-
20220708' of git://git./linux/kernel/git/dhowells/linux-fs
Pull fscache fixes from David Howells:
- Fix a check in fscache_wait_on_volume_collision() in which the
polarity is reversed. It should complain if a volume is still marked
acquisition-pending after 20s, but instead complains if the mark has
been cleared (ie. the condition has cleared).
Also switch an open-coded test of the ACQUIRE_PENDING volume flag to
use the helper function for consistency.
- Not a fix per se, but neaten the code by using a helper to check for
the DROPPED state.
- Fix cachefiles's support for erofs to only flush requests associated
with a released control file, not all requests.
- Fix a race between one process invalidating an object in the cache
and another process trying to look it up.
* tag 'fscache-fixes-
20220708' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
fscache: Fix invalidation/lookup race
cachefiles: narrow the scope of flushed requests when releasing fd
fscache: Introduce fscache_cookie_is_dropped()
fscache: Fix if condition in fscache_wait_on_volume_collision()
Linus Torvalds [Fri, 8 Jul 2022 20:05:56 +0000 (13:05 -0700)]
Merge tag 'acpi-5.19-rc6' of git://git./linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki:
"These fix two recent regressions related to CPPC support.
Specifics:
- Prevent _CPC from being used if the platform firmware does not
confirm CPPC v2 support via _OSC (Mario Limonciello)
- Allow systems with X86_FEATURE_CPPC set to use _CPC even if CPPC
support cannot be agreed on via _OSC (Mario Limonciello)"
* tag 'acpi-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: CPPC: Don't require _OSC if X86_FEATURE_CPPC is supported
ACPI: CPPC: Only probe for _CPC if CPPC v2 is acked
Linus Torvalds [Fri, 8 Jul 2022 20:01:04 +0000 (13:01 -0700)]
Merge tag 'pm-5.19-rc6' of git://git./linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"These fix a NULL pointer dereference in a devfreq driver and a runtime
PM framework issue that may cause a supplier device to be suspended
before its consumer.
Specifics:
- Fix NULL pointer dereference related to printing a diagnostic
message in the exynos-bus devfreq driver (Christian Marangi)
- Fix race condition in the runtime PM framework which in some cases
may cause a supplier device to be suspended when its consumer is
still active (Rafael Wysocki)"
* tag 'pm-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / devfreq: exynos-bus: Fix NULL pointer dereference
PM: runtime: Fix supplier device management during consumer probe
PM: runtime: Redefine pm_runtime_release_supplier()
Linus Torvalds [Fri, 8 Jul 2022 19:55:25 +0000 (12:55 -0700)]
Merge tag 'cxl-fixes-for-5.19-rc6' of git://git./linux/kernel/git/cxl/cxl
Pull cxl fixes from Vishal Verma:
- Update MAINTAINERS for Ben's email
- Fix cleanup of port devices on failure to probe driver
- Fix endianness in get/set LSA mailbox command structures
- Fix memregion_free() fallback definition
- Fix missing variable payload checks in CXL cmd size validation
* tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
cxl/mbox: Fix missing variable payload checks in cmd size validation
memregion: Fix memregion_free() fallback definition
cxl/mbox: Use __le32 in get,set_lsa mailbox structures
cxl/core: Use is_endpoint_decoder
cxl: Fix cleanup of port devices on failure to probe driver.
MAINTAINERS: Update Ben's email address
Linus Torvalds [Fri, 8 Jul 2022 19:49:00 +0000 (12:49 -0700)]
Merge tag 'iommu-fixes-v5.19-rc5' of git://git./linux/kernel/git/joro/iommu
Pull iommu fixes from Joerg Roedel:
- fix device setup failures in the Intel VT-d driver when the PASID
table is shared
- fix Intel VT-d device hot-add failure due to wrong device notifier
order
- remove the old IOMMU mailing list from the MAINTAINERS file now that
it has been retired
* tag 'iommu-fixes-v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
MAINTAINERS: Remove iommu@lists.linux-foundation.org
iommu/vt-d: Fix RID2PASID setup/teardown failure
iommu/vt-d: Fix PCI bus rescan device hot add
Linus Torvalds [Fri, 8 Jul 2022 19:39:52 +0000 (12:39 -0700)]
Merge tag 'gpio-fixes-for-v5.19-rc6' of git://git./linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski:
- fix a build error in gpio-vf610
- fix a null-pointer dereference in the GPIO character device code
* tag 'gpio-fixes-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
gpiolib: cdev: fix null pointer dereference in linereq_free()
gpio: vf610: fix compilation error
Rafael J. Wysocki [Fri, 8 Jul 2022 18:38:51 +0000 (20:38 +0200)]
Merge branch 'pm-core'
Merge a runtime PM framework cleanup and fix related to device links.
* pm-core:
PM: runtime: Fix supplier device management during consumer probe
PM: runtime: Redefine pm_runtime_release_supplier()
Linus Torvalds [Fri, 8 Jul 2022 18:32:23 +0000 (11:32 -0700)]
Merge tag 'block-5.19-2022-07-08' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"NVMe pull request with another id quirk addition, and a tracing fix"
* tag 'block-5.19-2022-07-08' of git://git.kernel.dk/linux-block:
nvme: use struct group for generic command dwords
nvme-pci: phison e16 has bogus namespace ids
Linus Torvalds [Fri, 8 Jul 2022 18:25:01 +0000 (11:25 -0700)]
Merge tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block
Pull io_uring tweak from Jens Axboe:
"Just a minor tweak to an addition made in this release cycle: padding
a 32-bit value that's in a 64-bit union to avoid any potential
funkiness from that"
* tag 'io_uring-5.19-2022-07-08' of git://git.kernel.dk/linux-block:
io_uring: explicit sqe padding for ioctl commands
Linus Torvalds [Fri, 8 Jul 2022 18:03:26 +0000 (11:03 -0700)]
Merge tag 'for-5.19/fbdev-3' of git://git./linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes from Helge Deller:
- fbcon now prevents switching to screen resolutions which are smaller
than the font size, and prevents enabling a font which is bigger than
the current screen resolution. This fixes vmalloc-out-of-bounds
accesses found by KASAN.
- Guiling Deng fixed a bug where the centered fbdev logo wasn't
displayed correctly if the screen size matched the logo size.
- Hsin-Yi Wang provided a patch to include errno.h to fix build when
CONFIG_OF isn't enabled.
* tag 'for-5.19/fbdev-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
fbcon: Use fbcon_info_from_console() in fbcon_modechange_possible()
fbmem: Check virtual screen sizes in fb_set_var()
fbcon: Prevent that screen size is smaller than font size
fbcon: Disallow setting font bigger than screen size
video: of_display_timing.h: include errno.h
fbdev: fbmem: Fix logo center image dx issue
Philipp Hortmann [Wed, 6 Jul 2022 19:19:06 +0000 (21:19 +0200)]
staging: vt6655: Use loop in vt6655_mac_read_ether_addr
Use loop in vt6655_mac_read_ether_addr to avoid multiple
similar statements.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/f233c8a007d75a8adcc99a07c582b75bdc1985db.1657134099.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Wed, 6 Jul 2022 19:19:01 +0000 (21:19 +0200)]
staging: vt6655: Use loop in vt6655_mac_write_bssid_addr
Use loop in vt6655_mac_write_bssid_addr to avoid multiple
similar statements.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b3b93ae7ce41562565e9007eb4580b9c47a2881f.1657134099.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Thu, 7 Jul 2022 19:49:14 +0000 (21:49 +0200)]
staging: r8188eu: pattrib addresses were already set by the caller
Do not set pattrib's src, dst, bssid, ra and ta again in
sta2sta_data_frame.
sta2sta_data_frame is called from validate_recv_data_frame when both to_ds
and from_ds are 0. All pattrib address fields have already been set to the
correct addresses when sta2sta_data_frame is called.
memcpy(pattrib->dst, ieee80211_get_DA(hdr), ETH_ALEN);
ieee80211_get_DA returns addr1 if to_ds and from_ds are 0
memcpy(pattrib->src, ieee80211_get_SA(hdr), ETH_ALEN);
ieee80211_get_SA returns addr2 if to_ds and from_ds are 0
memcpy(pattrib->ra, hdr->addr1, ETH_ALEN);
memcpy(pattrib->ta, hdr->addr2, ETH_ALEN);
For pattrib->dst == addr1, pattrib->src == addr2, these
assignments match those in sta2sta_data_frame that this
patch removes.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220707194914.63794-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Thu, 7 Jul 2022 19:49:13 +0000 (21:49 +0200)]
staging: r8188eu: remove sta2sta_data_frame prototype
Remove the prototype for sta2sta_data_frame. Make the function static, it
is used only inside rtw_recv.c.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220707194914.63794-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:21:08 +0000 (20:21 +0200)]
staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function
Convert macro vt6655_mac_read_ether_addr to static function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2e2524187d9d3a6140fe4a5a35926db14dddfe98.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:20:57 +0000 (20:20 +0200)]
staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function
Convert macro vt6655_mac_write_bssid_addr to static function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:20:52 +0000 (20:20 +0200)]
staging: vt6655: Move two macros to file where those are used
Move two multiline macros to file of only useage to
convert them later to static functions.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b4a04608b3900186d4941b3bfe9463bb79e261e8.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:20:39 +0000 (20:20 +0200)]
staging: vt6655: Rename MACvReadEtherAddress
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3714f7cd3425e0ef0a3df0cc291131cdb85a3796.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:20:35 +0000 (20:20 +0200)]
staging: vt6655: Rename MACvWriteBSSIDAddress
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1190d93181409679f9ae348a95ea269b48b1115c.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philipp Hortmann [Mon, 4 Jul 2022 18:20:27 +0000 (20:20 +0200)]
staging: vt6655: Rename pbyEtherAddr to mac_addr
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fcc66446a04c1ecb3c2b66cdd47e932c231b1b9d.1656835310.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Kicinski [Tue, 5 Jul 2022 22:58:01 +0000 (15:58 -0700)]
staging: switch to netif_napi_add_weight()
netif_napi_add() will soon default to weight of 64 instead of
requiring the user to specify that parameter. Most users already
pass or should pass 64. Move the callers in staging to
netif_napi_add_weight() which will keep the argument.
This way we'll avoid a huge cross-tree conversion when
argument is removed.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20220705225801.923601-1-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:54 +0000 (22:16 +0200)]
staging: r8188eu: use ieee80211 helper to check for nullfunc frame
Use the ieee80211_is_nullfunc function from ieee80211.h to check for a
nullfunc frame. This is a data frame whose subtype has bit6 set.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:53 +0000 (22:16 +0200)]
staging: r8188eu: remove a misleading comment
Remove a misleading comment in ap2sta_data_frame. We are not checking
for QOS frames.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:52 +0000 (22:16 +0200)]
staging: r8188eu: don't set pattrib->ta again
The table in ieee80211.h shows that TA is addr2. This value was already
set by validate_recv_data_frame, we don't have to set it again in
ap2sta_data_frame.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:51 +0000 (22:16 +0200)]
staging: r8188eu: don't set pattrib->ra again
Do not set pattrib->ra again in ap2sta_data_frame. This function is
called by validate_recv_data_frame when the packet's ToDS==0 and
FromDS==1.
validate_recv_data_frame has already set pattrib->ra to addr1. This is in
line with the table in ieee80211.h.
ap2sta_data_frame sets pattrib->ra to pattrib->dst. For ToDS==0, FromDS==1,
dst is addr1, i.e. ap2sta_data_frame sets the same value again that was
already set by validate_recv_data_frame.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:50 +0000 (22:16 +0200)]
staging: r8188eu: don't set pattrib->dst again
Do not set pattrib->dst again in ap2sta_data_frame. This function is
called by validate_recv_data_frame when the packet's ToDS==0 and
FromDS==1.
In this case, validate_recv_data_frame has already set pattrib->dst
to addr1.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 20:16:49 +0000 (22:16 +0200)]
staging: r8188eu: set bssid only once
In function ap2sta_data_frame, for WIFI_MP_STATE && _FW_LINKED, the code
sets pattrib->bssid twice. Remove the first one of these assignments.
Remove an empty comment before the second assignment.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704201654.195574-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rommel Rodriguez Perez [Mon, 4 Jul 2022 23:55:35 +0000 (18:55 -0500)]
staging: r8188eu: Block comments use * on subsequent lines
This patch modifies a comment in order for it to comply with Linux
Kernel style guidelines on comments belonging to net/ or drivers/net/ by
fixing the missing * at the beginning of each comment line and removing
the initial almost-blank initial line from the comment block.
checkpatch output:
WARNING: Block comments use * on subsequent lines
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Rommel Rodriguez Perez <alrodperez@gmail.com>
Link: https://lore.kernel.org/r/YsN993FTljv5LYT3@debianmain.debian.pc.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 14:52:21 +0000 (16:52 +0200)]
staging: r8188eu: mac addr len is unused
The MAC_ADDR_LEN define is not used. Remove it.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704145221.159949-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 14:52:20 +0000 (16:52 +0200)]
staging: r8188eu: remove sdio definitions
The r8188eu chipset is connected via usb. We don't need the register
and bit field definitions for the sdio interface.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704145221.159949-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 14:52:19 +0000 (16:52 +0200)]
staging: r8188eu: read pwr seq length, remove PWR_CMD_END
The definitions of the power sequences are in the same file as the function
which processes them. We can simply read the number of entries in a power
sequence. There's no need for a PWR_CMD_END command to indicate the end
of a sequence.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704145221.159949-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 14:52:18 +0000 (16:52 +0200)]
staging: r8188eu: support only us in PWR_CMD_DELAY
PWR_CMD_DELAY has only a single remaining user, who needs a delay in us.
Remove the code and defines for delays in ms.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704145221.159949-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Kaiser [Mon, 4 Jul 2022 14:52:17 +0000 (16:52 +0200)]
staging: r8188eu: move pwr seq defines to HalPwrSeqCmd.c
The power sequences are now defined and processed in the same file. We
can move the defines for power sequences and the related struct and
enum from HalPwrSeqCmd.h to HalPwrSeqCmd.c. They don't have to be visible
in other files any more.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220704145221.159949-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Sat, 2 Jul 2022 06:46:26 +0000 (08:46 +0200)]
staging: r8188eu: make ffaddr2pipehdl() static
The function ffaddr2pipehdl() is only used in usb_ops_linux.c.
Make it static.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220702064626.27506-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Michael Straube [Fri, 1 Jul 2022 21:07:53 +0000 (23:07 +0200)]
staging: r8188eu: remove HW_VAR_AMPDU_FACTOR from SetHwReg8188EU()
Remove the case HW_VAR_AMPDU_FACTOR from SetHwReg8188EU() and move
the functionality to a static function in rtw_wlan_util.c. This is
part of the ongoing effort to get rid of SetHwReg8188EU().
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220701210753.8210-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:54 +0000 (11:24 +0200)]
Staging: rtl8192e: Added spaces around '+'
This addresses two issues raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: spaces preferred around that '+' (ctx:VxV)
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/87628a2dd08ec0e5b02090485e7a9a1d91b7d2a5.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:53 +0000 (11:24 +0200)]
Staging: rtl8192e: Remove unnecessary blank line
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Blank lines aren't necessary before a close brace '}'
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/f3c6bd5c79331e82f006fb2694f791030b07c5ba.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:52 +0000 (11:24 +0200)]
Staging: rtl8192e: Added braces around else
This addresses two issues raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement
The coding style rule with not using unnecessary braces around if/else
does not apply if only one branch is a single statement.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/651f51d9f92e8a445ceaf9f2073f16dd10458a74.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:51 +0000 (11:24 +0200)]
Staging: rtl8192e: Remove unnecessary parentheses
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
Unnecessary parentheses around wrqu->encoding
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/0e4e340be3f4c7f35a5381b726b1db5fc6842f10.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:50 +0000 (11:24 +0200)]
Staging: rtl8192e: Avoid multiple assignments
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: multiple assignments should be avoided
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/899a1010643a05668465069951518e5dcab9c77e.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Felix Schlepper [Fri, 1 Jul 2022 09:24:49 +0000 (11:24 +0200)]
Staging: rtl8192e: Refactored rtllib_modes
The initial reason for looking at this code was an
issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Please use a blank line after function/struct/union/enum
declarations
The additional blank line above the struct/before the headers is
just cleaner.
However, as it turns out since there is no str formatting required
One can replace the error prone str + size struct with a char array.
The rest of this patch fixes the usecases.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com>
Link: https://lore.kernel.org/r/4dbc4939e88a2c94f1819b4b0cc2c81dc332710b.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joerg Roedel [Wed, 6 Jul 2022 10:33:31 +0000 (12:33 +0200)]
MAINTAINERS: Remove iommu@lists.linux-foundation.org
The IOMMU mailing list has moved to iommu@lists.linux.dev
and the old list should bounce by now. Remove it from the
MAINTAINERS file.
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20220706103331.10215-1-joro@8bytes.org
Jens Axboe [Thu, 7 Jul 2022 23:38:19 +0000 (17:38 -0600)]
Merge tag 'nvme-5.19-2022-07-07' of git://git.infradead.org/nvme into block-5.19
Pull NVMe fixes from Christoph:
"nvme fixes for Linux 5.19
- another bogus identifier quirk (Keith Busch)
- use struct group in the tracer to avoid a gcc warning (Keith Busch)"
* tag 'nvme-5.19-2022-07-07' of git://git.infradead.org/nvme:
nvme: use struct group for generic command dwords
nvme-pci: phison e16 has bogus namespace ids
Pavel Begunkov [Thu, 7 Jul 2022 14:00:38 +0000 (15:00 +0100)]
io_uring: explicit sqe padding for ioctl commands
32 bit sqe->cmd_op is an union with 64 bit values. It's always a good
idea to do padding explicitly. Also zero check it in prep, so it can be
used in the future if needed without compatibility concerns.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e6b95a05e970af79000435166185e85b196b2ba2.1657202417.git.asml.silence@gmail.com
[axboe: turn bitwise OR into logical variant]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Satish Nagireddy [Tue, 28 Jun 2022 19:12:16 +0000 (12:12 -0700)]
i2c: cadence: Unregister the clk notifier in error path
This patch ensures that the clock notifier is unregistered
when driver probe is returning error.
Fixes:
df8eb5691c48 ("i2c: Add driver for Cadence I2C controller")
Signed-off-by: Satish Nagireddy <satish.nagireddy@getcruise.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Rafael J. Wysocki [Thu, 7 Jul 2022 19:46:05 +0000 (21:46 +0200)]
Merge tag 'devfreq-fixes-for-5.19-rc6' of git://git./linux/kernel/git/chanwoo/linux
Pull a devfreq fix for 5.19-rc6 from Chanwoo Choi:
"- Fix exynos-bus NULL pointer dereference by correctly using the local
generated freq_table to output the debug values instead of using the
profile freq_table that is not used in the driver."
* tag 'devfreq-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
PM / devfreq: exynos-bus: Fix NULL pointer dereference
Christian Marangi [Fri, 1 Jul 2022 13:31:26 +0000 (15:31 +0200)]
PM / devfreq: exynos-bus: Fix NULL pointer dereference
Fix exynos-bus NULL pointer dereference by correctly using the local
generated freq_table to output the debug values instead of using the
profile freq_table that is not used in the driver.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes:
b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Linus Torvalds [Thu, 7 Jul 2022 17:41:27 +0000 (10:41 -0700)]
Merge tag 'loongarch-fixes-5.19-4' of git://git./linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen:
"A fix for tinyconfig build error, a fix for section mismatch warning,
and two cleanups of obsolete code"
* tag 'loongarch-fixes-5.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
LoongArch: Fix section mismatch warning
LoongArch: Fix build errors for tinyconfig
LoongArch: Remove obsolete mentions of vcsr
LoongArch: Drop these obsolete selects in Kconfig