Skip to content

Commit ee3715d

Browse files
author
Paul Ely
committed
scsi: lpfc: Revise CQ_CREATE_SET mailbox bitfield definitions
JIRA: https://issues.redhat.com/browse/RHEL-103751 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 034b060 commit ee3715d

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
@@ -16476,10 +16476,10 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
1647616476
case 4096:
1647716477
if (phba->sli4_hba.pc_sli4_params.cqv ==
1647816478
LPFC_Q_CREATE_VERSION_2) {
16479-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16479+
bf_set(lpfc_mbx_cq_create_set_cqe_cnt_lo,
1648016480
&cq_set->u.request,
16481-
cq->entry_count);
16482-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16481+
cq->entry_count);
16482+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1648316483
&cq_set->u.request,
1648416484
LPFC_CQ_CNT_WORD7);
1648516485
break;
@@ -16495,15 +16495,15 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
1649516495
}
1649616496
fallthrough; /* otherwise default to smallest */
1649716497
case 256:
16498-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16498+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1649916499
&cq_set->u.request, LPFC_CQ_CNT_256);
1650016500
break;
1650116501
case 512:
16502-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16502+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1650316503
&cq_set->u.request, LPFC_CQ_CNT_512);
1650416504
break;
1650516505
case 1024:
16506-
bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
16506+
bf_set(lpfc_mbx_cq_create_set_cqecnt,
1650716507
&cq_set->u.request, LPFC_CQ_CNT_1024);
1650816508
break;
1650916509
}

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)