commit:     f9b71e81f1e521cd7b9c44697540ef76275bfbcb
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 12:07:30 2020 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 12:07:30 2020 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f9b71e81

Linux patch 4.19.147

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README               |    4 +
 1146_linux-4.19.147.patch | 1758 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 1762 insertions(+)

diff --git a/0000_README b/0000_README
index 5d9a94a..4996714 100644
--- a/0000_README
+++ b/0000_README
@@ -623,6 +623,10 @@ Patch:  1145_linux-4.19.146.patch
 From:   https://www.kernel.org
 Desc:   Linux 4.19.146
 
+Patch:  1146_linux-4.19.147.patch
+From:   https://www.kernel.org
+Desc:   Linux 4.19.147
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1146_linux-4.19.147.patch b/1146_linux-4.19.147.patch
new file mode 100644
index 0000000..11c1e98
--- /dev/null
+++ b/1146_linux-4.19.147.patch
@@ -0,0 +1,1758 @@
+diff --git a/Makefile b/Makefile
+index aaeb3f3dbcea8..ee648a902ce31 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 19
+-SUBLEVEL = 146
++SUBLEVEL = 147
+ EXTRAVERSION =
+ NAME = "People's Front"
+ 
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index a830a9701e501..cc8c8d22afaf5 100644
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -852,6 +852,7 @@ config SNI_RM
+       select I8253
+       select I8259
+       select ISA
++      select MIPS_L1_CACHE_SHIFT_6
+       select SWAP_IO_SPACE if CPU_BIG_ENDIAN
+       select SYS_HAS_CPU_R4X00
+       select SYS_HAS_CPU_R5000
+diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
+index e7f5ef6bed0fe..79485790f7b56 100644
+--- a/arch/mips/kvm/mips.c
++++ b/arch/mips/kvm/mips.c
+@@ -131,6 +131,8 @@ void kvm_arch_check_processor_compat(void *rtn)
+ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
+ {
+       switch (type) {
++      case KVM_VM_MIPS_AUTO:
++              break;
+ #ifdef CONFIG_KVM_MIPS_VZ
+       case KVM_VM_MIPS_VZ:
+ #else
+diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c
+index f9407e1704762..c6af7047eb0d2 100644
+--- a/arch/mips/sni/a20r.c
++++ b/arch/mips/sni/a20r.c
+@@ -143,7 +143,10 @@ static struct platform_device sc26xx_pdev = {
+       },
+ };
+ 
+-static u32 a20r_ack_hwint(void)
++/*
++ * Trigger chipset to update CPU's CAUSE IP field
++ */
++static u32 a20r_update_cause_ip(void)
+ {
+       u32 status = read_c0_status();
+ 
+@@ -205,12 +208,14 @@ static void a20r_hwint(void)
+       int irq;
+ 
+       clear_c0_status(IE_IRQ0);
+-      status = a20r_ack_hwint();
++      status = a20r_update_cause_ip();
+       cause = read_c0_cause();
+ 
+       irq = ffs(((cause & status) >> 8) & 0xf8);
+       if (likely(irq > 0))
+               do_IRQ(SNI_A20R_IRQ_BASE + irq - 1);
++
++      a20r_update_cause_ip();
+       set_c0_status(IE_IRQ0);
+ }
+ 
+diff --git a/arch/openrisc/mm/cache.c b/arch/openrisc/mm/cache.c
+index b747bf1fc1b63..4272d9123f9ed 100644
+--- a/arch/openrisc/mm/cache.c
++++ b/arch/openrisc/mm/cache.c
+@@ -20,7 +20,7 @@
+ #include <asm/cacheflush.h>
+ #include <asm/tlbflush.h>
+ 
+-static void cache_loop(struct page *page, const unsigned int reg)
++static __always_inline void cache_loop(struct page *page, const unsigned int 
reg)
+ {
+       unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT;
+       unsigned long line = paddr & ~(L1_CACHE_BYTES - 1);
+diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
+index f9fe2080ceb90..eed3543aeca46 100644
+--- a/arch/powerpc/kernel/dma-iommu.c
++++ b/arch/powerpc/kernel/dma-iommu.c
+@@ -100,7 +100,8 @@ static u64 dma_iommu_get_required_mask(struct device *dev)
+       if (!tbl)
+               return 0;
+ 
+-      mask = 1ULL < (fls_long(tbl->it_offset + tbl->it_size) - 1);
++      mask = 1ULL << (fls_long(tbl->it_offset + tbl->it_size) +
++                      tbl->it_page_shift - 1);
+       mask += mask - 1;
+ 
+       return mask;
+diff --git a/arch/x86/boot/compressed/Makefile 
b/arch/x86/boot/compressed/Makefile
+index 466f66c8a7f8d..b337a0cd58ba4 100644
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
+@@ -38,6 +38,8 @@ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
+ KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
+ KBUILD_CFLAGS += -Wno-pointer-sign
++# Disable relocation relaxation in case the link is not PIE.
++KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
+ 
+ KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
+ GCOV_PROFILE := n
+diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
+index 5a23a4ccd7556..9218cb1286611 100644
+--- a/arch/x86/configs/i386_defconfig
++++ b/arch/x86/configs/i386_defconfig
+@@ -245,6 +245,7 @@ CONFIG_USB_HIDDEV=y
+ CONFIG_USB=y
+ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+ CONFIG_USB_MON=y
++CONFIG_USB_XHCI_HCD=y
+ CONFIG_USB_EHCI_HCD=y
+ CONFIG_USB_EHCI_TT_NEWSCHED=y
+ CONFIG_USB_OHCI_HCD=y
+diff --git a/arch/x86/configs/x86_64_defconfig 
b/arch/x86/configs/x86_64_defconfig
+index dc08812929046..146a12293396d 100644
+--- a/arch/x86/configs/x86_64_defconfig
++++ b/arch/x86/configs/x86_64_defconfig
+@@ -241,6 +241,7 @@ CONFIG_USB_HIDDEV=y
+ CONFIG_USB=y
+ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+ CONFIG_USB_MON=y
++CONFIG_USB_XHCI_HCD=y
+ CONFIG_USB_EHCI_HCD=y
+ CONFIG_USB_EHCI_TT_NEWSCHED=y
+ CONFIG_USB_OHCI_HCD=y
+diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c
+index 1c99e992d6388..796b428998ae0 100644
+--- a/drivers/clk/davinci/pll.c
++++ b/drivers/clk/davinci/pll.c
+@@ -491,7 +491,7 @@ struct clk *davinci_pll_clk_register(struct device *dev,
+               parent_name = postdiv_name;
+       }
+ 
+-      pllen = kzalloc(sizeof(*pllout), GFP_KERNEL);
++      pllen = kzalloc(sizeof(*pllen), GFP_KERNEL);
+       if (!pllen) {
+               ret = -ENOMEM;
+               goto err_unregister_postdiv;
+diff --git a/drivers/clk/rockchip/clk-rk3228.c 
b/drivers/clk/rockchip/clk-rk3228.c
+index 04f4f3739e3be..8d11d76e1db7c 100644
+--- a/drivers/clk/rockchip/clk-rk3228.c
++++ b/drivers/clk/rockchip/clk-rk3228.c
+@@ -144,7 +144,7 @@ PNAME(mux_usb480m_p)               = { "usb480m_phy", 
"xin24m" };
+ PNAME(mux_hdmiphy_p)          = { "hdmiphy_phy", "xin24m" };
+ PNAME(mux_aclk_cpu_src_p)     = { "cpll_aclk_cpu", "gpll_aclk_cpu", 
"hdmiphy_aclk_cpu" };
+ 
+-PNAME(mux_pll_src_4plls_p)    = { "cpll", "gpll", "hdmiphy" "usb480m" };
++PNAME(mux_pll_src_4plls_p)    = { "cpll", "gpll", "hdmiphy", "usb480m" };
+ PNAME(mux_pll_src_3plls_p)    = { "cpll", "gpll", "hdmiphy" };
+ PNAME(mux_pll_src_2plls_p)    = { "cpll", "gpll" };
+ PNAME(mux_sclk_hdmi_cec_p)    = { "cpll", "gpll", "xin24m" };
+diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c 
b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+index 947bc6d623020..d143217636071 100644
+--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
++++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+@@ -600,8 +600,13 @@ err_pm:
+       pm_runtime_disable(dev);
+ err_node:
+       of_node_put(private->mutex_node);
+-      for (i = 0; i < DDP_COMPONENT_ID_MAX; i++)
++      for (i = 0; i < DDP_COMPONENT_ID_MAX; i++) {
+               of_node_put(private->comp_node[i]);
++              if (private->ddp_comp[i]) {
++                      put_device(private->ddp_comp[i]->larb_dev);
++                      private->ddp_comp[i] = NULL;
++              }
++      }
+       return ret;
+ }
+ 
+diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c 
b/drivers/gpu/drm/mediatek/mtk_hdmi.c
+index 62444a3a5742a..331fb0c129290 100644
+--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
++++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
+@@ -1476,25 +1476,30 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi 
*hdmi,
+               dev_err(dev,
+                       "Failed to get system configuration registers: %d\n",
+                       ret);
+-              return ret;
++              goto put_device;
+       }
+       hdmi->sys_regmap = regmap;
+ 
+       mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       hdmi->regs = devm_ioremap_resource(dev, mem);
+-      if (IS_ERR(hdmi->regs))
+-              return PTR_ERR(hdmi->regs);
++      if (IS_ERR(hdmi->regs)) {
++              ret = PTR_ERR(hdmi->regs);
++              goto put_device;
++      }
+ 
+       remote = of_graph_get_remote_node(np, 1, 0);
+-      if (!remote)
+-              return -EINVAL;
++      if (!remote) {
++              ret = -EINVAL;
++              goto put_device;
++      }
+ 
+       if (!of_device_is_compatible(remote, "hdmi-connector")) {
+               hdmi->next_bridge = of_drm_find_bridge(remote);
+               if (!hdmi->next_bridge) {
+                       dev_err(dev, "Waiting for external bridge\n");
+                       of_node_put(remote);
+-                      return -EPROBE_DEFER;
++                      ret = -EPROBE_DEFER;
++                      goto put_device;
+               }
+       }
+ 
+@@ -1503,7 +1508,8 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
+               dev_err(dev, "Failed to find ddc-i2c-bus node in %pOF\n",
+                       remote);
+               of_node_put(remote);
+-              return -EINVAL;
++              ret = -EINVAL;
++              goto put_device;
+       }
+       of_node_put(remote);
+ 
+@@ -1511,10 +1517,14 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi 
*hdmi,
+       of_node_put(i2c_np);
+       if (!hdmi->ddc_adpt) {
+               dev_err(dev, "Failed to get ddc i2c adapter by node\n");
+-              return -EINVAL;
++              ret = -EINVAL;
++              goto put_device;
+       }
+ 
+       return 0;
++put_device:
++      put_device(hdmi->cec_dev);
++      return ret;
+ }
+ 
+ /*
+diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
+index c83361a8e2033..7920b0d7e35a7 100644
+--- a/drivers/hv/channel_mgmt.c
++++ b/drivers/hv/channel_mgmt.c
+@@ -779,7 +779,7 @@ static void vmbus_wait_for_unload(void)
+       void *page_addr;
+       struct hv_message *msg;
+       struct vmbus_channel_message_header *hdr;
+-      u32 message_type;
++      u32 message_type, i;
+ 
+       /*
+        * CHANNELMSG_UNLOAD_RESPONSE is always delivered to the CPU which was
+@@ -789,8 +789,11 @@ static void vmbus_wait_for_unload(void)
+        * functional and vmbus_unload_response() will complete
+        * vmbus_connection.unload_event. If not, the last thing we can do is
+        * read message pages for all CPUs directly.
++       *
++       * Wait no more than 10 seconds so that the panic path can't get
++       * hung forever in case the response message isn't seen.
+        */
+-      while (1) {
++      for (i = 0; i < 1000; i++) {
+               if (completion_done(&vmbus_connection.unload_event))
+                       break;
+ 
+diff --git a/drivers/i2c/algos/i2c-algo-pca.c 
b/drivers/i2c/algos/i2c-algo-pca.c
+index 0e745f82d6a53..f328de980855d 100644
+--- a/drivers/i2c/algos/i2c-algo-pca.c
++++ b/drivers/i2c/algos/i2c-algo-pca.c
+@@ -50,8 +50,22 @@ static void pca_reset(struct i2c_algo_pca_data *adap)
+               pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IPRESET);
+               pca_outw(adap, I2C_PCA_IND, 0xA5);
+               pca_outw(adap, I2C_PCA_IND, 0x5A);
++
++              /*
++               * After a reset we need to re-apply any configuration
++               * (calculated in pca_init) to get the bus in a working state.
++               */
++              pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IMODE);
++              pca_outw(adap, I2C_PCA_IND, adap->bus_settings.mode);
++              pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLL);
++              pca_outw(adap, I2C_PCA_IND, adap->bus_settings.tlow);
++              pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLH);
++              pca_outw(adap, I2C_PCA_IND, adap->bus_settings.thi);
++
++              pca_set_con(adap, I2C_PCA_CON_ENSIO);
+       } else {
+               adap->reset_chip(adap->data);
++              pca_set_con(adap, I2C_PCA_CON_ENSIO | 
adap->bus_settings.clock_freq);
+       }
+ }
+ 
+@@ -432,13 +446,14 @@ static int pca_init(struct i2c_adapter *adap)
+                               " Use the nominal frequency.\n", adap->name);
+               }
+ 
+-              pca_reset(pca_data);
+-
+               clock = pca_clock(pca_data);
+               printk(KERN_INFO "%s: Clock frequency is %dkHz\n",
+                    adap->name, freqs[clock]);
+ 
+-              pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock);
++              /* Store settings as these will be needed when the PCA chip is 
reset */
++              pca_data->bus_settings.clock_freq = clock;
++
++              pca_reset(pca_data);
+       } else {
+               int clock;
+               int mode;
+@@ -505,19 +520,15 @@ static int pca_init(struct i2c_adapter *adap)
+                       thi = tlow * min_thi / min_tlow;
+               }
+ 
++              /* Store settings as these will be needed when the PCA chip is 
reset */
++              pca_data->bus_settings.mode = mode;
++              pca_data->bus_settings.tlow = tlow;
++              pca_data->bus_settings.thi = thi;
++
+               pca_reset(pca_data);
+ 
+               printk(KERN_INFO
+                    "%s: Clock frequency is %dHz\n", adap->name, clock * 100);
+-
+-              pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_IMODE);
+-              pca_outw(pca_data, I2C_PCA_IND, mode);
+-              pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLL);
+-              pca_outw(pca_data, I2C_PCA_IND, tlow);
+-              pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLH);
+-              pca_outw(pca_data, I2C_PCA_IND, thi);
+-
+-              pca_set_con(pca_data, I2C_PCA_CON_ENSIO);
+       }
+       udelay(500); /* 500 us for oscillator to stabilise */
+ 
+diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
+index 679c6c41f64b4..58fc17e46694d 100644
+--- a/drivers/i2c/busses/i2c-i801.c
++++ b/drivers/i2c/busses/i2c-i801.c
+@@ -1506,6 +1506,16 @@ static inline int i801_acpi_probe(struct i801_priv 
*priv) { return 0; }
+ static inline void i801_acpi_remove(struct i801_priv *priv) { }
+ #endif
+ 
++static unsigned char i801_setup_hstcfg(struct i801_priv *priv)
++{
++      unsigned char hstcfg = priv->original_hstcfg;
++
++      hstcfg &= ~SMBHSTCFG_I2C_EN;    /* SMBus timing */
++      hstcfg |= SMBHSTCFG_HST_EN;
++      pci_write_config_byte(priv->pci_dev, SMBHSTCFG, hstcfg);
++      return hstcfg;
++}
++
+ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
+ {
+       unsigned char temp;
+@@ -1611,14 +1621,10 @@ static int i801_probe(struct pci_dev *dev, const 
struct pci_device_id *id)
+               return err;
+       }
+ 
+-      pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &temp);
+-      priv->original_hstcfg = temp;
+-      temp &= ~SMBHSTCFG_I2C_EN;      /* SMBus timing */
+-      if (!(temp & SMBHSTCFG_HST_EN)) {
++      pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &priv->original_hstcfg);
++      temp = i801_setup_hstcfg(priv);
++      if (!(priv->original_hstcfg & SMBHSTCFG_HST_EN))
+               dev_info(&dev->dev, "Enabling SMBus device\n");
+-              temp |= SMBHSTCFG_HST_EN;
+-      }
+-      pci_write_config_byte(priv->pci_dev, SMBHSTCFG, temp);
+ 
+       if (temp & SMBHSTCFG_SMB_SMI_EN) {
+               dev_dbg(&dev->dev, "SMBus using interrupt SMI#\n");
+@@ -1745,6 +1751,7 @@ static int i801_resume(struct device *dev)
+       struct pci_dev *pci_dev = to_pci_dev(dev);
+       struct i801_priv *priv = pci_get_drvdata(pci_dev);
+ 
++      i801_setup_hstcfg(priv);
+       i801_enable_host_notify(&priv->adapter);
+ 
+       return 0;
+diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c 
b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+index 09e7d3dd30553..336144876363a 100644
+--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
++++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+@@ -141,7 +141,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
+       attr->max_inline_data = le32_to_cpu(sb->max_inline_data);
+       attr->l2_db_size = (sb->l2_db_space_size + 1) *
+                           (0x01 << RCFW_DBR_BASE_PAGE_SHIFT);
+-      attr->max_sgid = le32_to_cpu(sb->max_gid);
++      attr->max_sgid = BNXT_QPLIB_NUM_GIDS_SUPPORTED;
+ 
+       bnxt_qplib_query_version(rcfw, attr->fw_ver);
+ 
+diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.h 
b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
+index 9d3e8b9949458..b6e9e0ef79391 100644
+--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.h
++++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
+@@ -47,6 +47,7 @@
+ struct bnxt_qplib_dev_attr {
+ #define FW_VER_ARR_LEN                        4
+       u8                              fw_ver[FW_VER_ARR_LEN];
++#define BNXT_QPLIB_NUM_GIDS_SUPPORTED 256
+       u16                             max_sgid;
+       u16                             max_mrw;
+       u32                             max_qp;
+diff --git a/drivers/input/mouse/trackpoint.c 
b/drivers/input/mouse/trackpoint.c
+index 6590d10f166fe..31c16b68aa311 100644
+--- a/drivers/input/mouse/trackpoint.c
++++ b/drivers/input/mouse/trackpoint.c
+@@ -20,10 +20,12 @@
+ #include "trackpoint.h"
+ 
+ static const char * const trackpoint_variants[] = {
+-      [TP_VARIANT_IBM]        = "IBM",
+-      [TP_VARIANT_ALPS]       = "ALPS",
+-      [TP_VARIANT_ELAN]       = "Elan",
+-      [TP_VARIANT_NXP]        = "NXP",
++      [TP_VARIANT_IBM]                = "IBM",
++      [TP_VARIANT_ALPS]               = "ALPS",
++      [TP_VARIANT_ELAN]               = "Elan",
++      [TP_VARIANT_NXP]                = "NXP",
++      [TP_VARIANT_JYT_SYNAPTICS]      = "JYT_Synaptics",
++      [TP_VARIANT_SYNAPTICS]          = "Synaptics",
+ };
+ 
+ /*
+diff --git a/drivers/input/mouse/trackpoint.h 
b/drivers/input/mouse/trackpoint.h
+index 538986e5ac5bc..4ebcdf802e9a2 100644
+--- a/drivers/input/mouse/trackpoint.h
++++ b/drivers/input/mouse/trackpoint.h
+@@ -27,10 +27,12 @@
+  * 0x01 was the original IBM trackpoint, others implement very limited
+  * subset of trackpoint features.
+  */
+-#define TP_VARIANT_IBM                0x01
+-#define TP_VARIANT_ALPS               0x02
+-#define TP_VARIANT_ELAN               0x03
+-#define TP_VARIANT_NXP                0x04
++#define TP_VARIANT_IBM                        0x01
++#define TP_VARIANT_ALPS                       0x02
++#define TP_VARIANT_ELAN                       0x03
++#define TP_VARIANT_NXP                        0x04
++#define TP_VARIANT_JYT_SYNAPTICS      0x05
++#define TP_VARIANT_SYNAPTICS          0x06
+ 
+ /*
+  * Commands
+diff --git a/drivers/input/serio/i8042-x86ia64io.h 
b/drivers/input/serio/i8042-x86ia64io.h
+index 8134c7f928165..7c05e09abacf9 100644
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -552,6 +552,14 @@ static const struct dmi_system_id __initconst 
i8042_dmi_nomux_table[] = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
+               },
+       },
++      {
++              /* Entroware Proteus */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Entroware"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"),
++              },
++      },
+       { }
+ };
+ 
+@@ -680,6 +688,14 @@ static const struct dmi_system_id __initconst 
i8042_dmi_reset_table[] = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"),
+               },
+       },
++      {
++              /* Entroware Proteus */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Entroware"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"),
++              },
++      },
+       { }
+ };
+ 
+diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
+index 4a5d99ecb89d3..2dff0e110c6f3 100644
+--- a/drivers/net/hyperv/netvsc_drv.c
++++ b/drivers/net/hyperv/netvsc_drv.c
+@@ -378,7 +378,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, 
struct sk_buff *skb,
+       }
+       rcu_read_unlock();
+ 
+-      while (unlikely(txq >= ndev->real_num_tx_queues))
++      while (txq >= ndev->real_num_tx_queues)
+               txq -= ndev->real_num_tx_queues;
+ 
+       return txq;
+diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
+index bb3b447c56468..73db32f97abf3 100644
+--- a/drivers/nvme/host/fc.c
++++ b/drivers/nvme/host/fc.c
+@@ -1791,6 +1791,7 @@ nvme_fc_term_aen_ops(struct nvme_fc_ctrl *ctrl)
+       struct nvme_fc_fcp_op *aen_op;
+       int i;
+ 
++      cancel_work_sync(&ctrl->ctrl.async_event_work);
+       aen_op = ctrl->aen_ops;
+       for (i = 0; i < NVME_NR_AEN_COMMANDS; i++, aen_op++) {
+               if (!aen_op->fcp_req.private)
+diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
+index 7e2cdb17c26d8..077c678166651 100644
+--- a/drivers/nvme/host/rdma.c
++++ b/drivers/nvme/host/rdma.c
+@@ -740,6 +740,7 @@ static void nvme_rdma_destroy_admin_queue(struct 
nvme_rdma_ctrl *ctrl,
+               nvme_rdma_free_tagset(&ctrl->ctrl, ctrl->ctrl.admin_tagset);
+       }
+       if (ctrl->async_event_sqe.data) {
++              cancel_work_sync(&ctrl->ctrl.async_event_work);
+               nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe,
+                               sizeof(struct nvme_command), DMA_TO_DEVICE);
+               ctrl->async_event_sqe.data = NULL;
+diff --git a/drivers/rapidio/Kconfig b/drivers/rapidio/Kconfig
+index d6d2f20c45977..21df2816def76 100644
+--- a/drivers/rapidio/Kconfig
++++ b/drivers/rapidio/Kconfig
+@@ -25,7 +25,7 @@ config RAPIDIO_ENABLE_RX_TX_PORTS
+ config RAPIDIO_DMA_ENGINE
+       bool "DMA Engine support for RapidIO"
+       depends on RAPIDIO
+-      select DMADEVICES
++      depends on DMADEVICES
+       select DMA_ENGINE
+       help
+         Say Y here if you want to use DMA Engine frameork for RapidIO data
+diff --git a/drivers/regulator/pwm-regulator.c 
b/drivers/regulator/pwm-regulator.c
+index a2fd140eff81a..34f3b9778ffa1 100644
+--- a/drivers/regulator/pwm-regulator.c
++++ b/drivers/regulator/pwm-regulator.c
+@@ -285,7 +285,7 @@ static int pwm_regulator_init_table(struct platform_device 
*pdev,
+               return ret;
+       }
+ 
+-      drvdata->state                  = -EINVAL;
++      drvdata->state                  = -ENOTRECOVERABLE;
+       drvdata->duty_cycle_table       = duty_cycle_table;
+       memcpy(&drvdata->ops, &pwm_regulator_voltage_table_ops,
+              sizeof(drvdata->ops));
+diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
+index 78cf5b32bca67..0b3f4538c1d4d 100644
+--- a/drivers/scsi/libfc/fc_disc.c
++++ b/drivers/scsi/libfc/fc_disc.c
+@@ -646,8 +646,6 @@ free_fp:
+       fc_frame_free(fp);
+ out:
+       kref_put(&rdata->kref, fc_rport_destroy);
+-      if (!IS_ERR(fp))
+-              fc_frame_free(fp);
+ }
+ 
+ /**
+diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
+index 9032793c405eb..6a4b496081e4a 100644
+--- a/drivers/scsi/lpfc/lpfc_els.c
++++ b/drivers/scsi/lpfc/lpfc_els.c
+@@ -4112,7 +4112,9 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct 
lpfc_iocbq *cmdiocb,
+ out:
+       if (ndlp && NLP_CHK_NODE_ACT(ndlp) && shost) {
+               spin_lock_irq(shost->host_lock);
+-              ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN | NLP_RM_DFLT_RPI);
++              if (mbox)
++                      ndlp->nlp_flag &= ~NLP_ACC_REGLOGIN;
++              ndlp->nlp_flag &= ~NLP_RM_DFLT_RPI;
+               spin_unlock_irq(shost->host_lock);
+ 
+               /* If the node is not being used by another discovery thread,
+diff --git a/drivers/scsi/pm8001/pm8001_sas.c 
b/drivers/scsi/pm8001/pm8001_sas.c
+index 5be4212312cb0..ba79b37d8cf7e 100644
+--- a/drivers/scsi/pm8001/pm8001_sas.c
++++ b/drivers/scsi/pm8001/pm8001_sas.c
+@@ -794,7 +794,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info 
*pm8001_ha,
+ 
+               res = pm8001_tag_alloc(pm8001_ha, &ccb_tag);
+               if (res)
+-                      return res;
++                      goto ex_err;
+               ccb = &pm8001_ha->ccb_info[ccb_tag];
+               ccb->device = pm8001_dev;
+               ccb->ccb_tag = ccb_tag;
+diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
+index a9dc9c4a63826..47835d26a9730 100644
+--- a/drivers/scsi/qla2xxx/qla_def.h
++++ b/drivers/scsi/qla2xxx/qla_def.h
+@@ -262,8 +262,8 @@ struct name_list_extended {
+       struct get_name_list_extended *l;
+       dma_addr_t              ldma;
+       struct list_head        fcports;
+-      spinlock_t              fcports_lock;
+       u32                     size;
++      u8                      sent;
+ };
+ /*
+  * Timeout timer counts in seconds
+@@ -2351,7 +2351,7 @@ typedef struct fc_port {
+       unsigned int login_succ:1;
+       unsigned int query:1;
+       unsigned int id_changed:1;
+-      unsigned int rscn_rcvd:1;
++      unsigned int scan_needed:1;
+ 
+       struct work_struct nvme_del_work;
+       struct completion nvme_del_done;
+@@ -2375,11 +2375,13 @@ typedef struct fc_port {
+       unsigned long expires;
+       struct list_head del_list_entry;
+       struct work_struct free_work;
+-
++      struct work_struct reg_work;
++      uint64_t jiffies_at_registration;
+       struct qlt_plogi_ack_t *plogi_link[QLT_PLOGI_LINK_MAX];
+ 
+       uint16_t tgt_id;
+       uint16_t old_tgt_id;
++      uint16_t sec_since_registration;
+ 
+       uint8_t fcp_prio;
+ 
+@@ -2412,6 +2414,7 @@ typedef struct fc_port {
+       struct qla_tgt_sess *tgt_session;
+       struct ct_sns_desc ct_desc;
+       enum discovery_state disc_state;
++      enum discovery_state next_disc_state;
+       enum login_state fw_login_state;
+       unsigned long dm_login_expire;
+       unsigned long plogi_nack_done_deadline;
+@@ -3222,7 +3225,6 @@ enum qla_work_type {
+       QLA_EVT_GPDB,
+       QLA_EVT_PRLI,
+       QLA_EVT_GPSC,
+-      QLA_EVT_UPD_FCPORT,
+       QLA_EVT_GNL,
+       QLA_EVT_NACK,
+       QLA_EVT_RELOGIN,
+diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
+index 178974896b5c7..b8e4abe804d5d 100644
+--- a/drivers/scsi/qla2xxx/qla_gbl.h
++++ b/drivers/scsi/qla2xxx/qla_gbl.h
+@@ -54,7 +54,7 @@ extern void qla2x00_abort_isp_cleanup(scsi_qla_host_t *);
+ extern void qla2x00_quiesce_io(scsi_qla_host_t *);
+ 
+ extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
+-
++void qla_register_fcport_fn(struct work_struct *);
+ extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *);
+ extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *);
+ 
+@@ -109,6 +109,7 @@ int qla24xx_post_newsess_work(struct scsi_qla_host *, 
port_id_t *, u8 *, u8*,
+ int qla24xx_fcport_handle_login(struct scsi_qla_host *, fc_port_t *);
+ int qla24xx_detect_sfp(scsi_qla_host_t *vha);
+ int qla24xx_post_gpdb_work(struct scsi_qla_host *, fc_port_t *, u8);
++
+ void qla2x00_async_prlo_done(struct scsi_qla_host *, fc_port_t *,
+     uint16_t *);
+ extern int qla2x00_post_async_prlo_work(struct scsi_qla_host *, fc_port_t *,
+@@ -208,7 +209,7 @@ extern void qla2x00_disable_board_on_pci_error(struct 
work_struct *);
+ extern void qla2x00_sp_compl(void *, int);
+ extern void qla2xxx_qpair_sp_free_dma(void *);
+ extern void qla2xxx_qpair_sp_compl(void *, int);
+-extern int qla24xx_post_upd_fcport_work(struct scsi_qla_host *, fc_port_t *);
++extern void qla24xx_sched_upd_fcport(fc_port_t *);
+ void qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *,
+       uint16_t *);
+ int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *);
+diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
+index f621cb55ccfb2..c3195d4c25e5c 100644
+--- a/drivers/scsi/qla2xxx/qla_gs.c
++++ b/drivers/scsi/qla2xxx/qla_gs.c
+@@ -3973,7 +3973,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, 
srb_t *sp)
+               list_for_each_entry(fcport, &vha->vp_fcports, list) {
+                       if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE))
+                               continue;
+-                      fcport->rscn_rcvd = 0;
++                      fcport->scan_needed = 0;
+                       fcport->scan_state = QLA_FCPORT_FOUND;
+                       found = true;
+                       /*
+@@ -4009,20 +4009,19 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, 
srb_t *sp)
+        */
+       list_for_each_entry(fcport, &vha->vp_fcports, list) {
+               if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
+-                      fcport->rscn_rcvd = 0;
++                      fcport->scan_needed = 0;
+                       continue;
+               }
+ 
+               if (fcport->scan_state != QLA_FCPORT_FOUND) {
+-                      fcport->rscn_rcvd = 0;
++                      fcport->scan_needed = 0;
+                       if ((qla_dual_mode_enabled(vha) ||
+                               qla_ini_mode_enabled(vha)) &&
+                           atomic_read(&fcport->state) == FCS_ONLINE) {
+-                              qla2x00_mark_device_lost(vha, fcport,
+-                                  ql2xplogiabsentdevice, 0);
++                              if (fcport->loop_id != FC_NO_LOOP_ID) {
++                                      if (fcport->flags & FCF_FCP2_DEVICE)
++                                              fcport->logout_on_delete = 0;
+ 
+-                              if (fcport->loop_id != FC_NO_LOOP_ID &&
+-                                  (fcport->flags & FCF_FCP2_DEVICE) == 0) {
+                                       ql_dbg(ql_dbg_disc, vha, 0x20f0,
+                                           "%s %d %8phC post del sess\n",
+                                           __func__, __LINE__,
+@@ -4033,7 +4032,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, 
srb_t *sp)
+                               }
+                       }
+               } else {
+-                      if (fcport->rscn_rcvd ||
++                      if (fcport->scan_needed ||
+                           fcport->disc_state != DSC_LOGIN_COMPLETE) {
+                               if (fcport->login_retry == 0) {
+                                       fcport->login_retry =
+@@ -4043,7 +4042,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, 
srb_t *sp)
+                                           fcport->port_name, fcport->loop_id,
+                                           fcport->login_retry);
+                               }
+-                              fcport->rscn_rcvd = 0;
++                              fcport->scan_needed = 0;
+                               qla24xx_fcport_handle_login(vha, fcport);
+                       }
+               }
+@@ -4058,7 +4057,7 @@ out:
+ 
+       if (recheck) {
+               list_for_each_entry(fcport, &vha->vp_fcports, list) {
+-                      if (fcport->rscn_rcvd) {
++                      if (fcport->scan_needed) {
+                               set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
+                               set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
+                               break;
+@@ -4261,12 +4260,13 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, 
int res)
+ 
+               sp->rc = res;
+               rc = qla2x00_post_nvme_gpnft_done_work(vha, sp, QLA_EVT_GPNFT);
+-              if (!rc) {
++              if (rc) {
+                       qla24xx_sp_unmap(vha, sp);
+                       set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
+                       set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
+                       return;
+               }
++              return;
+       }
+ 
+       if (cmd == GPN_FT_CMD) {
+@@ -4316,6 +4316,8 @@ static int qla24xx_async_gnnft(scsi_qla_host_t *vha, 
struct srb *sp,
+               vha->scan.scan_flags &= ~SF_SCANNING;
+               spin_unlock_irqrestore(&vha->work_lock, flags);
+               WARN_ON(1);
++              set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
++              set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
+               goto done_free_sp;
+       }
+ 
+@@ -4349,8 +4351,12 @@ static int qla24xx_async_gnnft(scsi_qla_host_t *vha, 
struct srb *sp,
+       sp->done = qla2x00_async_gpnft_gnnft_sp_done;
+ 
+       rval = qla2x00_start_sp(sp);
+-      if (rval != QLA_SUCCESS)
++      if (rval != QLA_SUCCESS) {
++              spin_lock_irqsave(&vha->work_lock, flags);
++              vha->scan.scan_flags &= ~SF_SCANNING;
++              spin_unlock_irqrestore(&vha->work_lock, flags);
+               goto done_free_sp;
++      }
+ 
+       ql_dbg(ql_dbg_disc, vha, 0xffff,
+           "Async-%s hdl=%x FC4Type %x.\n", sp->name,
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index f45759b353bea..2ebf4e4e02344 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -800,6 +800,7 @@ qla24xx_async_gnl_sp_done(void *s, int res)
+       if (res == QLA_FUNCTION_TIMEOUT)
+               return;
+ 
++      sp->fcport->flags &= ~(FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE);
+       memset(&ea, 0, sizeof(ea));
+       ea.sp = sp;
+       ea.rc = res;
+@@ -827,25 +828,24 @@ qla24xx_async_gnl_sp_done(void *s, int res)
+                   (loop_id & 0x7fff));
+       }
+ 
+-      spin_lock_irqsave(&vha->gnl.fcports_lock, flags);
++      spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
+ 
+       INIT_LIST_HEAD(&h);
+       fcport = tf = NULL;
+       if (!list_empty(&vha->gnl.fcports))
+               list_splice_init(&vha->gnl.fcports, &h);
++      spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
+ 
+       list_for_each_entry_safe(fcport, tf, &h, gnl_entry) {
+               list_del_init(&fcport->gnl_entry);
+-              spin_lock(&vha->hw->tgt.sess_lock);
++              spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
+               fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
+-              spin_unlock(&vha->hw->tgt.sess_lock);
++              spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
+               ea.fcport = fcport;
+ 
+               qla2x00_fcport_event_handler(vha, &ea);
+       }
+-      spin_unlock_irqrestore(&vha->gnl.fcports_lock, flags);
+ 
+-      spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
+       /* create new fcport if fw has knowledge of new sessions */
+       for (i = 0; i < n; i++) {
+               port_id_t id;
+@@ -878,6 +878,8 @@ qla24xx_async_gnl_sp_done(void *s, int res)
+               }
+       }
+ 
++      spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
++      vha->gnl.sent = 0;
+       spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
+ 
+       sp->free(sp);
+@@ -897,27 +899,24 @@ int qla24xx_async_gnl(struct scsi_qla_host *vha, 
fc_port_t *fcport)
+       ql_dbg(ql_dbg_disc, vha, 0x20d9,
+           "Async-gnlist WWPN %8phC \n", fcport->port_name);
+ 
+-      spin_lock_irqsave(&vha->gnl.fcports_lock, flags);
+-      if (!list_empty(&fcport->gnl_entry)) {
+-              spin_unlock_irqrestore(&vha->gnl.fcports_lock, flags);
+-              rval = QLA_SUCCESS;
+-              goto done;
+-      }
+-
+-      spin_lock(&vha->hw->tgt.sess_lock);
++      spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
++      fcport->flags |= FCF_ASYNC_SENT;
+       fcport->disc_state = DSC_GNL;
+       fcport->last_rscn_gen = fcport->rscn_gen;
+       fcport->last_login_gen = fcport->login_gen;
+-      spin_unlock(&vha->hw->tgt.sess_lock);
+ 
+       list_add_tail(&fcport->gnl_entry, &vha->gnl.fcports);
+-      spin_unlock_irqrestore(&vha->gnl.fcports_lock, flags);
++      if (vha->gnl.sent) {
++              spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
++              return QLA_SUCCESS;
++      }
++      vha->gnl.sent = 1;
++      spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
+ 
+       sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
+       if (!sp)
+               goto done;
+ 
+-      fcport->flags |= FCF_ASYNC_SENT;
+       sp->type = SRB_MB_IOCB;
+       sp->name = "gnlist";
+       sp->gen1 = fcport->rscn_gen;
+@@ -1204,11 +1203,9 @@ void __qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, 
struct event_arg *ea)
+               vha->fcport_count++;
+               ea->fcport->login_succ = 1;
+ 
+-              ql_dbg(ql_dbg_disc, vha, 0x20d6,
+-                  "%s %d %8phC post upd_fcport fcp_cnt %d\n",
+-                  __func__, __LINE__,  ea->fcport->port_name,
+-                  vha->fcport_count);
+-              qla24xx_post_upd_fcport_work(vha, ea->fcport);
++              spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
++              qla24xx_sched_upd_fcport(ea->fcport);
++              spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
+       } else if (ea->fcport->login_succ) {
+               /*
+                * We have an existing session. A late RSCN delivery
+@@ -1326,6 +1323,7 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host 
*vha, fc_port_t *fcport)
+ {
+       u16 data[2];
+       u64 wwn;
++      u16 sec;
+ 
+       ql_dbg(ql_dbg_disc, vha, 0x20d8,
+           "%s %8phC DS %d LS %d P %d fl %x confl %p rscn %d|%d login %d retry 
%d lid %d scan %d\n",
+@@ -1457,6 +1455,22 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host 
*vha, fc_port_t *fcport)
+                       qla24xx_post_prli_work(vha, fcport);
+               break;
+ 
++      case DSC_UPD_FCPORT:
++              sec =  jiffies_to_msecs(jiffies -
++                  fcport->jiffies_at_registration)/1000;
++              if (fcport->sec_since_registration < sec && sec &&
++                  !(sec % 60)) {
++                      fcport->sec_since_registration = sec;
++                      ql_dbg(ql_dbg_disc, fcport->vha, 0xffff,
++                          "%s %8phC - Slow Rport registration(%d Sec)\n",
++                          __func__, fcport->port_name, sec);
++              }
++
++              if (fcport->next_disc_state != DSC_DELETE_PEND)
++                      fcport->next_disc_state = DSC_ADISC;
++              set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
++              break;
++
+       default:
+               break;
+       }
+@@ -1572,8 +1586,10 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, 
struct event_arg *ea)
+               case RSCN_PORT_ADDR:
+                       fcport = qla2x00_find_fcport_by_nportid
+                               (vha, &ea->id, 1);
+-                      if (fcport)
+-                              fcport->rscn_rcvd = 1;
++                      if (fcport) {
++                              fcport->scan_needed = 1;
++                              fcport->rscn_gen++;
++                      }
+ 
+                       spin_lock_irqsave(&vha->work_lock, flags);
+                       if (vha->scan.scan_flags == 0) {
+@@ -4741,6 +4757,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
+               return NULL;
+       }
+       INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);
++      INIT_WORK(&fcport->reg_work, qla_register_fcport_fn);
+       INIT_LIST_HEAD(&fcport->gnl_entry);
+       INIT_LIST_HEAD(&fcport->list);
+ 
+@@ -5221,13 +5238,15 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, 
fc_port_t *fcport)
+ void
+ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
+ {
+-      fcport->vha = vha;
+-
+       if (IS_SW_RESV_ADDR(fcport->d_id))
+               return;
+ 
++      ql_dbg(ql_dbg_disc, vha, 0x20ef, "%s %8phC\n",
++          __func__, fcport->port_name);
++
++      fcport->disc_state = DSC_UPD_FCPORT;
++      fcport->login_retry = vha->hw->login_retry_count;
+       fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
+-      fcport->disc_state = DSC_LOGIN_COMPLETE;
+       fcport->deleted = 0;
+       fcport->logout_on_delete = 1;
+       fcport->login_retry = vha->hw->login_retry_count;
+@@ -5289,6 +5308,36 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t 
*fcport)
+               }
+       }
+       qla2x00_set_fcport_state(fcport, FCS_ONLINE);
++
++      fcport->disc_state = DSC_LOGIN_COMPLETE;
++}
++
++void qla_register_fcport_fn(struct work_struct *work)
++{
++      fc_port_t *fcport = container_of(work, struct fc_port, reg_work);
++      u32 rscn_gen = fcport->rscn_gen;
++      u16 data[2];
++
++      if (IS_SW_RESV_ADDR(fcport->d_id))
++              return;
++
++      qla2x00_update_fcport(fcport->vha, fcport);
++
++      if (rscn_gen != fcport->rscn_gen) {
++              /* RSCN(s) came in while registration */
++              switch (fcport->next_disc_state) {
++              case DSC_DELETE_PEND:
++                      qlt_schedule_sess_for_deletion(fcport);
++                      break;
++              case DSC_ADISC:
++                      data[0] = data[1] = 0;
++                      qla2x00_post_async_adisc_work(fcport->vha, fcport,
++                          data);
++                      break;
++              default:
++                      break;
++              }
++      }
+ }
+ 
+ /*
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index e17ca7df8d0e4..83ef790afb5df 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -2719,7 +2719,7 @@ static void qla2x00_iocb_work_fn(struct work_struct 
*work)
+               struct scsi_qla_host, iocb_work);
+       struct qla_hw_data *ha = vha->hw;
+       struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
+-      int i = 20;
++      int i = 2;
+       unsigned long flags;
+ 
+       if (test_bit(UNLOADING, &base_vha->dpc_flags))
+@@ -4606,7 +4606,6 @@ struct scsi_qla_host *qla2x00_create_host(struct 
scsi_host_template *sht,
+ 
+       spin_lock_init(&vha->work_lock);
+       spin_lock_init(&vha->cmd_list_lock);
+-      spin_lock_init(&vha->gnl.fcports_lock);
+       init_waitqueue_head(&vha->fcport_waitQ);
+       init_waitqueue_head(&vha->vref_waitq);
+ 
+@@ -4792,16 +4791,25 @@ qlafx00_post_aenfx_work(struct scsi_qla_host *vha,  
uint32_t evtcode,
+       return qla2x00_post_work(vha, e);
+ }
+ 
+-int qla24xx_post_upd_fcport_work(struct scsi_qla_host *vha, fc_port_t *fcport)
++void qla24xx_sched_upd_fcport(fc_port_t *fcport)
+ {
+-      struct qla_work_evt *e;
++      unsigned long flags;
+ 
+-      e = qla2x00_alloc_work(vha, QLA_EVT_UPD_FCPORT);
+-      if (!e)
+-              return QLA_FUNCTION_FAILED;
++      if (IS_SW_RESV_ADDR(fcport->d_id))
++              return;
+ 
+-      e->u.fcport.fcport = fcport;
+-      return qla2x00_post_work(vha, e);
++      spin_lock_irqsave(&fcport->vha->work_lock, flags);
++      if (fcport->disc_state == DSC_UPD_FCPORT) {
++              spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
++              return;
++      }
++      fcport->jiffies_at_registration = jiffies;
++      fcport->sec_since_registration = 0;
++      fcport->next_disc_state = DSC_DELETED;
++      fcport->disc_state = DSC_UPD_FCPORT;
++      spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
++
++      queue_work(system_unbound_wq, &fcport->reg_work);
+ }
+ 
+ static
+@@ -5057,9 +5065,6 @@ qla2x00_do_work(struct scsi_qla_host *vha)
+               case QLA_EVT_GPSC:
+                       qla24xx_async_gpsc(vha, e->u.fcport.fcport);
+                       break;
+-              case QLA_EVT_UPD_FCPORT:
+-                      qla2x00_update_fcport(vha, e->u.fcport.fcport);
+-                      break;
+               case QLA_EVT_GNL:
+                       qla24xx_async_gnl(vha, e->u.fcport.fcport);
+                       break;
+diff --git a/drivers/scsi/qla2xxx/qla_target.c 
b/drivers/scsi/qla2xxx/qla_target.c
+index 95206e227730c..29b79e85fa7f2 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -600,14 +600,9 @@ void qla2x00_async_nack_sp_done(void *s, int res)
+                       sp->fcport->login_succ = 1;
+ 
+                       vha->fcport_count++;
+-
+-                      ql_dbg(ql_dbg_disc, vha, 0x20f3,
+-                          "%s %d %8phC post upd_fcport fcp_cnt %d\n",
+-                          __func__, __LINE__,
+-                          sp->fcport->port_name,
+-                          vha->fcport_count);
+-                      sp->fcport->disc_state = DSC_UPD_FCPORT;
+-                      qla24xx_post_upd_fcport_work(vha, sp->fcport);
++                      spin_unlock_irqrestore(&vha->hw->tgt.sess_lock, flags);
++                      qla24xx_sched_upd_fcport(sp->fcport);
++                      spin_lock_irqsave(&vha->hw->tgt.sess_lock, flags);
+               } else {
+                       sp->fcport->login_retry = 0;
+                       sp->fcport->disc_state = DSC_LOGIN_COMPLETE;
+@@ -1227,11 +1222,12 @@ void qlt_schedule_sess_for_deletion(struct fc_port 
*sess)
+ {
+       struct qla_tgt *tgt = sess->tgt;
+       unsigned long flags;
++      u16 sec;
+ 
+-      if (sess->disc_state == DSC_DELETE_PEND)
++      switch (sess->disc_state) {
++      case DSC_DELETE_PEND:
+               return;
+-
+-      if (sess->disc_state == DSC_DELETED) {
++      case DSC_DELETED:
+               if (tgt && tgt->tgt_stop && (tgt->sess_count == 0))
+                       wake_up_all(&tgt->waitQ);
+               if (sess->vha->fcport_count == 0)
+@@ -1240,6 +1236,24 @@ void qlt_schedule_sess_for_deletion(struct fc_port 
*sess)
+               if (!sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN] &&
+                       !sess->plogi_link[QLT_PLOGI_LINK_CONFLICT])
+                       return;
++              break;
++      case DSC_UPD_FCPORT:
++              /*
++               * This port is not done reporting to upper layer.
++               * let it finish
++               */
++              sess->next_disc_state = DSC_DELETE_PEND;
++              sec = jiffies_to_msecs(jiffies -
++                  sess->jiffies_at_registration)/1000;
++              if (sess->sec_since_registration < sec && sec && !(sec % 5)) {
++                      sess->sec_since_registration = sec;
++                      ql_dbg(ql_dbg_disc, sess->vha, 0xffff,
++                          "%s %8phC : Slow Rport registration(%d Sec)\n",
++                          __func__, sess->port_name, sec);
++              }
++              return;
++      default:
++              break;
+       }
+ 
+       if (sess->deleted == QLA_SESS_DELETED)
+@@ -4749,6 +4763,32 @@ static int qlt_handle_login(struct scsi_qla_host *vha,
+               goto out;
+       }
+ 
++      if (sess->disc_state == DSC_UPD_FCPORT) {
++              u16 sec;
++
++              /*
++               * Remote port registration is still going on from
++               * previous login. Allow it to finish before we
++               * accept the new login.
++               */
++              sess->next_disc_state = DSC_DELETE_PEND;
++              sec = jiffies_to_msecs(jiffies -
++                  sess->jiffies_at_registration) / 1000;
++              if (sess->sec_since_registration < sec && sec &&
++                  !(sec % 5)) {
++                      sess->sec_since_registration = sec;
++                      ql_dbg(ql_dbg_disc, vha, 0xffff,
++                          "%s %8phC - Slow Rport registration (%d Sec)\n",
++                          __func__, sess->port_name, sec);
++              }
++
++              if (!conflict_sess)
++                      kmem_cache_free(qla_tgt_plogi_cachep, pla);
++
++              qlt_send_term_imm_notif(vha, iocb, 1);
++              goto out;
++      }
++
+       qlt_plogi_ack_link(vha, pla, sess, QLT_PLOGI_LINK_SAME_WWN);
+       sess->d_id = port_id;
+       sess->login_gen++;
+@@ -4908,6 +4948,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha,
+ 
+               if (sess != NULL) {
+                       bool delete = false;
++                      int sec;
+                       spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags);
+                       switch (sess->fw_login_state) {
+                       case DSC_LS_PLOGI_PEND:
+@@ -4920,9 +4961,24 @@ static int qlt_24xx_handle_els(struct scsi_qla_host 
*vha,
+                       }
+ 
+                       switch (sess->disc_state) {
++                      case DSC_UPD_FCPORT:
++                              spin_unlock_irqrestore(&tgt->ha->tgt.sess_lock,
++                                  flags);
++
++                              sec = jiffies_to_msecs(jiffies -
++                                  sess->jiffies_at_registration)/1000;
++                              if (sess->sec_since_registration < sec && sec &&
++                                  !(sec % 5)) {
++                                      sess->sec_since_registration = sec;
++                                      ql_dbg(ql_dbg_disc, sess->vha, 0xffff,
++                                          "%s %8phC : Slow Rport 
registration(%d Sec)\n",
++                                          __func__, sess->port_name, sec);
++                              }
++                              qlt_send_term_imm_notif(vha, iocb, 1);
++                              return 0;
++
+                       case DSC_LOGIN_PEND:
+                       case DSC_GPDB:
+-                      case DSC_UPD_FCPORT:
+                       case DSC_LOGIN_COMPLETE:
+                       case DSC_ADISC:
+                               delete = false;
+@@ -5959,10 +6015,7 @@ static fc_port_t *qlt_get_port_database(struct 
scsi_qla_host *vha,
+       case MODE_DUAL:
+               if (newfcport) {
+                       if (!IS_IIDMA_CAPABLE(vha->hw) || 
!vha->hw->flags.gpsc_supported) {
+-                              ql_dbg(ql_dbg_disc, vha, 0x20fe,
+-                                 "%s %d %8phC post upd_fcport fcp_cnt %d\n",
+-                                 __func__, __LINE__, fcport->port_name, 
vha->fcport_count);
+-                              qla24xx_post_upd_fcport_work(vha, fcport);
++                              qla24xx_sched_upd_fcport(fcport);
+                       } else {
+                               ql_dbg(ql_dbg_disc, vha, 0x20ff,
+                                  "%s %d %8phC post gpsc fcp_cnt %d\n",
+diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
+index bed7403bb6b3a..b9a7117b6dce3 100644
+--- a/drivers/spi/spi-loopback-test.c
++++ b/drivers/spi/spi-loopback-test.c
+@@ -99,7 +99,7 @@ static struct spi_test spi_tests[] = {
+       {
+               .description    = "tx/rx-transfer - crossing PAGE_SIZE",
+               .fill_option    = FILL_COUNT_8,
+-              .iterate_len    = { ITERATE_MAX_LEN },
++              .iterate_len    = { ITERATE_LEN },
+               .iterate_tx_align = ITERATE_ALIGN,
+               .iterate_rx_align = ITERATE_ALIGN,
+               .transfer_count = 1,
+diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
+index 92e6b6774d98e..1fd529a2d2f6b 100644
+--- a/drivers/spi/spi.c
++++ b/drivers/spi/spi.c
+@@ -1116,8 +1116,6 @@ out:
+       if (msg->status && ctlr->handle_err)
+               ctlr->handle_err(ctlr, msg);
+ 
+-      spi_res_release(ctlr, msg);
+-
+       spi_finalize_current_message(ctlr);
+ 
+       return ret;
+@@ -1375,6 +1373,13 @@ void spi_finalize_current_message(struct spi_controller 
*ctlr)
+ 
+       spi_unmap_msg(ctlr, mesg);
+ 
++      /* In the prepare_messages callback the spi bus has the opportunity to
++       * split a transfer to smaller chunks.
++       * Release splited transfers here since spi_map_msg is done on the
++       * splited transfers.
++       */
++      spi_res_release(ctlr, mesg);
++
+       if (ctlr->cur_msg_prepared && ctlr->unprepare_message) {
+               ret = ctlr->unprepare_message(ctlr, mesg);
+               if (ret) {
+diff --git a/drivers/tty/serial/8250/8250_pci.c 
b/drivers/tty/serial/8250/8250_pci.c
+index 02091782bc1e7..725e5842b8acc 100644
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5236,6 +5236,17 @@ static const struct pci_device_id serial_pci_tbl[] = {
+               PCI_ANY_ID, PCI_ANY_ID,
+               0, 0, pbn_wch384_4 },
+ 
++      /*
++       * Realtek RealManage
++       */
++      {       PCI_VENDOR_ID_REALTEK, 0x816a,
++              PCI_ANY_ID, PCI_ANY_ID,
++              0, 0, pbn_b0_1_115200 },
++
++      {       PCI_VENDOR_ID_REALTEK, 0x816b,
++              PCI_ANY_ID, PCI_ANY_ID,
++              0, 0, pbn_b0_1_115200 },
++
+       /* Fintek PCI serial cards */
+       { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },
+       { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },
+diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
+index 419804c9c974b..db36a796af8c3 100644
+--- a/drivers/usb/class/usblp.c
++++ b/drivers/usb/class/usblp.c
+@@ -827,6 +827,11 @@ static ssize_t usblp_read(struct file *file, char __user 
*buffer, size_t len, lo
+       if (rv < 0)
+               return rv;
+ 
++      if (!usblp->present) {
++              count = -ENODEV;
++              goto done;
++      }
++
+       if ((avail = usblp->rstatus) < 0) {
+               printk(KERN_ERR "usblp%d: error %d reading from printer\n",
+                   usblp->minor, (int)avail);
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
+index 2f068e525a374..4ee8105310989 100644
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -397,6 +397,10 @@ static const struct usb_device_id usb_quirk_list[] = {
+       /* Generic RTL8153 based ethernet adapters */
+       { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },
+ 
++      /* SONiX USB DEVICE Touchpad */
++      { USB_DEVICE(0x0c45, 0x7056), .driver_info =
++                      USB_QUIRK_IGNORE_REMOTE_WAKEUP },
++
+       /* Action Semiconductor flash disk */
+       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
+                       USB_QUIRK_STRING_FETCH_255 },
+diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
+index 8608ac513fb76..caf9f6b1cd346 100644
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -22,6 +22,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/usb.h>
+ #include <linux/usb/hcd.h>
++#include <linux/usb/otg.h>
+ #include <linux/moduleparam.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/debugfs.h>
+diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
+index ce0eaf7d7c12a..087402aec5cbe 100644
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -14,7 +14,6 @@
+  */
+ 
+ /*-------------------------------------------------------------------------*/
+-#include <linux/usb/otg.h>
+ 
+ #define       PORT_WAKE_BITS  (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
+ 
+diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
+index 27d8b4b6ff593..658b0cd8e27ee 100644
+--- a/drivers/usb/storage/uas.c
++++ b/drivers/usb/storage/uas.c
+@@ -669,8 +669,7 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd,
+       if (devinfo->resetting) {
+               cmnd->result = DID_ERROR << 16;
+               cmnd->scsi_done(cmnd);
+-              spin_unlock_irqrestore(&devinfo->lock, flags);
+-              return 0;
++              goto zombie;
+       }
+ 
+       /* Find a free uas-tag */
+@@ -706,6 +705,16 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd,
+               cmdinfo->state &= ~(SUBMIT_DATA_IN_URB | SUBMIT_DATA_OUT_URB);
+ 
+       err = uas_submit_urbs(cmnd, devinfo);
++      /*
++       * in case of fatal errors the SCSI layer is peculiar
++       * a command that has finished is a success for the purpose
++       * of queueing, no matter how fatal the error
++       */
++      if (err == -ENODEV) {
++              cmnd->result = DID_ERROR << 16;
++              cmnd->scsi_done(cmnd);
++              goto zombie;
++      }
+       if (err) {
+               /* If we did nothing, give up now */
+               if (cmdinfo->state & SUBMIT_STATUS_URB) {
+@@ -716,6 +725,7 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd,
+       }
+ 
+       devinfo->cmnd[idx] = cmnd;
++zombie:
+       spin_unlock_irqrestore(&devinfo->lock, flags);
+       return 0;
+ }
+diff --git a/drivers/video/fbdev/core/fbcon.c 
b/drivers/video/fbdev/core/fbcon.c
+index 29226b6cb632d..0bf5ea518558c 100644
+--- a/drivers/video/fbdev/core/fbcon.c
++++ b/drivers/video/fbdev/core/fbcon.c
+@@ -1979,7 +1979,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int 
width,
+       struct fb_var_screeninfo var = info->var;
+       int x_diff, y_diff, virt_w, virt_h, virt_fw, virt_fh;
+ 
+-      if (ops->p && ops->p->userfont && FNTSIZE(vc->vc_font.data)) {
++      if (p->userfont && FNTSIZE(vc->vc_font.data)) {
+               int size;
+               int pitch = PITCH(vc->vc_font.width);
+ 
+diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
+index c81a1f3f0a101..c63f5e32630ee 100644
+--- a/fs/f2fs/data.c
++++ b/fs/f2fs/data.c
+@@ -2490,6 +2490,9 @@ static int check_direct_IO(struct inode *inode, struct 
iov_iter *iter,
+       unsigned long align = offset | iov_iter_alignment(iter);
+       struct block_device *bdev = inode->i_sb->s_bdev;
+ 
++      if (iov_iter_rw(iter) == READ && offset >= i_size_read(inode))
++              return 1;
++
+       if (align & blocksize_mask) {
+               if (bdev)
+                       blkbits = blksize_bits(bdev_logical_block_size(bdev));
+diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
+index 2ff02541c53d5..1934dc6ad1ccd 100644
+--- a/fs/f2fs/node.c
++++ b/fs/f2fs/node.c
+@@ -2257,6 +2257,9 @@ static int __f2fs_build_free_nids(struct f2fs_sb_info 
*sbi,
+       if (unlikely(nid >= nm_i->max_nid))
+               nid = 0;
+ 
++      if (unlikely(nid % NAT_ENTRY_PER_BLOCK))
++              nid = NAT_BLOCK_OFFSET(nid) * NAT_ENTRY_PER_BLOCK;
++
+       /* Enough entries */
+       if (nm_i->nid_cnt[FREE_NID] >= NAT_ENTRY_PER_BLOCK)
+               return 0;
+diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
+index c63bee9adb6a8..20f08f4391c9d 100644
+--- a/fs/gfs2/glops.c
++++ b/fs/gfs2/glops.c
+@@ -89,6 +89,8 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
+       memset(&tr, 0, sizeof(tr));
+       INIT_LIST_HEAD(&tr.tr_buf);
+       INIT_LIST_HEAD(&tr.tr_databuf);
++      INIT_LIST_HEAD(&tr.tr_ail1_list);
++      INIT_LIST_HEAD(&tr.tr_ail2_list);
+       tr.tr_revokes = atomic_read(&gl->gl_ail_count);
+ 
+       if (!tr.tr_revokes)
+diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
+index 06752db213d21..74c1fe9c4a042 100644
+--- a/fs/gfs2/log.c
++++ b/fs/gfs2/log.c
+@@ -806,8 +806,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct 
gfs2_glock *gl, u32 flags)
+       tr = sdp->sd_log_tr;
+       if (tr) {
+               sdp->sd_log_tr = NULL;
+-              INIT_LIST_HEAD(&tr->tr_ail1_list);
+-              INIT_LIST_HEAD(&tr->tr_ail2_list);
+               tr->tr_first = sdp->sd_log_flush_head;
+               if (unlikely (state == SFS_FROZEN))
+                       gfs2_assert_withdraw(sdp, !tr->tr_num_buf_new && 
!tr->tr_num_databuf_new);
+diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
+index 812b5d5978b27..9313f7904e342 100644
+--- a/fs/gfs2/trans.c
++++ b/fs/gfs2/trans.c
+@@ -56,6 +56,8 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int 
blocks,
+                                                  sizeof(u64));
+       INIT_LIST_HEAD(&tr->tr_databuf);
+       INIT_LIST_HEAD(&tr->tr_buf);
++      INIT_LIST_HEAD(&tr->tr_ail1_list);
++      INIT_LIST_HEAD(&tr->tr_ail2_list);
+ 
+       sb_start_intwrite(sdp->sd_vfs);
+ 
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index 1ef75b1deffa3..b2a2ff3f22a46 100644
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -3129,8 +3129,10 @@ static int _nfs4_do_setattr(struct inode *inode,
+ 
+       /* Servers should only apply open mode checks for file size changes */
+       truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false;
+-      if (!truncate)
++      if (!truncate) {
++              nfs4_inode_make_writeable(inode);
+               goto zero_stateid;
++      }
+ 
+       if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, 
&delegation_cred)) {
+               /* Use that stateid */
+@@ -7006,7 +7008,12 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, 
struct nfs4_state *state,
+       err = nfs4_set_lock_state(state, fl);
+       if (err != 0)
+               return err;
+-      err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
++      do {
++              err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
++              if (err != -NFS4ERR_DELAY)
++                      break;
++              ssleep(1);
++      } while (err == -NFS4ERR_DELAY);
+       return nfs4_handle_delegation_recall_error(server, state, stateid, fl, 
err);
+ }
+ 
+diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h
+index d03071732db4a..7c522fdd9ea73 100644
+--- a/include/linux/i2c-algo-pca.h
++++ b/include/linux/i2c-algo-pca.h
+@@ -53,6 +53,20 @@
+ #define I2C_PCA_CON_SI                0x08 /* Serial Interrupt */
+ #define I2C_PCA_CON_CR                0x07 /* Clock Rate (MASK) */
+ 
++/**
++ * struct pca_i2c_bus_settings - The configured PCA i2c bus settings
++ * @mode: Configured i2c bus mode
++ * @tlow: Configured SCL LOW period
++ * @thi: Configured SCL HIGH period
++ * @clock_freq: The configured clock frequency
++ */
++struct pca_i2c_bus_settings {
++      int mode;
++      int tlow;
++      int thi;
++      int clock_freq;
++};
++
+ struct i2c_algo_pca_data {
+       void                            *data;  /* private low level data */
+       void (*write_byte)              (void *data, int reg, int val);
+@@ -64,6 +78,7 @@ struct i2c_algo_pca_data {
+        * For PCA9665, use the frequency you want here. */
+       unsigned int                    i2c_clock;
+       unsigned int                    chip;
++      struct pca_i2c_bus_settings             bus_settings;
+ };
+ 
+ int i2c_pca_add_bus(struct i2c_adapter *);
+diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
+index 66ce6659ecb69..c297abc4e6697 100644
+--- a/include/uapi/linux/kvm.h
++++ b/include/uapi/linux/kvm.h
+@@ -746,9 +746,10 @@ struct kvm_ppc_resize_hpt {
+ #define KVM_VM_PPC_HV 1
+ #define KVM_VM_PPC_PR 2
+ 
+-/* on MIPS, 0 forces trap & emulate, 1 forces VZ ASE */
+-#define KVM_VM_MIPS_TE                0
++/* on MIPS, 0 indicates auto, 1 forces VZ ASE, 2 forces trap & emulate */
++#define KVM_VM_MIPS_AUTO      0
+ #define KVM_VM_MIPS_VZ                1
++#define KVM_VM_MIPS_TE                2
+ 
+ #define KVM_S390_SIE_PAGE_OFFSET 1
+ 
+diff --git a/mm/percpu.c b/mm/percpu.c
+index ff76fa0b75288..0151f276ae680 100644
+--- a/mm/percpu.c
++++ b/mm/percpu.c
+@@ -1103,7 +1103,7 @@ static struct pcpu_chunk * __init 
pcpu_alloc_first_chunk(unsigned long tmp_addr,
+ 
+       /* allocate chunk */
+       chunk = memblock_virt_alloc(sizeof(struct pcpu_chunk) +
+-                                  BITS_TO_LONGS(region_size >> PAGE_SHIFT),
++                                  BITS_TO_LONGS(region_size >> PAGE_SHIFT) * 
sizeof(unsigned long),
+                                   0);
+ 
+       INIT_LIST_HEAD(&chunk->list);
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c
+index af6e9028716d1..be4bc833c28a2 100644
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -5521,9 +5521,13 @@ static int pskb_carve_inside_nonlinear(struct sk_buff 
*skb, const u32 off,
+       if (skb_has_frag_list(skb))
+               skb_clone_fraglist(skb);
+ 
+-      if (k == 0) {
+-              /* split line is in frag list */
+-              pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask);
++      /* split line is in frag list */
++      if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) {
++              /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. 
*/
++              if (skb_has_frag_list(skb))
++                      kfree_skb_list(skb_shinfo(skb)->frag_list);
++              kfree(data);
++              return -ENOMEM;
+       }
+       skb_release_data(skb);
+ 
+diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
+index 4083326b806e8..d62d28d358d91 100644
+--- a/net/dsa/tag_edsa.c
++++ b/net/dsa/tag_edsa.c
+@@ -17,6 +17,16 @@
+ #define DSA_HLEN      4
+ #define EDSA_HLEN     8
+ 
++#define FRAME_TYPE_TO_CPU     0x00
++#define FRAME_TYPE_FORWARD    0x03
++
++#define TO_CPU_CODE_MGMT_TRAP         0x00
++#define TO_CPU_CODE_FRAME2REG         0x01
++#define TO_CPU_CODE_IGMP_MLD_TRAP     0x02
++#define TO_CPU_CODE_POLICY_TRAP               0x03
++#define TO_CPU_CODE_ARP_MIRROR                0x04
++#define TO_CPU_CODE_POLICY_MIRROR     0x05
++
+ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+       struct dsa_port *dp = dsa_slave_to_port(dev);
+@@ -81,6 +91,8 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct 
net_device *dev,
+                               struct packet_type *pt)
+ {
+       u8 *edsa_header;
++      int frame_type;
++      int code;
+       int source_device;
+       int source_port;
+ 
+@@ -95,8 +107,29 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, 
struct net_device *dev,
+       /*
+        * Check that frame type is either TO_CPU or FORWARD.
+        */
+-      if ((edsa_header[0] & 0xc0) != 0x00 && (edsa_header[0] & 0xc0) != 0xc0)
++      frame_type = edsa_header[0] >> 6;
++
++      switch (frame_type) {
++      case FRAME_TYPE_TO_CPU:
++              code = (edsa_header[1] & 0x6) | ((edsa_header[2] >> 4) & 1);
++
++              /*
++               * Mark the frame to never egress on any port of the same switch
++               * unless it's a trapped IGMP/MLD packet, in which case the
++               * bridge might want to forward it.
++               */
++              if (code != TO_CPU_CODE_IGMP_MLD_TRAP)
++                      skb->offload_fwd_mark = 1;
++
++              break;
++
++      case FRAME_TYPE_FORWARD:
++              skb->offload_fwd_mark = 1;
++              break;
++
++      default:
+               return NULL;
++      }
+ 
+       /*
+        * Determine source device and port.
+@@ -160,8 +193,6 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, 
struct net_device *dev,
+                       2 * ETH_ALEN);
+       }
+ 
+-      skb->offload_fwd_mark = 1;
+-
+       return skb;
+ }
+ 
+diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
+index 08b5fa4a2852a..ba8f367312289 100644
+--- a/net/sunrpc/rpcb_clnt.c
++++ b/net/sunrpc/rpcb_clnt.c
+@@ -981,8 +981,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct 
xdr_stream *xdr,
+       p = xdr_inline_decode(xdr, len);
+       if (unlikely(p == NULL))
+               goto out_fail;
+-      dprintk("RPC: %5u RPCB_%s reply: %s\n", req->rq_task->tk_pid,
+-                      req->rq_task->tk_msg.rpc_proc->p_name, (char *)p);
++      dprintk("RPC: %5u RPCB_%s reply: %*pE\n", req->rq_task->tk_pid,
++                      req->rq_task->tk_msg.rpc_proc->p_name, len, (char *)p);
+ 
+       if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
+                               sap, sizeof(address)) == 0)
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index 8092fd5617fa7..9c5b3d19bfa73 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2452,7 +2452,6 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
+-      SND_PCI_QUIRK(0x1462, 0x9c37, "MSI X570-A PRO", 
ALC1220_FIXUP_CLEVO_P950),
+       SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", 
ALC1220_FIXUP_GB_DUAL_CODECS),
+       SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
+       SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", 
ALC882_FIXUP_ABIT_AW9D_MAX),
+diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
+index 4b559932adc33..121460db8eacf 100644
+--- a/sound/soc/qcom/apq8016_sbc.c
++++ b/sound/soc/qcom/apq8016_sbc.c
+@@ -233,6 +233,7 @@ static int apq8016_sbc_platform_probe(struct 
platform_device *pdev)
+               return -ENOMEM;
+ 
+       card->dev = dev;
++      card->owner = THIS_MODULE;
+       card->dapm_widgets = apq8016_sbc_dapm_widgets;
+       card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets);
+       data = apq8016_sbc_parse_of(card);
+diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
+index 1543e85629f80..04f814a0a7d51 100644
+--- a/sound/soc/qcom/apq8096.c
++++ b/sound/soc/qcom/apq8096.c
+@@ -46,6 +46,7 @@ static int apq8096_platform_probe(struct platform_device 
*pdev)
+               return -ENOMEM;
+ 
+       card->dev = dev;
++      card->owner = THIS_MODULE;
+       dev_set_drvdata(dev, card);
+       ret = qcom_snd_parse_of(card);
+       if (ret) {
+diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
+index 2a781d87ee65e..5fdbfa363ab16 100644
+--- a/sound/soc/qcom/sdm845.c
++++ b/sound/soc/qcom/sdm845.c
+@@ -226,6 +226,7 @@ static int sdm845_snd_platform_probe(struct 
platform_device *pdev)
+       }
+ 
+       card->dev = dev;
++      card->owner = THIS_MODULE;
+       dev_set_drvdata(dev, card);
+       ret = qcom_snd_parse_of(card);
+       if (ret) {
+diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c
+index a9fa972466ad1..00a3f4c1b6fed 100644
+--- a/sound/soc/qcom/storm.c
++++ b/sound/soc/qcom/storm.c
+@@ -99,6 +99,7 @@ static int storm_platform_probe(struct platform_device *pdev)
+               return -ENOMEM;
+ 
+       card->dev = &pdev->dev;
++      card->owner = THIS_MODULE;
+ 
+       ret = snd_soc_of_parse_card_name(card, "qcom,model");
+       if (ret) {
+diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c
+index 6cf00650602ef..697423ce3bdfc 100644
+--- a/tools/perf/tests/bp_signal.c
++++ b/tools/perf/tests/bp_signal.c
+@@ -44,10 +44,13 @@ volatile long the_var;
+ #if defined (__x86_64__)
+ extern void __test_function(volatile long *ptr);
+ asm (
++      ".pushsection .text;"
+       ".globl __test_function\n"
++      ".type __test_function, @function;"
+       "__test_function:\n"
+       "incq (%rdi)\n"
+-      "ret\n");
++      "ret\n"
++      ".popsection\n");
+ #else
+ static void __test_function(volatile long *ptr)
+ {
+diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c
+index 7bedf8608fdde..3e183eef6f857 100644
+--- a/tools/perf/tests/pmu.c
++++ b/tools/perf/tests/pmu.c
+@@ -172,6 +172,7 @@ int test__pmu(struct test *test __maybe_unused, int 
subtest __maybe_unused)
+               ret = 0;
+       } while (0);
+ 
++      perf_pmu__del_formats(&formats);
+       test_format_dir_put(format);
+       return ret;
+ }
+diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
+index c1acf04c9f7ab..c42054f42e7e6 100644
+--- a/tools/perf/util/pmu.c
++++ b/tools/perf/util/pmu.c
+@@ -1282,6 +1282,17 @@ void perf_pmu__set_format(unsigned long *bits, long 
from, long to)
+               set_bit(b, bits);
+ }
+ 
++void perf_pmu__del_formats(struct list_head *formats)
++{
++      struct perf_pmu_format *fmt, *tmp;
++
++      list_for_each_entry_safe(fmt, tmp, formats, list) {
++              list_del(&fmt->list);
++              free(fmt->name);
++              free(fmt);
++      }
++}
++
+ static int sub_non_neg(int a, int b)
+ {
+       if (b > a)
+diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
+index 76fecec7b3f91..21335425f2e42 100644
+--- a/tools/perf/util/pmu.h
++++ b/tools/perf/util/pmu.h
+@@ -79,6 +79,7 @@ int perf_pmu__new_format(struct list_head *list, char *name,
+                        int config, unsigned long *bits);
+ void perf_pmu__set_format(unsigned long *bits, long from, long to);
+ int perf_pmu__format_parse(char *dir, struct list_head *head);
++void perf_pmu__del_formats(struct list_head *formats);
+ 
+ struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
+ 

Reply via email to