This is the start of the stable review cycle for the 4.19.233 release.
There are 51 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 09 Mar 2022 09:16:25 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.233-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.233-rc1
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dcb: disable softirqs in dcbnl_flush_dev()
Filipe Manana <fdmanana(a)suse.com>
btrfs: add missing run of delayed items after unlink during log replay
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing/histogram: Fix sorting on old "cpu" value
Hugh Dickins <hughd(a)google.com>
memfd: fix F_SEAL_WRITE after shmem huge page allocated
William Mahon <wmahon(a)chromium.org>
HID: add mapping for KEY_ALL_APPLICATIONS
Hans de Goede <hdegoede(a)redhat.com>
Input: elan_i2c - fix regulator enable count imbalance after suspend/resume
Hans de Goede <hdegoede(a)redhat.com>
Input: elan_i2c - move regulator_[en|dis]able() out of elan_[en|dis]able_power()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
nl80211: Handle nla_memdup failures in handle_nan_filter
Jia-Ju Bai <baijiaju1990(a)gmail.com>
net: chelsio: cxgb3: check the return value of pci_find_capability()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
soc: fsl: qe: Check of ioremap return value
Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
ibmvnic: free reset-work-item when flushing
Randy Dunlap <rdunlap(a)infradead.org>
ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions
Brian Norris <briannorris(a)chromium.org>
arm64: dts: rockchip: Switch RK3399-Gru DP to SPDIF output
Vincent Mailhol <mailhol.vincent(a)wanadoo.fr>
can: gs_usb: change active_channels's type from atomic_t to u8
Alyssa Ross <hi(a)alyssa.is>
firmware: arm_scmi: Remove space in MODULE_ALIAS name
Jann Horn <jannh(a)google.com>
efivars: Respect "block" flag in efivar_entry_set_safe()
Zheyu Ma <zheyuma97(a)gmail.com>
net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()
Randy Dunlap <rdunlap(a)infradead.org>
net: sxgbe: fix return value of __setup handler
Randy Dunlap <rdunlap(a)infradead.org>
net: stmmac: fix return value of __setup handler
Nicolas Escande <nico.escande(a)gmail.com>
mac80211: fix forwarded mesh frames AC & queue selection
Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
xen/netfront: destroy queues before real_num_tx_queues is zeroed
Lukas Wunner <lukas(a)wunner.de>
PCI: pciehp: Fix infinite loop in IRQ handler upon power fault
Ye Bin <yebin10(a)huawei.com>
block: Fix fsync always failed if once failed
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: fix unexpected SMC_CLC_DECL_ERR_REGRMB error cause by server
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: fix unexpected SMC_CLC_DECL_ERR_REGRMB error generated by client
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dcb: flush lingering app table entries for unregistered devices
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Don't expect inter-netns unique iflink indices
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Request iflink once in batadv_get_real_netdevice
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Request iflink once in batadv-on-batadv check
Florian Westphal <fw(a)strlen.de>
netfilter: nf_queue: fix possible use-after-free
Florian Westphal <fw(a)strlen.de>
netfilter: nf_queue: don't assume sk is full socket
Leon Romanovsky <leonro(a)nvidia.com>
xfrm: enforce validity of offload input flags
Antony Antony <antony.antony(a)secunet.com>
xfrm: fix the if_id check in changelink
Eric Dumazet <edumazet(a)google.com>
netfilter: fix use-after-free in __nf_register_net_hook()
Jiri Bohac <jbohac(a)suse.cz>
xfrm: fix MTU regression
Marek Vasut <marex(a)denx.de>
ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
Zhen Ni <nizhen(a)uniontech.com>
ALSA: intel_hdmi: Fix reference to PCM buffer address
Sergey Shtylyov <s.shtylyov(a)omp.ru>
ata: pata_hpt37x: fix PCI clock detection
Hangyu Hua <hbh25y(a)gmail.com>
usb: gadget: clear related members when goto fail
Hangyu Hua <hbh25y(a)gmail.com>
usb: gadget: don't release an existing dev->buf
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990
Wolfram Sang <wsa(a)kernel.org>
i2c: qup: allow COMPILE_TEST
Wolfram Sang <wsa(a)kernel.org>
i2c: cadence: allow COMPILE_TEST
Yongzhi Liu <lyz_cs(a)pku.edu.cn>
dmaengine: shdma: Fix runtime PM imbalance on error
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: fix double free race when mount fails in cifs_get_root()
José Expósito <jose.exposito89(a)gmail.com>
Input: clear BTN_RIGHT/MIDDLE on buttonpads
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: rt5682: do not block workqueue if card is unbound
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: rt5668: do not block workqueue if card is unbound
Eric Anholt <eric(a)anholt.net>
i2c: bcm2835: Avoid clock stretching timeouts
JaeMan Park <jaeman(a)google.com>
mac80211_hwsim: initialize ieee80211_tx_info at hw_scan_work
Benjamin Beichler <benjamin.beichler(a)uni-rostock.de>
mac80211_hwsim: report NOACK frames in tx_status
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mm/mmu.c | 2 +
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 17 ++++--
block/blk-flush.c | 4 +-
drivers/ata/pata_hpt37x.c | 4 +-
drivers/dma/sh/shdma-base.c | 4 +-
drivers/firmware/arm_scmi/driver.c | 2 +-
drivers/firmware/efi/vars.c | 5 +-
drivers/hid/hid-debug.c | 4 +-
drivers/hid/hid-input.c | 2 +
drivers/i2c/busses/Kconfig | 4 +-
drivers/i2c/busses/i2c-bcm2835.c | 11 ++++
drivers/input/input.c | 6 +++
drivers/input/mouse/elan_i2c_core.c | 64 ++++++++---------------
drivers/net/arcnet/com20020-pci.c | 3 ++
drivers/net/can/usb/gs_usb.c | 10 ++--
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 2 +
drivers/net/ethernet/ibm/ibmvnic.c | 4 +-
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 6 +--
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +--
drivers/net/usb/cdc_mbim.c | 5 ++
drivers/net/wireless/mac80211_hwsim.c | 13 +++++
drivers/net/xen-netfront.c | 39 ++++++++------
drivers/pci/hotplug/pciehp_hpc.c | 7 +--
drivers/soc/fsl/qe/qe_io.c | 2 +
drivers/usb/gadget/legacy/inode.c | 10 ++--
fs/btrfs/tree-log.c | 18 +++++++
fs/cifs/cifsfs.c | 1 +
include/net/netfilter/nf_queue.h | 2 +-
include/uapi/linux/input-event-codes.h | 3 +-
include/uapi/linux/xfrm.h | 6 +++
kernel/trace/trace_events_hist.c | 6 +--
mm/memfd.c | 30 ++++++++---
net/batman-adv/hard-interface.c | 29 ++++++----
net/dcb/dcbnl.c | 44 ++++++++++++++++
net/ipv6/ip6_output.c | 11 ++--
net/mac80211/rx.c | 4 +-
net/netfilter/core.c | 5 +-
net/netfilter/nf_queue.c | 22 ++++++--
net/netfilter/nfnetlink_queue.c | 12 +++--
net/smc/smc_core.c | 5 +-
net/wireless/nl80211.c | 12 +++++
net/xfrm/xfrm_device.c | 6 ++-
net/xfrm/xfrm_interface.c | 2 +-
sound/soc/codecs/rt5668.c | 12 +++--
sound/soc/codecs/rt5682.c | 12 +++--
sound/soc/soc-ops.c | 4 +-
sound/x86/intel_hdmi_audio.c | 2 +-
48 files changed, 344 insertions(+), 144 deletions(-)
On Tue, Mar 08, 2022 at 04:29:15PM +0100, Luna Jernberg wrote:
> oh i meant to send that too the 5.16.13 emails
>
> On Tue, Mar 8, 2022 at 3:30 PM Luna Jernberg <droidbittin(a)gmail.com> wrote:
>
> > Both rc2, and rc1 works fine from the linux-rc package in AUR on my Arch
> > Linux systems :)
If you respond with a "Tested-by:" line like others do, my scripts will
automatically put it in the commit log for the release commit if you
want.
thanks for testing!
greg k-h
This is the start of the stable review cycle for the 5.4.183 release.
There are 64 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 09 Mar 2022 09:16:25 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.183-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.183-rc1
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dcb: disable softirqs in dcbnl_flush_dev()
Jiri Bohac <jbohac(a)suse.cz>
Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6"
Filipe Manana <fdmanana(a)suse.com>
btrfs: add missing run of delayed items after unlink during log replay
Sidong Yang <realwakka(a)gmail.com>
btrfs: qgroup: fix deadlock between rescan worker and remove qgroup
Filipe Manana <fdmanana(a)suse.com>
btrfs: fix lost prealloc extents beyond eof after full fsync
Randy Dunlap <rdunlap(a)infradead.org>
tracing: Fix return value of __setup handlers
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing/histogram: Fix sorting on old "cpu" value
William Mahon <wmahon(a)chromium.org>
HID: add mapping for KEY_ALL_APPLICATIONS
William Mahon <wmahon(a)chromium.org>
HID: add mapping for KEY_DICTATE
Hans de Goede <hdegoede(a)redhat.com>
Input: elan_i2c - fix regulator enable count imbalance after suspend/resume
Hans de Goede <hdegoede(a)redhat.com>
Input: elan_i2c - move regulator_[en|dis]able() out of elan_[en|dis]able_power()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
nl80211: Handle nla_memdup failures in handle_nan_filter
Jia-Ju Bai <baijiaju1990(a)gmail.com>
net: chelsio: cxgb3: check the return value of pci_find_capability()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
soc: fsl: qe: Check of ioremap return value
Hugh Dickins <hughd(a)google.com>
memfd: fix F_SEAL_WRITE after shmem huge page allocated
Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
ibmvnic: free reset-work-item when flushing
Sasha Neftin <sasha.neftin(a)intel.com>
igc: igc_write_phy_reg_gpy: drop premature return
Randy Dunlap <rdunlap(a)infradead.org>
ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions
Russell King (Oracle) <rmk+kernel(a)armlinux.org.uk>
ARM: Fix kgdb breakpoint for Thumb2
Corinna Vinschen <vinschen(a)redhat.com>
igc: igc_read_phy_reg_gpy: drop premature return
Brian Norris <briannorris(a)chromium.org>
arm64: dts: rockchip: Switch RK3399-Gru DP to SPDIF output
Vincent Mailhol <mailhol.vincent(a)wanadoo.fr>
can: gs_usb: change active_channels's type from atomic_t to u8
Fabio Estevam <festevam(a)denx.de>
ASoC: cs4265: Fix the duplicated control name
Alyssa Ross <hi(a)alyssa.is>
firmware: arm_scmi: Remove space in MODULE_ALIAS name
Jann Horn <jannh(a)google.com>
efivars: Respect "block" flag in efivar_entry_set_safe()
Maciej Fijalkowski <maciej.fijalkowski(a)intel.com>
ixgbe: xsk: change !netif_carrier_ok() handling in ixgbe_xmit_zc()
Zheyu Ma <zheyuma97(a)gmail.com>
net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()
Randy Dunlap <rdunlap(a)infradead.org>
net: sxgbe: fix return value of __setup handler
Slawomir Laba <slawomirx.laba(a)intel.com>
iavf: Fix missing check for running netdev
Randy Dunlap <rdunlap(a)infradead.org>
net: stmmac: fix return value of __setup handler
Nicolas Escande <nico.escande(a)gmail.com>
mac80211: fix forwarded mesh frames AC & queue selection
Valentin Schneider <valentin.schneider(a)arm.com>
ia64: ensure proper NUMA distance and possible map initialization
Dietmar Eggemann <dietmar.eggemann(a)arm.com>
sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa()
Valentin Schneider <valentin.schneider(a)arm.com>
sched/topology: Make sched_init_numa() use a set for the deduplicating sort
Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
xen/netfront: destroy queues before real_num_tx_queues is zeroed
Ye Bin <yebin10(a)huawei.com>
block: Fix fsync always failed if once failed
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: fix unexpected SMC_CLC_DECL_ERR_REGRMB error cause by server
D. Wythe <alibuda(a)linux.alibaba.com>
net/smc: fix unexpected SMC_CLC_DECL_ERR_REGRMB error generated by client
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dcb: flush lingering app table entries for unregistered devices
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Don't expect inter-netns unique iflink indices
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Request iflink once in batadv_get_real_netdevice
Sven Eckelmann <sven(a)narfation.org>
batman-adv: Request iflink once in batadv-on-batadv check
Florian Westphal <fw(a)strlen.de>
netfilter: nf_queue: fix possible use-after-free
Florian Westphal <fw(a)strlen.de>
netfilter: nf_queue: don't assume sk is full socket
Leon Romanovsky <leonro(a)nvidia.com>
xfrm: enforce validity of offload input flags
Antony Antony <antony.antony(a)secunet.com>
xfrm: fix the if_id check in changelink
Eric Dumazet <edumazet(a)google.com>
netfilter: fix use-after-free in __nf_register_net_hook()
Jiri Bohac <jbohac(a)suse.cz>
xfrm: fix MTU regression
Marek Vasut <marex(a)denx.de>
ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
Zhen Ni <nizhen(a)uniontech.com>
ALSA: intel_hdmi: Fix reference to PCM buffer address
Sergey Shtylyov <s.shtylyov(a)omp.ru>
ata: pata_hpt37x: fix PCI clock detection
Hangyu Hua <hbh25y(a)gmail.com>
usb: gadget: clear related members when goto fail
Hangyu Hua <hbh25y(a)gmail.com>
usb: gadget: don't release an existing dev->buf
Daniele Palmas <dnlplm(a)gmail.com>
net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990
Wolfram Sang <wsa(a)kernel.org>
i2c: qup: allow COMPILE_TEST
Wolfram Sang <wsa(a)kernel.org>
i2c: cadence: allow COMPILE_TEST
Yongzhi Liu <lyz_cs(a)pku.edu.cn>
dmaengine: shdma: Fix runtime PM imbalance on error
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: fix double free race when mount fails in cifs_get_root()
José Expósito <jose.exposito89(a)gmail.com>
Input: clear BTN_RIGHT/MIDDLE on buttonpads
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: rt5682: do not block workqueue if card is unbound
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ASoC: rt5668: do not block workqueue if card is unbound
Eric Anholt <eric(a)anholt.net>
i2c: bcm2835: Avoid clock stretching timeouts
JaeMan Park <jaeman(a)google.com>
mac80211_hwsim: initialize ieee80211_tx_info at hw_scan_work
Benjamin Beichler <benjamin.beichler(a)uni-rostock.de>
mac80211_hwsim: report NOACK frames in tx_status
-------------
Diffstat:
Makefile | 4 +-
arch/arm/kernel/kgdb.c | 36 +++++++--
arch/arm/mm/mmu.c | 2 +
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 17 ++--
arch/ia64/kernel/acpi.c | 7 +-
block/blk-flush.c | 4 +-
drivers/ata/pata_hpt37x.c | 4 +-
drivers/dma/sh/shdma-base.c | 4 +-
drivers/firmware/arm_scmi/driver.c | 2 +-
drivers/firmware/efi/vars.c | 5 +-
drivers/hid/hid-debug.c | 5 +-
drivers/hid/hid-input.c | 3 +
drivers/i2c/busses/Kconfig | 4 +-
drivers/i2c/busses/i2c-bcm2835.c | 11 +++
drivers/input/input.c | 6 ++
drivers/input/mouse/elan_i2c_core.c | 64 ++++++---------
drivers/net/arcnet/com20020-pci.c | 3 +
drivers/net/can/usb/gs_usb.c | 10 +--
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 2 +
drivers/net/ethernet/ibm/ibmvnic.c | 4 +-
drivers/net/ethernet/intel/iavf/iavf_main.c | 7 +-
drivers/net/ethernet/intel/igc/igc_phy.c | 4 -
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 6 +-
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 6 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +-
drivers/net/usb/cdc_mbim.c | 5 ++
drivers/net/wireless/mac80211_hwsim.c | 13 +++
drivers/net/xen-netfront.c | 39 +++++----
drivers/soc/fsl/qe/qe_io.c | 2 +
drivers/usb/gadget/legacy/inode.c | 10 ++-
fs/btrfs/qgroup.c | 9 ++-
fs/btrfs/tree-log.c | 61 +++++++++++---
fs/cifs/cifsfs.c | 1 +
include/linux/topology.h | 1 +
include/net/netfilter/nf_queue.h | 2 +-
include/net/xfrm.h | 1 -
include/uapi/linux/input-event-codes.h | 4 +-
include/uapi/linux/xfrm.h | 6 ++
kernel/sched/topology.c | 99 +++++++++++------------
kernel/trace/trace.c | 4 +-
kernel/trace/trace_events_hist.c | 6 +-
kernel/trace/trace_kprobe.c | 2 +-
mm/memfd.c | 40 ++++++---
net/batman-adv/hard-interface.c | 29 ++++---
net/dcb/dcbnl.c | 44 ++++++++++
net/ipv4/esp4.c | 2 +-
net/ipv6/esp6.c | 2 +-
net/ipv6/ip6_output.c | 11 ++-
net/mac80211/rx.c | 4 +-
net/netfilter/core.c | 5 +-
net/netfilter/nf_queue.c | 24 ++++--
net/netfilter/nfnetlink_queue.c | 12 ++-
net/smc/smc_core.c | 5 +-
net/wireless/nl80211.c | 12 +++
net/xfrm/xfrm_device.c | 6 +-
net/xfrm/xfrm_interface.c | 2 +-
net/xfrm/xfrm_state.c | 14 +---
sound/soc/codecs/cs4265.c | 3 +-
sound/soc/codecs/rt5668.c | 12 +--
sound/soc/codecs/rt5682.c | 12 +--
sound/soc/soc-ops.c | 4 +-
sound/x86/intel_hdmi_audio.c | 2 +-
62 files changed, 487 insertions(+), 249 deletions(-)
Even if SPI_NOR_NO_ERASE was set, one could still send erase opcodes
to the flash. It is not recommended to send unsupported opcodes to
flashes. Fix the logic and do not set mtd->_erase when SPI_NOR_NO_ERASE
is specified. With this users will not be able to issue erase opcodes to
flashes and instead they will recive an -ENOTSUPP error.
Cc: stable(a)vger.kernel.org
Fixes: b199489d37b2 ("mtd: spi-nor: add the framework for SPI NOR")
Signed-off-by: Tudor Ambarus <tudor.ambarus(a)microchip.com>
---
drivers/mtd/spi-nor/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 86a536c97c18..cd2d094ef837 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2969,10 +2969,11 @@ static void spi_nor_set_mtd_info(struct spi_nor *nor)
mtd->flags = MTD_CAP_NORFLASH;
if (nor->info->flags & SPI_NOR_NO_ERASE)
mtd->flags |= MTD_NO_ERASE;
+ else
+ mtd->_erase = spi_nor_erase;
mtd->writesize = nor->params->writesize;
mtd->writebufsize = nor->params->page_size;
mtd->size = nor->params->size;
- mtd->_erase = spi_nor_erase;
mtd->_read = spi_nor_read;
/* Might be already set by some SST flashes. */
if (!mtd->_write)
--
2.25.1
We tested RS485 function on an EVB which has SC16IS752, after
finishing the test, we started the RS232 function test, but found the
RTS is still working in the RS485 mode.
That is because both startup and shutdown call port_update() to set
the EFCR_REG, this will not clear the RS485 bits once the bits are set
in the reconf_rs485(). To fix it, clear the RS485 bits in shutdown.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
---
drivers/tty/serial/sc16is7xx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 3a6c68e19c80..6adc51d9ecf3 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1055,10 +1055,12 @@ static void sc16is7xx_shutdown(struct uart_port *port)
/* Disable all interrupts */
sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
- /* Disable TX/RX */
+ /* Disable TX/RX, clear auto RS485 and RTS invert */
sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
SC16IS7XX_EFCR_RXDISABLE_BIT |
- SC16IS7XX_EFCR_TXDISABLE_BIT,
+ SC16IS7XX_EFCR_TXDISABLE_BIT |
+ SC16IS7XX_EFCR_AUTO_RS485_BIT |
+ SC16IS7XX_EFCR_RTS_INVERT_BIT,
SC16IS7XX_EFCR_RXDISABLE_BIT |
SC16IS7XX_EFCR_TXDISABLE_BIT);
--
2.25.1
From: Alexander Usyskin <alexander.usyskin(a)intel.com>
Usage of the iterator outside of the list_for_each_entry
is considered harmful. https://lkml.org/lkml/2022/2/17/1032
Do not reference the loop variable outside of the loop,
by rearranging the orders of execution.
Instead of performing search loop and checking outside the loop
if the end of the list was hit and no matching element was found,
the execution is performed inside the loop upon a successful match
followed by a goto statement to the next step,
therefore no condition has to be performed after the loop has ended.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
---
drivers/misc/mei/interrupt.c | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index a67f4f2d33a9..0706322154cb 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -424,31 +424,26 @@ int mei_irq_read_handler(struct mei_device *dev,
list_for_each_entry(cl, &dev->file_list, link) {
if (mei_cl_hbm_equal(cl, mei_hdr)) {
cl_dbg(dev, cl, "got a message\n");
- break;
+ ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
+ goto reset_slots;
}
}
/* if no recipient cl was found we assume corrupted header */
- if (&cl->link == &dev->file_list) {
- /* A message for not connected fixed address clients
- * should be silently discarded
- * On power down client may be force cleaned,
- * silently discard such messages
- */
- if (hdr_is_fixed(mei_hdr) ||
- dev->dev_state == MEI_DEV_POWER_DOWN) {
- mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
- ret = 0;
- goto reset_slots;
- }
- dev_err(dev->dev, "no destination client found 0x%08X\n",
- dev->rd_msg_hdr[0]);
- ret = -EBADMSG;
- goto end;
+ /* A message for not connected fixed address clients
+ * should be silently discarded
+ * On power down client may be force cleaned,
+ * silently discard such messages
+ */
+ if (hdr_is_fixed(mei_hdr) ||
+ dev->dev_state == MEI_DEV_POWER_DOWN) {
+ mei_irq_discard_msg(dev, mei_hdr, mei_hdr->length);
+ ret = 0;
+ goto reset_slots;
}
-
- ret = mei_cl_irq_read_msg(cl, mei_hdr, meta_hdr, cmpl_list);
-
+ dev_err(dev->dev, "no destination client found 0x%08X\n", dev->rd_msg_hdr[0]);
+ ret = -EBADMSG;
+ goto end;
reset_slots:
/* reset the number of slots and header */
--
2.35.1