Skip to content

Commit 8ea73db

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Correct WQ creation for pagesize
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 <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9434452 commit 8ea73db

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/scsi/lpfc/lpfc_hw4.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,7 @@ struct lpfc_mbx_wq_create {
11861186
#define lpfc_mbx_wq_create_page_size_SHIFT 0
11871187
#define lpfc_mbx_wq_create_page_size_MASK 0x000000FF
11881188
#define lpfc_mbx_wq_create_page_size_WORD word1
1189+
#define LPFC_WQ_PAGE_SIZE_4096 0x1
11891190
#define lpfc_mbx_wq_create_wqe_size_SHIFT 8
11901191
#define lpfc_mbx_wq_create_wqe_size_MASK 0x0000000F
11911192
#define lpfc_mbx_wq_create_wqe_size_WORD word1
@@ -1257,6 +1258,7 @@ struct rq_context {
12571258
#define lpfc_rq_context_page_size_SHIFT 0 /* Version 1 Only */
12581259
#define lpfc_rq_context_page_size_MASK 0x000000FF
12591260
#define lpfc_rq_context_page_size_WORD word0
1261+
#define LPFC_RQ_PAGE_SIZE_4096 0x1
12601262
uint32_t reserved1;
12611263
uint32_t word2;
12621264
#define lpfc_rq_context_cq_id_SHIFT 16

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13722,7 +13722,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq,
1372213722
LPFC_WQ_WQE_SIZE_128);
1372313723
bf_set(lpfc_mbx_wq_create_page_size,
1372413724
&wq_create->u.request_1,
13725-
(PAGE_SIZE/SLI4_PAGE_SIZE));
13725+
LPFC_WQ_PAGE_SIZE_4096);
1372613726
page = wq_create->u.request_1.page;
1372713727
break;
1372813728
}
@@ -13748,8 +13748,9 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq,
1374813748
LPFC_WQ_WQE_SIZE_128);
1374913749
break;
1375013750
}
13751-
bf_set(lpfc_mbx_wq_create_page_size, &wq_create->u.request_1,
13752-
(PAGE_SIZE/SLI4_PAGE_SIZE));
13751+
bf_set(lpfc_mbx_wq_create_page_size,
13752+
&wq_create->u.request_1,
13753+
LPFC_WQ_PAGE_SIZE_4096);
1375313754
page = wq_create->u.request_1.page;
1375413755
break;
1375513756
default:
@@ -13935,7 +13936,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
1393513936
LPFC_RQE_SIZE_8);
1393613937
bf_set(lpfc_rq_context_page_size,
1393713938
&rq_create->u.request.context,
13938-
(PAGE_SIZE/SLI4_PAGE_SIZE));
13939+
LPFC_RQ_PAGE_SIZE_4096);
1393913940
} else {
1394013941
switch (hrq->entry_count) {
1394113942
default:

0 commit comments

Comments
 (0)