Patch "scsi: lpfc: Correct WQ creation for pagesize" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
scsi: lpfc: Correct WQ creation for pagesize
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-lpfc-correct-wq-creation-for-pagesize.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
8ea73db486cda442f0671f4bc9c03a76be398a28Mon Sep 17 00:00:00 2001
From: James Smart <[email protected]>
Date: Sun, 12 Feb 2017 13:52:25 -0800
Subject: scsi: lpfc: Correct WQ creation for pagesize
From: James Smart <[email protected]>
commit 8ea73db486cda442f0671f4bc9c03a76be398a28 upstream.
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.
--- drivers/scsi/lpfc/lpfc_hw4.h | 2 ++ drivers/scsi/lpfc/lpfc_sli.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_hw4.h +2 -0
@@ -1185,6 +1185,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
@@ -1256,6 +1257,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 0x1uint32_t reserved1;uint32_t word2;#define lpfc_rq_context_cq_id_SHIFT 16
drivers/scsi/lpfc/lpfc_sli.c +5 -4
@@ -13678,7 +13678,7 @@ lpfc_wq_create(struct lpfc_hba *phba, st 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 ; }
@@ -13704,8 +13704,9 @@ lpfc_wq_create(struct lpfc_hba *phba, st 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 :
@@ -13891,7 +13892,7 @@ lpfc_rq_create(struct lpfc_hba *phba, st 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 :
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/scsi-lpfc-correct-wq-creation-for-pagesize.patch