Xenial/Yakkety SRU - FC Adapter (LPe32000-based) prints "iotag out of range", goes offline, and delays boot a lot (Ubuntu17.04/Emulex/lpfc))

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

Xenial/Yakkety SRU - FC Adapter (LPe32000-based) prints "iotag out of range", goes offline, and delays boot a lot (Ubuntu17.04/Emulex/lpfc))

Tim Gardner-2
https://bugs.launchpad.net/bugs/1670490

[PATCH 1/2] scsi: lpfc: Correct WQ creation for pagesize
[PATCH 2/2] scsi: lpfc: Add missing memory barrier

rtg


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

[PATCH 1/2] scsi: lpfc: Correct WQ creation for pagesize

Tim Gardner-2
From: James Smart <[hidden email]>

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

Correct WQ creation for pagesize

The driver was calculating the adapter command pagesize indicator from
the system pagesize. However, the buffers the driver allocates are only
one size (SLI4_PAGE_SIZE), so no calculation was necessary.

Signed-off-by: Dick Kennedy <[hidden email]>
Signed-off-by: James Smart <[hidden email]>
Reviewed-by: Hannes Reinecke <[hidden email]>
Reviewed-by: Johannes Thumshirn <[hidden email]>
Reviewed-by: Christoph Hellwig <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from commit 8ea73db486cda442f0671f4bc9c03a76be398a28)
Signed-off-by: Tim Gardner <[hidden email]>
---
 drivers/scsi/lpfc/lpfc_hw4.h | 2 ++
 drivers/scsi/lpfc/lpfc_sli.c | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 608f941..c8c7267 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -1182,6 +1182,7 @@ struct lpfc_mbx_wq_create {
 #define lpfc_mbx_wq_create_page_size_SHIFT 0
 #define lpfc_mbx_wq_create_page_size_MASK 0x000000FF
 #define lpfc_mbx_wq_create_page_size_WORD word1
+#define LPFC_WQ_PAGE_SIZE_4096 0x1
 #define lpfc_mbx_wq_create_wqe_size_SHIFT 8
 #define lpfc_mbx_wq_create_wqe_size_MASK 0x0000000F
 #define lpfc_mbx_wq_create_wqe_size_WORD word1
@@ -1253,6 +1254,7 @@ struct rq_context {
 #define lpfc_rq_context_page_size_SHIFT 0 /* Version 1 Only */
 #define lpfc_rq_context_page_size_MASK 0x000000FF
 #define lpfc_rq_context_page_size_WORD word0
+#define LPFC_RQ_PAGE_SIZE_4096 0x1
  uint32_t reserved1;
  uint32_t word2;
 #define lpfc_rq_context_cq_id_SHIFT 16
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 92dfd6a..f5aeda8 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -13475,7 +13475,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq,
        LPFC_WQ_WQE_SIZE_128);
  bf_set(lpfc_mbx_wq_create_page_size,
        &wq_create->u.request_1,
-       (PAGE_SIZE/SLI4_PAGE_SIZE));
+       LPFC_WQ_PAGE_SIZE_4096);
  page = wq_create->u.request_1.page;
  break;
  }
@@ -13501,8 +13501,9 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq,
        LPFC_WQ_WQE_SIZE_128);
  break;
  }
- bf_set(lpfc_mbx_wq_create_page_size, &wq_create->u.request_1,
-       (PAGE_SIZE/SLI4_PAGE_SIZE));
+ bf_set(lpfc_mbx_wq_create_page_size,
+       &wq_create->u.request_1,
+       LPFC_WQ_PAGE_SIZE_4096);
  page = wq_create->u.request_1.page;
  break;
  default:
@@ -13688,7 +13689,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
        LPFC_RQE_SIZE_8);
  bf_set(lpfc_rq_context_page_size,
        &rq_create->u.request.context,
-       (PAGE_SIZE/SLI4_PAGE_SIZE));
+       LPFC_RQ_PAGE_SIZE_4096);
  } else {
  switch (hrq->entry_count) {
  default:
--
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
|

[PATCH 2/2] scsi: lpfc: Add missing memory barrier

Tim Gardner-2
In reply to this post by Tim Gardner-2
From: James Smart <[hidden email]>

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

On loosely ordered memory systems (PPC for example), the WQE elements
were being updated in memory, but not necessarily flushed before the
separate doorbell was written to hw which would cause hw to dma the
WQE element. Thus, the hardware occasionally received partially
updated WQE data.

Add the memory barrier after updating the WQE memory.

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 commit 6b3b3bdb83b4ad51252d21bb13596db879e51850)
Signed-off-by: Tim Gardner <[hidden email]>
---
 drivers/scsi/lpfc/lpfc_sli.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index f5aeda8..5a48f62 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -118,6 +118,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)
  if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED)
  bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id);
  lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size);
+ /* ensure WQE bcopy flushed before doorbell write */
+ wmb();
 
  /* Update the host index before invoking device */
  host_index = q->host_index;
--
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: Xenial/Yakkety SRU - FC Adapter (LPe32000-based) prints "iotag out of range", goes offline, and delays boot a lot (Ubuntu17.04/Emulex/lpfc))

Seth Forshee
In reply to this post by Tim Gardner-2
Reply | Threaded
Open this post in threaded view
|

ACK: Xenial/Yakkety SRU - FC Adapter (LPe32000-based) prints "iotag out of range", goes offline, and delays boot a lot (Ubuntu17.04/Emulex/lpfc))

brad.figg
In reply to this post by Tim Gardner-2
Reply | Threaded
Open this post in threaded view
|

Applied: Xenial/Yakkety SRU - FC Adapter (LPe32000-based) prints "iotag out of range", goes offline, and delays boot a lot (Ubuntu17.04/Emulex/lpfc))

brad.figg
In reply to this post by Tim Gardner-2
Applied to the master-next branches of Xenial and Yakkety
--
Brad Figg [hidden email] http://www.canonical.com

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