Skip to content

Commit 47f0e88

Browse files
author
Paul Ely
committed
scsi: lpfc: Revise CQ_CREATE_SET mailbox bitfield definitions
JIRA: https://issues.redhat.com/browse/RHEL-103752 commit 5d65596 Author: Justin Tee <justin.tee@broadcom.com> Date: Wed Jun 18 12:21:35 2025 -0700 scsi: lpfc: Revise CQ_CREATE_SET mailbox bitfield definitions The CQ_CREATE_SET mailbox command's bitfields are updated. Rename the cqe_cnt and separate high/low bitfield names to help resolve confusion between two similar bitfield definitions. Corresponding usages of the newly defined bitfields are updated as well. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20250618192138.124116-11-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Paul Ely <paely@redhat.com>
1 parent 0506fd6 commit 47f0e88

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

drivers/scsi/lpfc/lpfc_hw4.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,9 @@ struct cq_context {
13281328
#define LPFC_CQ_CNT_512 0x1
13291329
#define LPFC_CQ_CNT_1024 0x2
13301330
#define LPFC_CQ_CNT_WORD7 0x3
1331+
#define lpfc_cq_context_cqe_sz_SHIFT 25
1332+
#define lpfc_cq_context_cqe_sz_MASK 0x00000003
1333+
#define lpfc_cq_context_cqe_sz_WORD word0
13311334
#define lpfc_cq_context_autovalid_SHIFT 15
13321335
#define lpfc_cq_context_autovalid_MASK 0x00000001
13331336
#define lpfc_cq_context_autovalid_WORD word0
@@ -1383,9 +1386,9 @@ struct lpfc_mbx_cq_create_set {
13831386
#define lpfc_mbx_cq_create_set_valid_SHIFT 29
13841387
#define lpfc_mbx_cq_create_set_valid_MASK 0x00000001
13851388
#define lpfc_mbx_cq_create_set_valid_WORD word1
1386-
#define lpfc_mbx_cq_create_set_cqe_cnt_SHIFT 27
1387-
#define lpfc_mbx_cq_create_set_cqe_cnt_MASK 0x00000003
1388-
#define lpfc_mbx_cq_create_set_cqe_cnt_WORD word1
1389+
#define lpfc_mbx_cq_create_set_cqecnt_SHIFT 27
1390+
#define lpfc_mbx_cq_create_set_cqecnt_MASK 0x00000003
1391+
#define lpfc_mbx_cq_create_set_cqecnt_WORD word1
13891392
#define lpfc_mbx_cq_create_set_cqe_size_SHIFT 25
13901393
#define lpfc_mbx_cq_create_set_cqe_size_MASK 0x00000003
13911394
#define lpfc_mbx_cq_create_set_cqe_size_WORD word1
@@ -1398,13 +1401,16 @@ struct lpfc_mbx_cq_create_set {
13981401
#define lpfc_mbx_cq_create_set_clswm_SHIFT 12
13991402
#define lpfc_mbx_cq_create_set_clswm_MASK 0x00000003
14001403
#define lpfc_mbx_cq_create_set_clswm_WORD word1
1404+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_SHIFT 0
1405+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_MASK 0x0000001F
1406+
#define lpfc_mbx_cq_create_set_cqe_cnt_hi_WORD word1
14011407
uint32_t word2;
14021408
#define lpfc_mbx_cq_create_set_arm_SHIFT 31
14031409
#define lpfc_mbx_cq_create_set_arm_MASK 0x00000001
14041410
#define lpfc_mbx_cq_create_set_arm_WORD word2
1405-
#define lpfc_mbx_cq_create_set_cq_cnt_SHIFT 16
1406-
#define lpfc_mbx_cq_create_set_cq_cnt_MASK 0x00007FFF
1407-
#define lpfc_mbx_cq_create_set_cq_cnt_WORD word2
1411+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_SHIFT 16
1412+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_MASK 0x00007FFF
1413+
#define lpfc_mbx_cq_create_set_cqe_cnt_lo_WORD word2
14081414
#define lpfc_mbx_cq_create_set_num_cq_SHIFT 0
14091415
#define lpfc_mbx_cq_create_set_num_cq_MASK 0x0000FFFF
14101416
#define lpfc_mbx_cq_create_set_num_cq_WORD word2

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16486,10 +16486,10 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
1648616486
case 4096:
1648716487
if (phba->sli4_hba.pc_sli4_params.cqv ==
1648816488
LPFC_Q_CREATE_VERSION_2) {
16489-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16489+
bf_set(lpfc_mbx_cq_create_set_cqe_cnt_lo,
1649016490
&cq_set->u.request,
16491-
cq->entry_count);
16492-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16491+
cq->entry_count);
16492+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1649316493
&cq_set->u.request,
1649416494
LPFC_CQ_CNT_WORD7);
1649516495
break;
@@ -16505,15 +16505,15 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
1650516505
}
1650616506
fallthrough; /* otherwise default to smallest */
1650716507
case 256:
16508-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16508+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1650916509
&cq_set->u.request, LPFC_CQ_CNT_256);
1651016510
break;
1651116511
case 512:
16512-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16512+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1651316513
&cq_set->u.request, LPFC_CQ_CNT_512);
1651416514
break;
1651516515
case 1024:
16516-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16516+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1651716517
&cq_set->u.request, LPFC_CQ_CNT_1024);
1651816518
break;
1651916519
}

drivers/scsi/lpfc/lpfc_sli4.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,10 @@ struct lpfc_pc_sli4_params {
575575

576576
#define LPFC_CQ_4K_PAGE_SZ 0x1
577577
#define LPFC_CQ_16K_PAGE_SZ 0x4
578+
#define LPFC_CQ_32K_PAGE_SZ 0x8
578579
#define LPFC_WQ_4K_PAGE_SZ 0x1
579580
#define LPFC_WQ_16K_PAGE_SZ 0x4
581+
#define LPFC_WQ_32K_PAGE_SZ 0x8
580582

581583
struct lpfc_iov {
582584
uint32_t pf_number;

0 commit comments

Comments
 (0)