[SRU][Bionic][PATCH 0/2] Fixes for LP:1768103

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 0/2] Fixes for LP:1768103

Joseph Salisbury-3
BugLink: http://bugs.launchpad.net/bugs/1768103

== SRU Justification ==
It was reported by Broadcom that an early asic model (A0) of their 16/32GB
HBA's doesn't boot with the lpfc driver in Ubuntu 18.04.

Bionic with the lpfc driver 12.0.0.0 can't see LPe16002-M6 but can see LPe16002B-M6.

This bug is fixed by commits bf316c78517d and c221768bd49a, which are
both still in linux-next.  Broadcom tested with this two commits and
confirmed they resolve the bug and allow the system to boot.

== Fixes ==
Currently in linux-next:
bf316c78517d ("scsi: lpfc: Fix WQ/CQ creation for older asic's.")
c221768bd49a ("scsi: lpfc: Fix 16gb hbas failing cq create.")

== Regression Potential ==
Low.  Patches fix a current regression and are limited to lpfc.

== Test Case ==
A test kernel was built with these patches and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.


James Smart (2):
  scsi: lpfc: Fix WQ/CQ creation for older asic's.
  scsi: lpfc: Fix 16gb hbas failing cq create.

 drivers/scsi/lpfc/lpfc_hw4.h  | 1 +
 drivers/scsi/lpfc/lpfc_init.c | 8 ++++++++
 2 files changed, 9 insertions(+)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/2] [PATCH] scsi: lpfc: Fix WQ/CQ creation for older asic's.

Joseph Salisbury-3
From: James Smart <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1768103

The patch to enlarge WQ/CQ creation keys off of an adapter response that
indicates support for the larger values. Older adapters return an
incorrect response and are limited in size.  Thus the adapters fail the
WQ creation steps.

Augment the WQ sizing checks with a check on the older adapter types and
limit them to the restricted sizes.

Fixes: c176ffa0841c ("scsi: lpfc: Increase CQ and WQ sizes for SCSI")
Signed-off-by: Dick Kennedy <[hidden email]>
Signed-off-by: James Smart <[hidden email]>
Reviewed-by: Hannes Reinecke <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from linux-next commit bf316c78517d9437656293f65a70d6ecdc2ec58e)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/scsi/lpfc/lpfc_hw4.h  | 12 ++++++++++++
 drivers/scsi/lpfc/lpfc_init.c | 15 +++++++++++++++
 drivers/scsi/lpfc/lpfc_sli4.h |  1 +
 3 files changed, 28 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 37c547b..014b707 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -104,6 +104,17 @@ struct lpfc_sli_intf {
 #define LPFC_SLI_INTF_IF_TYPE_VIRT 1
 };
 
+struct lpfc_sli_asic_rev {
+ u32 word0;
+#define LPFC_SLI_ASIC_VER_A 0x0
+#define LPFC_SLI_ASIC_VER_B 0x1
+#define LPFC_SLI_ASIC_VER_C 0x2
+#define LPFC_SLI_ASIC_VER_D 0x3
+#define lpfc_sli_asic_ver_SHIFT 4
+#define lpfc_sli_asic_ver_MASK 0x0000000F
+#define lpfc_sli_asic_ver_WORD word0
+};
+
 #define LPFC_SLI4_MBX_EMBED true
 #define LPFC_SLI4_MBX_NEMBED false
 
@@ -566,6 +577,7 @@ struct lpfc_register {
 
 /* The following BAR0 register sets are defined for if_type 0 and 2 UCNAs. */
 #define LPFC_SLI_INTF 0x0058
+#define LPFC_SLI_ASIC_VER 0x009C
 
 #define LPFC_CTL_PORT_SEM_OFFSET 0x400
 #define lpfc_port_smphr_perr_SHIFT 31
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 50bc6c6..1710dfd 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9502,6 +9502,11 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
  return error;
  }
 
+ if (pci_read_config_dword(pdev, LPFC_SLI_ASIC_VER,
+  &phba->sli4_hba.sli_asic_ver.word0)) {
+ return error;
+ }
+
  /* There is no SLI3 failback for SLI4 devices. */
  if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) !=
     LPFC_SLI_INTF_VALID) {
@@ -10533,6 +10538,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
  struct lpfc_pc_sli4_params *sli4_params;
  uint32_t mbox_tmo;
  int length;
+ bool exp_wqcq_pages = true;
  struct lpfc_sli4_parameters *mbx_sli4_parameters;
 
  /*
@@ -10659,8 +10665,17 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
  phba->nvme_support, phba->nvme_embed_pbde,
  phba->cfg_nvme_embed_cmd, phba->cfg_suppress_rsp);
 
+ if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) ==
+    LPFC_SLI_INTF_IF_TYPE_2) &&
+    (bf_get(lpfc_sli_intf_sli_family, &phba->sli4_hba.sli_intf) ==
+ LPFC_SLI_INTF_FAMILY_LNCR_A0) &&
+    (bf_get(lpfc_sli_asic_ver, &phba->sli4_hba.sli_asic_ver) ==
+    LPFC_SLI_ASIC_VER_A))
+ exp_wqcq_pages = false;
+
  if ((bf_get(cfg_cqpsize, mbx_sli4_parameters) & LPFC_CQ_16K_PAGE_SZ) &&
     (bf_get(cfg_wqpsize, mbx_sli4_parameters) & LPFC_WQ_16K_PAGE_SZ) &&
+    exp_wqcq_pages &&
     (sli4_params->wqsize & LPFC_WQ_SZ128_SUPPORT))
  phba->enab_exp_wqcq_pages = 1;
  else
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index cf64aca..179e870 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -592,6 +592,7 @@ struct lpfc_sli4_hba {
  uint32_t ue_to_sr;
  uint32_t ue_to_rp;
  struct lpfc_register sli_intf;
+ struct lpfc_register sli_asic_ver;
  struct lpfc_pc_sli4_params pc_sli4_params;
  struct lpfc_bbscn_params bbscn_params;
  struct lpfc_hba_eq_hdl *hba_eq_hdl; /* HBA per-WQ handle */
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 2/2] [PATCH] scsi: lpfc: Fix 16gb hbas failing cq create.

Joseph Salisbury-3
In reply to this post by Joseph Salisbury-3
From: James Smart <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1768103

The lancer G5 chip family fails the CQ create with 16k page size.  The
hardware incorrectly reports it supports large page sizes when it is
actually limited to 4k pages.

A prior patch resolved this for the A0 chip revision only.  This patch
excludes all revisions of the G5 asic from using large page sizes. As
knowing the actual chip revision is unnecessary, the now unused definitions
are removed

Signed-off-by: Dick Kennedy <[hidden email]>
Signed-off-by: James Smart <[hidden email]>
Reviewed-by: Hannes Reinecke <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from linux-next commit c221768bd49a7423be57c00a56985c0e9c4122cd)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/scsi/lpfc/lpfc_hw4.h  | 11 -----------
 drivers/scsi/lpfc/lpfc_init.c |  9 +--------
 drivers/scsi/lpfc/lpfc_sli4.h |  1 -
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 014b707..a2dcc82 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -104,17 +104,6 @@ struct lpfc_sli_intf {
 #define LPFC_SLI_INTF_IF_TYPE_VIRT 1
 };
 
-struct lpfc_sli_asic_rev {
- u32 word0;
-#define LPFC_SLI_ASIC_VER_A 0x0
-#define LPFC_SLI_ASIC_VER_B 0x1
-#define LPFC_SLI_ASIC_VER_C 0x2
-#define LPFC_SLI_ASIC_VER_D 0x3
-#define lpfc_sli_asic_ver_SHIFT 4
-#define lpfc_sli_asic_ver_MASK 0x0000000F
-#define lpfc_sli_asic_ver_WORD word0
-};
-
 #define LPFC_SLI4_MBX_EMBED true
 #define LPFC_SLI4_MBX_NEMBED false
 
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 1710dfd..e10808a 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9502,11 +9502,6 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)
  return error;
  }
 
- if (pci_read_config_dword(pdev, LPFC_SLI_ASIC_VER,
-  &phba->sli4_hba.sli_asic_ver.word0)) {
- return error;
- }
-
  /* There is no SLI3 failback for SLI4 devices. */
  if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) !=
     LPFC_SLI_INTF_VALID) {
@@ -10668,9 +10663,7 @@ lpfc_get_sli4_parameters(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
  if ((bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) ==
     LPFC_SLI_INTF_IF_TYPE_2) &&
     (bf_get(lpfc_sli_intf_sli_family, &phba->sli4_hba.sli_intf) ==
- LPFC_SLI_INTF_FAMILY_LNCR_A0) &&
-    (bf_get(lpfc_sli_asic_ver, &phba->sli4_hba.sli_asic_ver) ==
-    LPFC_SLI_ASIC_VER_A))
+ LPFC_SLI_INTF_FAMILY_LNCR_A0))
  exp_wqcq_pages = false;
 
  if ((bf_get(cfg_cqpsize, mbx_sli4_parameters) & LPFC_CQ_16K_PAGE_SZ) &&
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 179e870..cf64aca 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -592,7 +592,6 @@ struct lpfc_sli4_hba {
  uint32_t ue_to_sr;
  uint32_t ue_to_rp;
  struct lpfc_register sli_intf;
- struct lpfc_register sli_asic_ver;
  struct lpfc_pc_sli4_params pc_sli4_params;
  struct lpfc_bbscn_params bbscn_params;
  struct lpfc_hba_eq_hdl *hba_eq_hdl; /* HBA per-WQ handle */
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 0/2] Fixes for LP:1768103

Khaled Elmously
In reply to this post by Joseph Salisbury-3
On 2018-06-05 12:10:39 , Joseph Salisbury wrote:

> BugLink: http://bugs.launchpad.net/bugs/1768103
>
> == SRU Justification ==
> It was reported by Broadcom that an early asic model (A0) of their 16/32GB
> HBA's doesn't boot with the lpfc driver in Ubuntu 18.04.
>
> Bionic with the lpfc driver 12.0.0.0 can't see LPe16002-M6 but can see LPe16002B-M6.
>
> This bug is fixed by commits bf316c78517d and c221768bd49a, which are
> both still in linux-next.  Broadcom tested with this two commits and
> confirmed they resolve the bug and allow the system to boot.
>
> == Fixes ==
> Currently in linux-next:
> bf316c78517d ("scsi: lpfc: Fix WQ/CQ creation for older asic's.")
> c221768bd49a ("scsi: lpfc: Fix 16gb hbas failing cq create.")
>
> == Regression Potential ==
> Low.  Patches fix a current regression and are limited to lpfc.
>
> == Test Case ==
> A test kernel was built with these patches and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
>
> James Smart (2):
>   scsi: lpfc: Fix WQ/CQ creation for older asic's.
>   scsi: lpfc: Fix 16gb hbas failing cq create.
>
>  drivers/scsi/lpfc/lpfc_hw4.h  | 1 +
>  drivers/scsi/lpfc/lpfc_init.c | 8 ++++++++
>  2 files changed, 9 insertions(+)
>

Acked-by: Khalid Elmously <[hidden email]>
 

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 0/2] Fixes for LP:1768103

Kleber Souza
In reply to this post by Joseph Salisbury-3
On 06/05/18 09:10, Joseph Salisbury wrote:

> BugLink: http://bugs.launchpad.net/bugs/1768103
>
> == SRU Justification ==
> It was reported by Broadcom that an early asic model (A0) of their 16/32GB
> HBA's doesn't boot with the lpfc driver in Ubuntu 18.04.
>
> Bionic with the lpfc driver 12.0.0.0 can't see LPe16002-M6 but can see LPe16002B-M6.
>
> This bug is fixed by commits bf316c78517d and c221768bd49a, which are
> both still in linux-next.  Broadcom tested with this two commits and
> confirmed they resolve the bug and allow the system to boot.
>
> == Fixes ==
> Currently in linux-next:
> bf316c78517d ("scsi: lpfc: Fix WQ/CQ creation for older asic's.")
> c221768bd49a ("scsi: lpfc: Fix 16gb hbas failing cq create.")
>
> == Regression Potential ==
> Low.  Patches fix a current regression and are limited to lpfc.
>
> == Test Case ==
> A test kernel was built with these patches and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
>
> James Smart (2):
>   scsi: lpfc: Fix WQ/CQ creation for older asic's.
>   scsi: lpfc: Fix 16gb hbas failing cq create.
>
>  drivers/scsi/lpfc/lpfc_hw4.h  | 1 +
>  drivers/scsi/lpfc/lpfc_init.c | 8 ++++++++
>  2 files changed, 9 insertions(+)
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [SRU][Bionic][PATCH 0/2] Fixes for LP:1768103

Khaled Elmously
In reply to this post by Joseph Salisbury-3
Applied to Bionic


On 2018-06-05 12:10:39 , Joseph Salisbury wrote:

> BugLink: http://bugs.launchpad.net/bugs/1768103
>
> == SRU Justification ==
> It was reported by Broadcom that an early asic model (A0) of their 16/32GB
> HBA's doesn't boot with the lpfc driver in Ubuntu 18.04.
>
> Bionic with the lpfc driver 12.0.0.0 can't see LPe16002-M6 but can see LPe16002B-M6.
>
> This bug is fixed by commits bf316c78517d and c221768bd49a, which are
> both still in linux-next.  Broadcom tested with this two commits and
> confirmed they resolve the bug and allow the system to boot.
>
> == Fixes ==
> Currently in linux-next:
> bf316c78517d ("scsi: lpfc: Fix WQ/CQ creation for older asic's.")
> c221768bd49a ("scsi: lpfc: Fix 16gb hbas failing cq create.")
>
> == Regression Potential ==
> Low.  Patches fix a current regression and are limited to lpfc.
>
> == Test Case ==
> A test kernel was built with these patches and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
>
> James Smart (2):
>   scsi: lpfc: Fix WQ/CQ creation for older asic's.
>   scsi: lpfc: Fix 16gb hbas failing cq create.
>
>  drivers/scsi/lpfc/lpfc_hw4.h  | 1 +
>  drivers/scsi/lpfc/lpfc_init.c | 8 ++++++++
>  2 files changed, 9 insertions(+)
>
> --
> 2.7.4
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team