]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Dec 2021 12:32:25 +0000 (13:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Dec 2021 12:32:25 +0000 (13:32 +0100)
added patches:
drm-amd-display-allow-dsc-on-supported-mst-branch-devices.patch
drm-i915-dp-perform-30ms-delay-after-source-oui-write.patch
ipv6-fix-memory-leak-in-fib6_rule_suppress.patch
kvm-disallow-user-memslot-with-size-that-exceeds-unsigned-long.patch
kvm-fix-avic_set_running-for-preemptable-kernels.patch
scsi-lpfc-fix-non-recovery-of-remote-ports-following-an-unsolicited-logo.patch
scsi-ufs-ufs-pci-add-support-for-intel-adl.patch

queue-5.15/drm-amd-display-allow-dsc-on-supported-mst-branch-devices.patch [new file with mode: 0644]
queue-5.15/drm-i915-dp-perform-30ms-delay-after-source-oui-write.patch [new file with mode: 0644]
queue-5.15/ipv6-fix-memory-leak-in-fib6_rule_suppress.patch [new file with mode: 0644]
queue-5.15/kvm-disallow-user-memslot-with-size-that-exceeds-unsigned-long.patch [new file with mode: 0644]
queue-5.15/kvm-fix-avic_set_running-for-preemptable-kernels.patch [new file with mode: 0644]
queue-5.15/scsi-lpfc-fix-non-recovery-of-remote-ports-following-an-unsolicited-logo.patch [new file with mode: 0644]
queue-5.15/scsi-ufs-ufs-pci-add-support-for-intel-adl.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-amd-display-allow-dsc-on-supported-mst-branch-devices.patch b/queue-5.15/drm-amd-display-allow-dsc-on-supported-mst-branch-devices.patch
new file mode 100644 (file)
index 0000000..f4fe059
--- /dev/null
@@ -0,0 +1,83 @@
+From 94ebc035456a4ccacfbbef60c444079a256623ad Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Fri, 12 Nov 2021 15:27:32 -0500
+Subject: drm/amd/display: Allow DSC on supported MST branch devices
+
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+
+commit 94ebc035456a4ccacfbbef60c444079a256623ad upstream.
+
+[Why]
+When trying to lightup two 4k60 non-DSC displays behind a branch device
+that supports DSC we can't lightup both at once due to bandwidth
+limitations - each requires 48 VCPI slots but we only have 63.
+
+[How]
+The workaround already exists in the code but is guarded by a CONFIG
+that cannot be set by the user and shouldn't need to be.
+
+Check for specific branch device IDs to device whether to enable
+the workaround for multiple display scenarios.
+
+Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c |   20 +++++++++---
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+@@ -36,6 +36,8 @@
+ #include "dm_helpers.h"
+ #include "dc_link_ddc.h"
++#include "ddc_service_types.h"
++#include "dpcd_defs.h"
+ #include "i2caux_interface.h"
+ #include "dmub_cmd.h"
+@@ -155,6 +157,16 @@ static const struct drm_connector_funcs
+ };
+ #if defined(CONFIG_DRM_AMD_DC_DCN)
++static bool needs_dsc_aux_workaround(struct dc_link *link)
++{
++      if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_90CC24 &&
++          (link->dpcd_caps.dpcd_rev.raw == DPCD_REV_14 || link->dpcd_caps.dpcd_rev.raw == DPCD_REV_12) &&
++          link->dpcd_caps.sink_count.bits.SINK_COUNT >= 2)
++              return true;
++
++      return false;
++}
++
+ static bool validate_dsc_caps_on_connector(struct amdgpu_dm_connector *aconnector)
+ {
+       struct dc_sink *dc_sink = aconnector->dc_sink;
+@@ -164,7 +176,7 @@ static bool validate_dsc_caps_on_connect
+       u8 *dsc_branch_dec_caps = NULL;
+       aconnector->dsc_aux = drm_dp_mst_dsc_aux_for_port(port);
+-#if defined(CONFIG_HP_HOOK_WORKAROUND)
++
+       /*
+        * drm_dp_mst_dsc_aux_for_port() will return NULL for certain configs
+        * because it only check the dsc/fec caps of the "port variable" and not the dock
+@@ -174,10 +186,10 @@ static bool validate_dsc_caps_on_connect
+        * Workaround: explicitly check the use case above and use the mst dock's aux as dsc_aux
+        *
+        */
+-
+-      if (!aconnector->dsc_aux && !port->parent->port_parent)
++      if (!aconnector->dsc_aux && !port->parent->port_parent &&
++          needs_dsc_aux_workaround(aconnector->dc_link))
+               aconnector->dsc_aux = &aconnector->mst_port->dm_dp_aux.aux;
+-#endif
++
+       if (!aconnector->dsc_aux)
+               return false;
diff --git a/queue-5.15/drm-i915-dp-perform-30ms-delay-after-source-oui-write.patch b/queue-5.15/drm-i915-dp-perform-30ms-delay-after-source-oui-write.patch
new file mode 100644 (file)
index 0000000..f828d63
--- /dev/null
@@ -0,0 +1,131 @@
+From a44f42ba7f1ad7d3c17bc7d91013fe814a53c5dc Mon Sep 17 00:00:00 2001
+From: Lyude Paul <lyude@redhat.com>
+Date: Tue, 30 Nov 2021 16:29:09 -0500
+Subject: drm/i915/dp: Perform 30ms delay after source OUI write
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Lyude Paul <lyude@redhat.com>
+
+commit a44f42ba7f1ad7d3c17bc7d91013fe814a53c5dc upstream.
+
+While working on supporting the Intel HDR backlight interface, I noticed
+that there's a couple of laptops that will very rarely manage to boot up
+without detecting Intel HDR backlight support - even though it's supported
+on the system. One example of such a laptop is the Lenovo P17 1st
+generation.
+
+Following some investigation Ville Syrjälä did through the docs they have
+available to them, they discovered that there's actually supposed to be a
+30ms wait after writing the source OUI before we begin setting up the rest
+of the backlight interface.
+
+This seems to be correct, as adding this 30ms delay seems to have
+completely fixed the probing issues I was previously seeing. So - let's
+start performing a 30ms wait after writing the OUI, which we do in a manner
+similar to how we keep track of PPS delays (e.g. record the timestamp of
+the OUI write, and then wait for however many ms are left since that
+timestamp right before we interact with the backlight) in order to avoid
+waiting any longer then we need to. As well, this also avoids us performing
+this delay on systems where we don't end up using the HDR backlight
+interface.
+
+V3:
+* Move last_oui_write into intel_dp
+V2:
+* Move panel delays into intel_pps
+
+Signed-off-by: Lyude Paul <lyude@redhat.com>
+Reviewed-by: Jani Nikula <jani.nikula@intel.com>
+Fixes: 4a8d79901d5b ("drm/i915/dp: Enable Intel's HDR backlight interface (only SDR for now)")
+Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Cc: <stable@vger.kernel.org> # v5.12+
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20211130212912.212044-1-lyude@redhat.com
+(cherry picked from commit c7c90b0b8418a97d3aa8b39aae1992908948efad)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/display/intel_display_types.h    |    3 +++
+ drivers/gpu/drm/i915/display/intel_dp.c               |   11 +++++++++++
+ drivers/gpu/drm/i915/display/intel_dp.h               |    2 ++
+ drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c |    5 +++++
+ 4 files changed, 21 insertions(+)
+
+--- a/drivers/gpu/drm/i915/display/intel_display_types.h
++++ b/drivers/gpu/drm/i915/display/intel_display_types.h
+@@ -1639,6 +1639,9 @@ struct intel_dp {
+       struct intel_dp_pcon_frl frl;
+       struct intel_psr psr;
++
++      /* When we last wrote the OUI for eDP */
++      unsigned long last_oui_write;
+ };
+ enum lspcon_vendor {
+--- a/drivers/gpu/drm/i915/display/intel_dp.c
++++ b/drivers/gpu/drm/i915/display/intel_dp.c
+@@ -29,6 +29,7 @@
+ #include <linux/i2c.h>
+ #include <linux/notifier.h>
+ #include <linux/slab.h>
++#include <linux/timekeeping.h>
+ #include <linux/types.h>
+ #include <asm/byteorder.h>
+@@ -1864,6 +1865,16 @@ intel_edp_init_source_oui(struct intel_d
+       if (drm_dp_dpcd_write(&intel_dp->aux, DP_SOURCE_OUI, oui, sizeof(oui)) < 0)
+               drm_err(&i915->drm, "Failed to write source OUI\n");
++
++      intel_dp->last_oui_write = jiffies;
++}
++
++void intel_dp_wait_source_oui(struct intel_dp *intel_dp)
++{
++      struct drm_i915_private *i915 = dp_to_i915(intel_dp);
++
++      drm_dbg_kms(&i915->drm, "Performing OUI wait\n");
++      wait_remaining_ms_from_jiffies(intel_dp->last_oui_write, 30);
+ }
+ /* If the device supports it, try to set the power state appropriately */
+--- a/drivers/gpu/drm/i915/display/intel_dp.h
++++ b/drivers/gpu/drm/i915/display/intel_dp.h
+@@ -129,4 +129,6 @@ void intel_dp_pcon_dsc_configure(struct
+                                const struct intel_crtc_state *crtc_state);
+ void intel_dp_phy_test(struct intel_encoder *encoder);
++void intel_dp_wait_source_oui(struct intel_dp *intel_dp);
++
+ #endif /* __INTEL_DP_H__ */
+--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
++++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+@@ -35,6 +35,7 @@
+  */
+ #include "intel_display_types.h"
++#include "intel_dp.h"
+ #include "intel_dp_aux_backlight.h"
+ #include "intel_panel.h"
+@@ -106,6 +107,8 @@ intel_dp_aux_supports_hdr_backlight(stru
+       int ret;
+       u8 tcon_cap[4];
++      intel_dp_wait_source_oui(intel_dp);
++
+       ret = drm_dp_dpcd_read(aux, INTEL_EDP_HDR_TCON_CAP0, tcon_cap, sizeof(tcon_cap));
+       if (ret != sizeof(tcon_cap))
+               return false;
+@@ -204,6 +207,8 @@ intel_dp_aux_hdr_enable_backlight(const
+       int ret;
+       u8 old_ctrl, ctrl;
++      intel_dp_wait_source_oui(intel_dp);
++
+       ret = drm_dp_dpcd_readb(&intel_dp->aux, INTEL_EDP_HDR_GETSET_CTRL_PARAMS, &old_ctrl);
+       if (ret != 1) {
+               drm_err(&i915->drm, "Failed to read current backlight control mode: %d\n", ret);
diff --git a/queue-5.15/ipv6-fix-memory-leak-in-fib6_rule_suppress.patch b/queue-5.15/ipv6-fix-memory-leak-in-fib6_rule_suppress.patch
new file mode 100644 (file)
index 0000000..1618cbd
--- /dev/null
@@ -0,0 +1,118 @@
+From cdef485217d30382f3bf6448c54b4401648fe3f1 Mon Sep 17 00:00:00 2001
+From: msizanoen1 <msizanoen@qtmlabs.xyz>
+Date: Tue, 23 Nov 2021 13:48:32 +0100
+Subject: ipv6: fix memory leak in fib6_rule_suppress
+
+From: msizanoen1 <msizanoen@qtmlabs.xyz>
+
+commit cdef485217d30382f3bf6448c54b4401648fe3f1 upstream.
+
+The kernel leaks memory when a `fib` rule is present in IPv6 nftables
+firewall rules and a suppress_prefix rule is present in the IPv6 routing
+rules (used by certain tools such as wg-quick). In such scenarios, every
+incoming packet will leak an allocation in `ip6_dst_cache` slab cache.
+
+After some hours of `bpftrace`-ing and source code reading, I tracked
+down the issue to ca7a03c41753 ("ipv6: do not free rt if
+FIB_LOOKUP_NOREF is set on suppress rule").
+
+The problem with that change is that the generic `args->flags` always have
+`FIB_LOOKUP_NOREF` set[1][2] but the IPv6-specific flag
+`RT6_LOOKUP_F_DST_NOREF` might not be, leading to `fib6_rule_suppress` not
+decreasing the refcount when needed.
+
+How to reproduce:
+ - Add the following nftables rule to a prerouting chain:
+     meta nfproto ipv6 fib saddr . mark . iif oif missing drop
+   This can be done with:
+     sudo nft create table inet test
+     sudo nft create chain inet test test_chain '{ type filter hook prerouting priority filter + 10; policy accept; }'
+     sudo nft add rule inet test test_chain meta nfproto ipv6 fib saddr . mark . iif oif missing drop
+ - Run:
+     sudo ip -6 rule add table main suppress_prefixlength 0
+ - Watch `sudo slabtop -o | grep ip6_dst_cache` to see memory usage increase
+   with every incoming ipv6 packet.
+
+This patch exposes the protocol-specific flags to the protocol
+specific `suppress` function, and check the protocol-specific `flags`
+argument for RT6_LOOKUP_F_DST_NOREF instead of the generic
+FIB_LOOKUP_NOREF when decreasing the refcount, like this.
+
+[1]: https://github.com/torvalds/linux/blob/ca7a03c4175366a92cee0ccc4fec0038c3266e26/net/ipv6/fib6_rules.c#L71
+[2]: https://github.com/torvalds/linux/blob/ca7a03c4175366a92cee0ccc4fec0038c3266e26/net/ipv6/fib6_rules.c#L99
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=215105
+Fixes: ca7a03c41753 ("ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule")
+Cc: stable@vger.kernel.org
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/fib_rules.h |    4 +++-
+ net/core/fib_rules.c    |    2 +-
+ net/ipv4/fib_rules.c    |    1 +
+ net/ipv6/fib6_rules.c   |    4 ++--
+ 4 files changed, 7 insertions(+), 4 deletions(-)
+
+--- a/include/net/fib_rules.h
++++ b/include/net/fib_rules.h
+@@ -69,7 +69,7 @@ struct fib_rules_ops {
+       int                     (*action)(struct fib_rule *,
+                                         struct flowi *, int,
+                                         struct fib_lookup_arg *);
+-      bool                    (*suppress)(struct fib_rule *,
++      bool                    (*suppress)(struct fib_rule *, int,
+                                           struct fib_lookup_arg *);
+       int                     (*match)(struct fib_rule *,
+                                        struct flowi *, int);
+@@ -218,7 +218,9 @@ INDIRECT_CALLABLE_DECLARE(int fib4_rule_
+                           struct fib_lookup_arg *arg));
+ INDIRECT_CALLABLE_DECLARE(bool fib6_rule_suppress(struct fib_rule *rule,
++                                              int flags,
+                                               struct fib_lookup_arg *arg));
+ INDIRECT_CALLABLE_DECLARE(bool fib4_rule_suppress(struct fib_rule *rule,
++                                              int flags,
+                                               struct fib_lookup_arg *arg));
+ #endif
+--- a/net/core/fib_rules.c
++++ b/net/core/fib_rules.c
+@@ -323,7 +323,7 @@ jumped:
+               if (!err && ops->suppress && INDIRECT_CALL_MT(ops->suppress,
+                                                             fib6_rule_suppress,
+                                                             fib4_rule_suppress,
+-                                                            rule, arg))
++                                                            rule, flags, arg))
+                       continue;
+               if (err != -EAGAIN) {
+--- a/net/ipv4/fib_rules.c
++++ b/net/ipv4/fib_rules.c
+@@ -141,6 +141,7 @@ INDIRECT_CALLABLE_SCOPE int fib4_rule_ac
+ }
+ INDIRECT_CALLABLE_SCOPE bool fib4_rule_suppress(struct fib_rule *rule,
++                                              int flags,
+                                               struct fib_lookup_arg *arg)
+ {
+       struct fib_result *result = (struct fib_result *) arg->result;
+--- a/net/ipv6/fib6_rules.c
++++ b/net/ipv6/fib6_rules.c
+@@ -267,6 +267,7 @@ INDIRECT_CALLABLE_SCOPE int fib6_rule_ac
+ }
+ INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
++                                              int flags,
+                                               struct fib_lookup_arg *arg)
+ {
+       struct fib6_result *res = arg->result;
+@@ -294,8 +295,7 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_s
+       return false;
+ suppress_route:
+-      if (!(arg->flags & FIB_LOOKUP_NOREF))
+-              ip6_rt_put(rt);
++      ip6_rt_put_flags(rt, flags);
+       return true;
+ }
diff --git a/queue-5.15/kvm-disallow-user-memslot-with-size-that-exceeds-unsigned-long.patch b/queue-5.15/kvm-disallow-user-memslot-with-size-that-exceeds-unsigned-long.patch
new file mode 100644 (file)
index 0000000..24e0c0f
--- /dev/null
@@ -0,0 +1,43 @@
+From 6b285a5587506bae084cf9a3ed5aa491d623b91b Mon Sep 17 00:00:00 2001
+From: Sean Christopherson <seanjc@google.com>
+Date: Thu, 4 Nov 2021 00:25:03 +0000
+Subject: KVM: Disallow user memslot with size that exceeds "unsigned long"
+
+From: Sean Christopherson <seanjc@google.com>
+
+commit 6b285a5587506bae084cf9a3ed5aa491d623b91b upstream.
+
+Reject userspace memslots whose size exceeds the storage capacity of an
+"unsigned long".  KVM's uAPI takes the size as u64 to support large slots
+on 64-bit hosts, but does not account for the size being truncated on
+32-bit hosts in various flows.  The access_ok() check on the userspace
+virtual address in particular casts the size to "unsigned long" and will
+check the wrong number of bytes.
+
+KVM doesn't actually support slots whose size doesn't fit in an "unsigned
+long", e.g. KVM's internal kvm_memory_slot.npages is an "unsigned long",
+not a "u64", and misc arch specific code follows that behavior.
+
+Fixes: fa3d315a4ce2 ("KVM: Validate userspace_addr of memslot when registered")
+Cc: stable@vger.kernel.org
+Signed-off-by: Sean Christopherson <seanjc@google.com>
+Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
+Message-Id: <20211104002531.1176691-3-seanjc@google.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ virt/kvm/kvm_main.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/virt/kvm/kvm_main.c
++++ b/virt/kvm/kvm_main.c
+@@ -1664,7 +1664,8 @@ int __kvm_set_memory_region(struct kvm *
+       id = (u16)mem->slot;
+       /* General sanity checks */
+-      if (mem->memory_size & (PAGE_SIZE - 1))
++      if ((mem->memory_size & (PAGE_SIZE - 1)) ||
++          (mem->memory_size != (unsigned long)mem->memory_size))
+               return -EINVAL;
+       if (mem->guest_phys_addr & (PAGE_SIZE - 1))
+               return -EINVAL;
diff --git a/queue-5.15/kvm-fix-avic_set_running-for-preemptable-kernels.patch b/queue-5.15/kvm-fix-avic_set_running-for-preemptable-kernels.patch
new file mode 100644 (file)
index 0000000..5533960
--- /dev/null
@@ -0,0 +1,53 @@
+From 7cfc5c653b07782e7059527df8dc1e3143a7591e Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Tue, 30 Nov 2021 03:46:07 -0500
+Subject: KVM: fix avic_set_running for preemptable kernels
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit 7cfc5c653b07782e7059527df8dc1e3143a7591e upstream.
+
+avic_set_running() passes the current CPU to avic_vcpu_load(), albeit
+via vcpu->cpu rather than smp_processor_id().  If the thread is migrated
+while avic_set_running runs, the call to avic_vcpu_load() can use a stale
+value for the processor id.  Avoid this by blocking preemption over the
+entire execution of avic_set_running().
+
+Reported-by: Sean Christopherson <seanjc@google.com>
+Fixes: 8221c1370056 ("svm: Manage vcpu load/unload when enable AVIC")
+Cc: stable@vger.kernel.org
+Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kvm/svm/avic.c |   16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+--- a/arch/x86/kvm/svm/avic.c
++++ b/arch/x86/kvm/svm/avic.c
+@@ -988,16 +988,18 @@ void avic_vcpu_put(struct kvm_vcpu *vcpu
+ static void avic_set_running(struct kvm_vcpu *vcpu, bool is_run)
+ {
+       struct vcpu_svm *svm = to_svm(vcpu);
++      int cpu = get_cpu();
++      WARN_ON(cpu != vcpu->cpu);
+       svm->avic_is_running = is_run;
+-      if (!kvm_vcpu_apicv_active(vcpu))
+-              return;
+-
+-      if (is_run)
+-              avic_vcpu_load(vcpu, vcpu->cpu);
+-      else
+-              avic_vcpu_put(vcpu);
++      if (kvm_vcpu_apicv_active(vcpu)) {
++              if (is_run)
++                      avic_vcpu_load(vcpu, cpu);
++              else
++                      avic_vcpu_put(vcpu);
++      }
++      put_cpu();
+ }
+ void svm_vcpu_blocking(struct kvm_vcpu *vcpu)
diff --git a/queue-5.15/scsi-lpfc-fix-non-recovery-of-remote-ports-following-an-unsolicited-logo.patch b/queue-5.15/scsi-lpfc-fix-non-recovery-of-remote-ports-following-an-unsolicited-logo.patch
new file mode 100644 (file)
index 0000000..e9985af
--- /dev/null
@@ -0,0 +1,55 @@
+From 0956ba63bd94355bf38cd40f7eb9104577739ab8 Mon Sep 17 00:00:00 2001
+From: James Smart <jsmart2021@gmail.com>
+Date: Tue, 23 Nov 2021 08:56:46 -0800
+Subject: scsi: lpfc: Fix non-recovery of remote ports following an unsolicited LOGO
+
+From: James Smart <jsmart2021@gmail.com>
+
+commit 0956ba63bd94355bf38cd40f7eb9104577739ab8 upstream.
+
+A commit introduced formal regstration of all Fabric nodes to the SCSI
+transport as well as REG/UNREG RPI mailbox requests. The commit introduced
+the NLP_RELEASE_RPI flag for rports set in the lpfc_cmpl_els_logo_acc()
+routine to help clean up the RPIs. This new code caused the driver to
+release the RPI value used for the remote port and marked the RPI invalid.
+When the driver later attempted to re-login, it would use the invalid RPI
+and the adapter rejected the PLOGI request.  As no login occurred, the
+devloss timer on the rport expired and connectivity was lost.
+
+This patch corrects the code by removing the snippet that requests the rpi
+to be unregistered. This change only occurs on a node that is already
+marked to be rediscovered. This puts the code back to its original
+behavior, preserving the already-assigned rpi value (registered or not)
+which can be used on the re-login attempts.
+
+Link: https://lore.kernel.org/r/20211123165646.62740-1-jsmart2021@gmail.com
+Fixes: fe83e3b9b422 ("scsi: lpfc: Fix node handling for Fabric Controller and Domain Controller")
+Cc: <stable@vger.kernel.org> # v5.14+
+Co-developed-by: Paul Ely <paul.ely@broadcom.com>
+Signed-off-by: Paul Ely <paul.ely@broadcom.com>
+Signed-off-by: James Smart <jsmart2021@gmail.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/lpfc/lpfc_els.c |    9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+--- a/drivers/scsi/lpfc/lpfc_els.c
++++ b/drivers/scsi/lpfc/lpfc_els.c
+@@ -5075,14 +5075,9 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *
+               /* NPort Recovery mode or node is just allocated */
+               if (!lpfc_nlp_not_used(ndlp)) {
+                       /* A LOGO is completing and the node is in NPR state.
+-                       * If this a fabric node that cleared its transport
+-                       * registration, release the rpi.
++                       * Just unregister the RPI because the node is still
++                       * required.
+                        */
+-                      spin_lock_irq(&ndlp->lock);
+-                      ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
+-                      if (phba->sli_rev == LPFC_SLI_REV4)
+-                              ndlp->nlp_flag |= NLP_RELEASE_RPI;
+-                      spin_unlock_irq(&ndlp->lock);
+                       lpfc_unreg_rpi(vport, ndlp);
+               } else {
+                       /* Indicate the node has already released, should
diff --git a/queue-5.15/scsi-ufs-ufs-pci-add-support-for-intel-adl.patch b/queue-5.15/scsi-ufs-ufs-pci-add-support-for-intel-adl.patch
new file mode 100644 (file)
index 0000000..7a1358a
--- /dev/null
@@ -0,0 +1,62 @@
+From 7dc9fb47bc9a95f1cc6c5655341860c5e50f91d4 Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Wed, 24 Nov 2021 22:42:18 +0200
+Subject: scsi: ufs: ufs-pci: Add support for Intel ADL
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit 7dc9fb47bc9a95f1cc6c5655341860c5e50f91d4 upstream.
+
+Add PCI ID and callbacks to support Intel Alder Lake.
+
+Link: https://lore.kernel.org/r/20211124204218.1784559-1-adrian.hunter@intel.com
+Cc: stable@vger.kernel.org # v5.15+
+Reviewed-by: Bart Van Assche <bvanassche@acm.org>
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/ufs/ufshcd-pci.c |   18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/drivers/scsi/ufs/ufshcd-pci.c
++++ b/drivers/scsi/ufs/ufshcd-pci.c
+@@ -421,6 +421,13 @@ static int ufs_intel_lkf_init(struct ufs
+       return err;
+ }
++static int ufs_intel_adl_init(struct ufs_hba *hba)
++{
++      hba->nop_out_timeout = 200;
++      hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
++      return ufs_intel_common_init(hba);
++}
++
+ static struct ufs_hba_variant_ops ufs_intel_cnl_hba_vops = {
+       .name                   = "intel-pci",
+       .init                   = ufs_intel_common_init,
+@@ -449,6 +456,15 @@ static struct ufs_hba_variant_ops ufs_in
+       .device_reset           = ufs_intel_device_reset,
+ };
++static struct ufs_hba_variant_ops ufs_intel_adl_hba_vops = {
++      .name                   = "intel-pci",
++      .init                   = ufs_intel_adl_init,
++      .exit                   = ufs_intel_common_exit,
++      .link_startup_notify    = ufs_intel_link_startup_notify,
++      .resume                 = ufs_intel_resume,
++      .device_reset           = ufs_intel_device_reset,
++};
++
+ #ifdef CONFIG_PM_SLEEP
+ static int ufshcd_pci_restore(struct device *dev)
+ {
+@@ -563,6 +579,8 @@ static const struct pci_device_id ufshcd
+       { PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
+       { PCI_VDEVICE(INTEL, 0x4B43), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
+       { PCI_VDEVICE(INTEL, 0x98FA), (kernel_ulong_t)&ufs_intel_lkf_hba_vops },
++      { PCI_VDEVICE(INTEL, 0x51FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
++      { PCI_VDEVICE(INTEL, 0x54FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
+       { }     /* terminate list */
+ };
index fbb6055d93d698c3312da49257695ac443eacd16..acce4ac1dd2a40ab87b0968c79596e4442f599ce 100644 (file)
@@ -62,3 +62,10 @@ s390-pci-move-pseudo-mmio-to-prevent-mio-overlap.patch
 fget-check-that-the-fd-still-exists-after-getting-a-ref-to-it.patch
 sata_fsl-fix-uaf-in-sata_fsl_port_stop-when-rmmod-sata_fsl.patch
 sata_fsl-fix-warning-in-remove_proc_entry-when-rmmod-sata_fsl.patch
+scsi-lpfc-fix-non-recovery-of-remote-ports-following-an-unsolicited-logo.patch
+scsi-ufs-ufs-pci-add-support-for-intel-adl.patch
+ipv6-fix-memory-leak-in-fib6_rule_suppress.patch
+drm-amd-display-allow-dsc-on-supported-mst-branch-devices.patch
+drm-i915-dp-perform-30ms-delay-after-source-oui-write.patch
+kvm-fix-avic_set_running-for-preemptable-kernels.patch
+kvm-disallow-user-memslot-with-size-that-exceeds-unsigned-long.patch