Skip to content

Commit 2e7e9c0

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion
NVMe Asynchronous Event Request commands have no command timeout value per specifications. Set WQE option to allow a reduced FLUSH polling rate for I/O error detection specifically for nvme_admin_async_event commands. Link: https://lore.kernel.org/r/20220603174329.63777-9-jsmart2021@gmail.com Co-developed-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ea7bd1f commit 2e7e9c0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

drivers/scsi/lpfc/lpfc_hw4.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4487,6 +4487,9 @@ struct wqe_common {
44874487
#define wqe_sup_SHIFT 6
44884488
#define wqe_sup_MASK 0x00000001
44894489
#define wqe_sup_WORD word11
4490+
#define wqe_ffrq_SHIFT 6
4491+
#define wqe_ffrq_MASK 0x00000001
4492+
#define wqe_ffrq_WORD word11
44904493
#define wqe_wqec_SHIFT 7
44914494
#define wqe_wqec_MASK 0x00000001
44924495
#define wqe_wqec_WORD word11

drivers/scsi/lpfc/lpfc_nvme.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,8 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
12071207
{
12081208
struct lpfc_hba *phba = vport->phba;
12091209
struct nvmefc_fcp_req *nCmd = lpfc_ncmd->nvmeCmd;
1210-
struct lpfc_iocbq *pwqeq = &(lpfc_ncmd->cur_iocbq);
1210+
struct nvme_common_command *sqe;
1211+
struct lpfc_iocbq *pwqeq = &lpfc_ncmd->cur_iocbq;
12111212
union lpfc_wqe128 *wqe = &pwqeq->wqe;
12121213
uint32_t req_len;
12131214

@@ -1264,8 +1265,14 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
12641265
cstat->control_requests++;
12651266
}
12661267

1267-
if (pnode->nlp_nvme_info & NLP_NVME_NSLER)
1268+
if (pnode->nlp_nvme_info & NLP_NVME_NSLER) {
12681269
bf_set(wqe_erp, &wqe->generic.wqe_com, 1);
1270+
sqe = &((struct nvme_fc_cmd_iu *)
1271+
nCmd->cmdaddr)->sqe.common;
1272+
if (sqe->opcode == nvme_admin_async_event)
1273+
bf_set(wqe_ffrq, &wqe->generic.wqe_com, 1);
1274+
}
1275+
12691276
/*
12701277
* Finish initializing those WQE fields that are independent
12711278
* of the nvme_cmnd request_buffer

0 commit comments

Comments
 (0)