All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <jsmart2021@gmail.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>
Subject: [PATCH 10/14] lpfc: Allow applications to issue Common Set Features mailbox command
Date: Tue, 30 Jun 2020 14:49:57 -0700	[thread overview]
Message-ID: <20200630215001.70793-11-jsmart2021@gmail.com> (raw)
In-Reply-To: <20200630215001.70793-1-jsmart2021@gmail.com>

Currently the driver validates command codes received from the
application. COMMON_SET_FEATURES is not currently being approved.

Add definition of the missing command and allow it to be issued
by applications.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_bsg.c |  1 +
 drivers/scsi/lpfc/lpfc_bsg.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index e91466aa1673..1d88fedaf3f0 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -4304,6 +4304,7 @@ lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct bsg_job *job,
 			case COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES:
 			case COMN_OPCODE_GET_CNTL_ATTRIBUTES:
 			case COMN_OPCODE_GET_PROFILE_CONFIG:
+			case COMN_OPCODE_SET_FEATURES:
 				lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC,
 						"3106 Handled SLI_CONFIG "
 						"subsys_comn, opcode:x%x\n",
diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h
index d1708133fd54..2dc71243775d 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.h
+++ b/drivers/scsi/lpfc/lpfc_bsg.h
@@ -225,6 +225,10 @@ struct lpfc_sli_config_hdr {
 	uint32_t reserved5;
 };
 
+#define LPFC_CSF_BOOT_DEV		0x1D
+#define LPFC_CSF_QUERY			0
+#define LPFC_CSF_SAVE			1
+
 struct lpfc_sli_config_emb0_subsys {
 	struct lpfc_sli_config_hdr	sli_config_hdr;
 #define LPFC_MBX_SLI_CONFIG_MAX_MSE     19
@@ -243,6 +247,15 @@ struct lpfc_sli_config_emb0_subsys {
 #define FCOE_OPCODE_ADD_FCF		0x09
 #define FCOE_OPCODE_SET_DPORT_MODE	0x27
 #define FCOE_OPCODE_GET_DPORT_RESULTS	0x28
+	uint32_t timeout;		/* comn_set_feature timeout */
+	uint32_t request_length;	/* comn_set_feature request len */
+	uint32_t version;		/* comn_set_feature version */
+	uint32_t csf_feature;		/* comn_set_feature feature */
+	uint32_t word69;		/* comn_set_feature parameter len */
+	uint32_t word70;		/* comn_set_feature parameter val0 */
+#define lpfc_emb0_subcmnd_csf_p0_SHIFT	0
+#define lpfc_emb0_subcmnd_csf_p0_MASK	0x3
+#define lpfc_emb0_subcmnd_csf_p0_WORD	word70
 };
 
 struct lpfc_sli_config_emb1_subsys {
@@ -261,6 +274,7 @@ struct lpfc_sli_config_emb1_subsys {
 #define COMN_OPCODE_WRITE_OBJECT	0xAC
 #define COMN_OPCODE_READ_OBJECT_LIST	0xAD
 #define COMN_OPCODE_DELETE_OBJECT	0xAE
+#define COMN_OPCODE_SET_FEATURES	0xBF
 #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES	0x79
 #define COMN_OPCODE_GET_CNTL_ATTRIBUTES	0x20
 	uint32_t timeout;
-- 
2.25.0


  parent reply	other threads:[~2020-06-30 21:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 21:49 [PATCH 00/14] lpfc: Update lpfc to revision 12.8.0.2 James Smart
2020-06-30 21:49 ` [PATCH 01/14] lpfc: Fix unused assignment in lpfc_sli4_bsg_link_diag_test James Smart
2020-06-30 21:49 ` [PATCH 02/14] lpfc: Fix missing MDS functionality James Smart
2020-06-30 21:49 ` [PATCH 03/14] lpfc: Fix first-burst driver implementation James Smart
2020-07-02  3:05   ` Martin K. Petersen
2020-07-02  5:30     ` James Smart
2020-06-30 21:49 ` [PATCH 04/14] lpfc: Fix NVME rport deregister and registration during ADISC James Smart
2020-06-30 21:49 ` [PATCH 05/14] lpfc: Fix oops due to overrun when reading SLI3 data James Smart
2020-06-30 21:49 ` [PATCH 06/14] lpfc: Fix stack trace seen while setting rrq active James Smart
2020-06-30 21:49 ` [PATCH 07/14] lpfc: Fix shost refcount mismatch when deleting vport James Smart
2020-06-30 21:49 ` [PATCH 08/14] lpfc: Fix kdump hang on PPC James Smart
2020-06-30 21:49 ` [PATCH 09/14] lpfc: Fix language in 0373 message to reflect non-error message James Smart
2020-06-30 21:49 ` James Smart [this message]
2020-06-30 21:49 ` [PATCH 11/14] lpfc: Add support to display if adapter dumps are available James Smart
2020-06-30 21:49 ` [PATCH 12/14] lpfc: Add blk_io_poll support for latency improvment James Smart
2020-06-30 21:50 ` [PATCH 13/14] lpfc: Add an internal trace log buffer James Smart
2020-06-30 21:50 ` [PATCH 14/14] lpfc: Update lpfc version to 12.8.0.2 James Smart
2020-07-03  4:03 ` [PATCH 00/14] lpfc: Update lpfc to revision 12.8.0.2 Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200630215001.70793-11-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.