]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 16:08:54 +0000 (18:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 16:08:54 +0000 (18:08 +0200)
added patches:
drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch
scsi-lpfc-fix-element-offset-in-__lpfc_sli_release_iocbq_s4.patch
scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch
scsi-lpfc-resolve-some-cleanup-issues-following-sli-path-refactoring.patch

queue-5.15/drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch [new file with mode: 0644]
queue-5.15/scsi-lpfc-fix-element-offset-in-__lpfc_sli_release_iocbq_s4.patch [new file with mode: 0644]
queue-5.15/scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch [new file with mode: 0644]
queue-5.15/scsi-lpfc-resolve-some-cleanup-issues-following-sli-path-refactoring.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch b/queue-5.15/drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch
new file mode 100644 (file)
index 0000000..e300260
--- /dev/null
@@ -0,0 +1,122 @@
+From d4ae66f10c8b9959dce1766d9a87070e567236eb Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime@cerno.tech>
+Date: Fri, 17 Sep 2021 20:09:25 +0200
+Subject: drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c
+
+From: Maxime Ripard <maxime@cerno.tech>
+
+commit d4ae66f10c8b9959dce1766d9a87070e567236eb upstream.
+
+By depending on devm_drm_panel_bridge_add(), devm_drm_of_get_bridge()
+introduces a circular dependency between the modules drm (where
+devm_drm_of_get_bridge() ends up) and drm_kms_helper (where
+devm_drm_panel_bridge_add() is).
+
+Fix this by moving devm_drm_of_get_bridge() to bridge/panel.c and thus
+drm_kms_helper.
+
+Fixes: 87ea95808d53 ("drm/bridge: Add a function to abstract away panels")
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+Tested-by: Heiko Stuebner <heiko@sntech.de>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20210917180925.2602266-1-maxime@cerno.tech
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/bridge/panel.c |   37 +++++++++++++++++++++++++++++++++++++
+ drivers/gpu/drm/drm_bridge.c   |   34 ----------------------------------
+ 2 files changed, 37 insertions(+), 34 deletions(-)
+
+--- a/drivers/gpu/drm/bridge/panel.c
++++ b/drivers/gpu/drm/bridge/panel.c
+@@ -9,6 +9,7 @@
+ #include <drm/drm_connector.h>
+ #include <drm/drm_encoder.h>
+ #include <drm/drm_modeset_helper_vtables.h>
++#include <drm/drm_of.h>
+ #include <drm/drm_panel.h>
+ #include <drm/drm_print.h>
+ #include <drm/drm_probe_helper.h>
+@@ -332,3 +333,39 @@ struct drm_connector *drm_panel_bridge_c
+       return &panel_bridge->connector;
+ }
+ EXPORT_SYMBOL(drm_panel_bridge_connector);
++
++#ifdef CONFIG_OF
++/**
++ * devm_drm_of_get_bridge - Return next bridge in the chain
++ * @dev: device to tie the bridge lifetime to
++ * @np: device tree node containing encoder output ports
++ * @port: port in the device tree node
++ * @endpoint: endpoint in the device tree node
++ *
++ * Given a DT node's port and endpoint number, finds the connected node
++ * and returns the associated bridge if any, or creates and returns a
++ * drm panel bridge instance if a panel is connected.
++ *
++ * Returns a pointer to the bridge if successful, or an error pointer
++ * otherwise.
++ */
++struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
++                                        struct device_node *np,
++                                        u32 port, u32 endpoint)
++{
++      struct drm_bridge *bridge;
++      struct drm_panel *panel;
++      int ret;
++
++      ret = drm_of_find_panel_or_bridge(np, port, endpoint,
++                                        &panel, &bridge);
++      if (ret)
++              return ERR_PTR(ret);
++
++      if (panel)
++              bridge = devm_drm_panel_bridge_add(dev, panel);
++
++      return bridge;
++}
++EXPORT_SYMBOL(devm_drm_of_get_bridge);
++#endif
+--- a/drivers/gpu/drm/drm_bridge.c
++++ b/drivers/gpu/drm/drm_bridge.c
+@@ -1232,40 +1232,6 @@ struct drm_bridge *of_drm_find_bridge(st
+       return NULL;
+ }
+ EXPORT_SYMBOL(of_drm_find_bridge);
+-
+-/**
+- * devm_drm_of_get_bridge - Return next bridge in the chain
+- * @dev: device to tie the bridge lifetime to
+- * @np: device tree node containing encoder output ports
+- * @port: port in the device tree node
+- * @endpoint: endpoint in the device tree node
+- *
+- * Given a DT node's port and endpoint number, finds the connected node
+- * and returns the associated bridge if any, or creates and returns a
+- * drm panel bridge instance if a panel is connected.
+- *
+- * Returns a pointer to the bridge if successful, or an error pointer
+- * otherwise.
+- */
+-struct drm_bridge *devm_drm_of_get_bridge(struct device *dev,
+-                                        struct device_node *np,
+-                                        u32 port, u32 endpoint)
+-{
+-      struct drm_bridge *bridge;
+-      struct drm_panel *panel;
+-      int ret;
+-
+-      ret = drm_of_find_panel_or_bridge(np, port, endpoint,
+-                                        &panel, &bridge);
+-      if (ret)
+-              return ERR_PTR(ret);
+-
+-      if (panel)
+-              bridge = devm_drm_panel_bridge_add(dev, panel);
+-
+-      return bridge;
+-}
+-EXPORT_SYMBOL(devm_drm_of_get_bridge);
+ #endif
+ MODULE_AUTHOR("Ajay Kumar <ajaykumar.rs@samsung.com>");
diff --git a/queue-5.15/scsi-lpfc-fix-element-offset-in-__lpfc_sli_release_iocbq_s4.patch b/queue-5.15/scsi-lpfc-fix-element-offset-in-__lpfc_sli_release_iocbq_s4.patch
new file mode 100644 (file)
index 0000000..fe13b06
--- /dev/null
@@ -0,0 +1,36 @@
+From 84c6f99e39074d45f75986e42ca28e27c140fd0d Mon Sep 17 00:00:00 2001
+From: James Smart <jsmart2021@gmail.com>
+Date: Thu, 5 May 2022 20:55:08 -0700
+Subject: scsi: lpfc: Fix element offset in __lpfc_sli_release_iocbq_s4()
+
+From: James Smart <jsmart2021@gmail.com>
+
+commit 84c6f99e39074d45f75986e42ca28e27c140fd0d upstream.
+
+The prior commit that moved from iocb elements to explicit wqe elements
+missed a name change.
+
+Correct __lpfc_sli_release_iocbq_s4() to reference wqe rather than iocb.
+
+Link: https://lore.kernel.org/r/20220506035519.50908-2-jsmart2021@gmail.com
+Fixes: a680a9298e7b ("scsi: lpfc: SLI path split: Refactor lpfc_iocbq")
+Co-developed-by: Justin Tee <justin.tee@broadcom.com>
+Signed-off-by: Justin Tee <justin.tee@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_sli.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -1384,7 +1384,7 @@ static void
+ __lpfc_sli_release_iocbq_s4(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
+ {
+       struct lpfc_sglq *sglq;
+-      size_t start_clean = offsetof(struct lpfc_iocbq, iocb);
++      size_t start_clean = offsetof(struct lpfc_iocbq, wqe);
+       unsigned long iflag = 0;
+       struct lpfc_sli_ring *pring;
diff --git a/queue-5.15/scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch b/queue-5.15/scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch
new file mode 100644 (file)
index 0000000..61b1704
--- /dev/null
@@ -0,0 +1,59 @@
+From c26bd6602e1d348bfa754dc55e5608c922dd2801 Mon Sep 17 00:00:00 2001
+From: James Smart <jsmart2021@gmail.com>
+Date: Wed, 23 Mar 2022 13:55:45 -0700
+Subject: scsi: lpfc: Fix locking for lpfc_sli_iocbq_lookup()
+
+From: James Smart <jsmart2021@gmail.com>
+
+commit c26bd6602e1d348bfa754dc55e5608c922dd2801 upstream.
+
+The rules changed for lpfc_sli_iocbq_lookup() vs locking. Prior, the
+routine properly took out the lock. In newly refactored code, the locks
+must be held when calling the routine.
+
+Fix lpfc_sli_process_sol_iocb() to take the locks before calling the
+routine.
+
+Fix lpfc_sli_handle_fast_ring_event() to not release the locks to call the
+routine.
+
+Link: https://lore.kernel.org/r/20220323205545.81814-3-jsmart2021@gmail.com
+Fixes: 1b64aa9eae28 ("scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4")
+Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.com>
+Signed-off-by: Dick Kennedy <dick.kennedy@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_sli.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -3642,7 +3642,15 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+       unsigned long iflag;
+       u32 ulp_command, ulp_status, ulp_word4, ulp_context, iotag;
++      if (phba->sli_rev == LPFC_SLI_REV4)
++              spin_lock_irqsave(&pring->ring_lock, iflag);
++      else
++              spin_lock_irqsave(&phba->hbalock, iflag);
+       cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq);
++      if (phba->sli_rev == LPFC_SLI_REV4)
++              spin_unlock_irqrestore(&pring->ring_lock, iflag);
++      else
++              spin_unlock_irqrestore(&phba->hbalock, iflag);
+       ulp_command = get_job_cmnd(phba, saveq);
+       ulp_status = get_job_ulpstatus(phba, saveq);
+@@ -3979,10 +3987,8 @@ lpfc_sli_handle_fast_ring_event(struct l
+                               break;
+                       }
+-                      spin_unlock_irqrestore(&phba->hbalock, iflag);
+                       cmdiocbq = lpfc_sli_iocbq_lookup(phba, pring,
+                                                        &rspiocbq);
+-                      spin_lock_irqsave(&phba->hbalock, iflag);
+                       if (unlikely(!cmdiocbq))
+                               break;
+                       if (cmdiocbq->cmd_flag & LPFC_DRIVER_ABORTED)
diff --git a/queue-5.15/scsi-lpfc-resolve-some-cleanup-issues-following-sli-path-refactoring.patch b/queue-5.15/scsi-lpfc-resolve-some-cleanup-issues-following-sli-path-refactoring.patch
new file mode 100644 (file)
index 0000000..e9ff1e6
--- /dev/null
@@ -0,0 +1,147 @@
+From e27f05147bff21408c1b8410ad8e90cd286e7952 Mon Sep 17 00:00:00 2001
+From: James Smart <jsmart2021@gmail.com>
+Date: Fri, 3 Jun 2022 10:43:23 -0700
+Subject: scsi: lpfc: Resolve some cleanup issues following SLI path refactoring
+
+From: James Smart <jsmart2021@gmail.com>
+
+commit e27f05147bff21408c1b8410ad8e90cd286e7952 upstream.
+
+Following refactoring and consolidation in SLI processing, fix up some
+minor issues related to SLI path:
+
+ - Correct the setting of LPFC_EXCHANGE_BUSY flag in response IOCB.
+
+ - Fix some typographical errors.
+
+ - Fix duplicate log messages.
+
+Link: https://lore.kernel.org/r/20220603174329.63777-4-jsmart2021@gmail.com
+Fixes: 1b64aa9eae28 ("scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4")
+Cc: <stable@vger.kernel.org> # v5.18
+Co-developed-by: Justin Tee <justin.tee@broadcom.com>
+Signed-off-by: Justin Tee <justin.tee@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_init.c |    2 +-
+ drivers/scsi/lpfc/lpfc_sli.c  |   25 ++++++++++++-------------
+ 2 files changed, 13 insertions(+), 14 deletions(-)
+
+--- a/drivers/scsi/lpfc/lpfc_init.c
++++ b/drivers/scsi/lpfc/lpfc_init.c
+@@ -11964,7 +11964,7 @@ lpfc_sli_enable_msi(struct lpfc_hba *phb
+       rc = pci_enable_msi(phba->pcidev);
+       if (!rc)
+               lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
+-                              "0462 PCI enable MSI mode success.\n");
++                              "0012 PCI enable MSI mode success.\n");
+       else {
+               lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
+                               "0471 PCI enable MSI mode failed (%d)\n", rc);
+--- a/drivers/scsi/lpfc/lpfc_sli.c
++++ b/drivers/scsi/lpfc/lpfc_sli.c
+@@ -1939,7 +1939,7 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba
+       sync_buf = __lpfc_sli_get_iocbq(phba);
+       if (!sync_buf) {
+               lpfc_printf_log(phba, KERN_ERR, LOG_CGN_MGMT,
+-                              "6213 No available WQEs for CMF_SYNC_WQE\n");
++                              "6244 No available WQEs for CMF_SYNC_WQE\n");
+               ret_val = ENOMEM;
+               goto out_unlock;
+       }
+@@ -3737,7 +3737,7 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+                                               set_job_ulpword4(cmdiocbp,
+                                                                IOERR_ABORT_REQUESTED);
+                                               /*
+-                                               * For SLI4, irsiocb contains
++                                               * For SLI4, irspiocb contains
+                                                * NO_XRI in sli_xritag, it
+                                                * shall not affect releasing
+                                                * sgl (xri) process.
+@@ -3755,7 +3755,7 @@ lpfc_sli_process_sol_iocb(struct lpfc_hb
+                                       }
+                               }
+                       }
+-                      (cmdiocbp->cmd_cmpl) (phba, cmdiocbp, saveq);
++                      cmdiocbp->cmd_cmpl(phba, cmdiocbp, saveq);
+               } else
+                       lpfc_sli_release_iocbq(phba, cmdiocbp);
+       } else {
+@@ -3995,8 +3995,7 @@ lpfc_sli_handle_fast_ring_event(struct l
+                               cmdiocbq->cmd_flag &= ~LPFC_DRIVER_ABORTED;
+                       if (cmdiocbq->cmd_cmpl) {
+                               spin_unlock_irqrestore(&phba->hbalock, iflag);
+-                              (cmdiocbq->cmd_cmpl)(phba, cmdiocbq,
+-                                                    &rspiocbq);
++                              cmdiocbq->cmd_cmpl(phba, cmdiocbq, &rspiocbq);
+                               spin_lock_irqsave(&phba->hbalock, iflag);
+                       }
+                       break;
+@@ -10936,7 +10935,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba
+  * @flag: Flag indicating if this command can be put into txq.
+  *
+  * __lpfc_sli_issue_fcp_io_s3 is wrapper function to invoke lockless func to
+- * send  an iocb command to an HBA with SLI-4 interface spec.
++ * send  an iocb command to an HBA with SLI-3 interface spec.
+  *
+  * This function takes the hbalock before invoking the lockless version.
+  * The function will return success after it successfully submit the wqe to
+@@ -12989,7 +12988,7 @@ lpfc_sli_wake_iocb_wait(struct lpfc_hba
+               cmdiocbq->cmd_cmpl = cmdiocbq->wait_cmd_cmpl;
+               cmdiocbq->wait_cmd_cmpl = NULL;
+               if (cmdiocbq->cmd_cmpl)
+-                      (cmdiocbq->cmd_cmpl)(phba, cmdiocbq, NULL);
++                      cmdiocbq->cmd_cmpl(phba, cmdiocbq, NULL);
+               else
+                       lpfc_sli_release_iocbq(phba, cmdiocbq);
+               return;
+@@ -13003,9 +13002,9 @@ lpfc_sli_wake_iocb_wait(struct lpfc_hba
+       /* Set the exchange busy flag for task management commands */
+       if ((cmdiocbq->cmd_flag & LPFC_IO_FCP) &&
+-              !(cmdiocbq->cmd_flag & LPFC_IO_LIBDFC)) {
++          !(cmdiocbq->cmd_flag & LPFC_IO_LIBDFC)) {
+               lpfc_cmd = container_of(cmdiocbq, struct lpfc_io_buf,
+-                      cur_iocbq);
++                                      cur_iocbq);
+               if (rspiocbq && (rspiocbq->cmd_flag & LPFC_EXCHANGE_BUSY))
+                       lpfc_cmd->flags |= LPFC_SBUF_XBUSY;
+               else
+@@ -14143,7 +14142,7 @@ void lpfc_sli4_els_xri_abort_event_proc(
+  * @irspiocbq: Pointer to work-queue completion queue entry.
+  *
+  * This routine handles an ELS work-queue completion event and construct
+- * a pseudo response ELS IODBQ from the SLI4 ELS WCQE for the common
++ * a pseudo response ELS IOCBQ from the SLI4 ELS WCQE for the common
+  * discovery engine to handle.
+  *
+  * Return: Pointer to the receive IOCBQ, NULL otherwise.
+@@ -14187,7 +14186,7 @@ lpfc_sli4_els_preprocess_rspiocbq(struct
+       if (bf_get(lpfc_wcqe_c_xb, wcqe)) {
+               spin_lock_irqsave(&phba->hbalock, iflags);
+-              cmdiocbq->cmd_flag |= LPFC_EXCHANGE_BUSY;
++              irspiocbq->cmd_flag |= LPFC_EXCHANGE_BUSY;
+               spin_unlock_irqrestore(&phba->hbalock, iflags);
+       }
+@@ -15046,7 +15045,7 @@ lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc
+               /* Pass the cmd_iocb and the wcqe to the upper layer */
+               memcpy(&cmdiocbq->wcqe_cmpl, wcqe,
+                      sizeof(struct lpfc_wcqe_complete));
+-              (cmdiocbq->cmd_cmpl)(phba, cmdiocbq, cmdiocbq);
++              cmdiocbq->cmd_cmpl(phba, cmdiocbq, cmdiocbq);
+       } else {
+               lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
+                               "0375 FCP cmdiocb not callback function "
+@@ -19210,7 +19209,7 @@ lpfc_sli4_send_seq_to_ulp(struct lpfc_vp
+       /* Free iocb created in lpfc_prep_seq */
+       list_for_each_entry_safe(curr_iocb, next_iocb,
+-              &iocbq->list, list) {
++                               &iocbq->list, list) {
+               list_del_init(&curr_iocb->list);
+               lpfc_sli_release_iocbq(phba, curr_iocb);
+       }
index 39c2d363ae7262aaeed53e1d3eaf034afd8610cb..08f7787c782db2f3613f4aaf9596e84251a38c46 100644 (file)
@@ -774,3 +774,7 @@ drm-meson-fix-refcount-leak-in-meson_encoder_hdmi_init.patch
 io_uring-mem-account-pbuf-buckets.patch
 revert-net-usb-ax88179_178a-needs-flag_send_zlp.patch
 bluetooth-l2cap-fix-l2cap_global_chan_by_psm-regression.patch
+drm-bridge-move-devm_drm_of_get_bridge-to-bridge-panel.c.patch
+scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch
+scsi-lpfc-fix-element-offset-in-__lpfc_sli_release_iocbq_s4.patch
+scsi-lpfc-resolve-some-cleanup-issues-following-sli-path-refactoring.patch