Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Allow applications to issue Common Set Features mailbox command

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.

Link: https://lore.kernel.org/r/20200630215001.70793-11-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Dick Kennedy and committed by
Martin K. Petersen
45bc4427 28ed7374

+15
+1
drivers/scsi/lpfc/lpfc_bsg.c
··· 4304 4304 case COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES: 4305 4305 case COMN_OPCODE_GET_CNTL_ATTRIBUTES: 4306 4306 case COMN_OPCODE_GET_PROFILE_CONFIG: 4307 + case COMN_OPCODE_SET_FEATURES: 4307 4308 lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, 4308 4309 "3106 Handled SLI_CONFIG " 4309 4310 "subsys_comn, opcode:x%x\n",
+14
drivers/scsi/lpfc/lpfc_bsg.h
··· 225 225 uint32_t reserved5; 226 226 }; 227 227 228 + #define LPFC_CSF_BOOT_DEV 0x1D 229 + #define LPFC_CSF_QUERY 0 230 + #define LPFC_CSF_SAVE 1 231 + 228 232 struct lpfc_sli_config_emb0_subsys { 229 233 struct lpfc_sli_config_hdr sli_config_hdr; 230 234 #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 ··· 247 243 #define FCOE_OPCODE_ADD_FCF 0x09 248 244 #define FCOE_OPCODE_SET_DPORT_MODE 0x27 249 245 #define FCOE_OPCODE_GET_DPORT_RESULTS 0x28 246 + uint32_t timeout; /* comn_set_feature timeout */ 247 + uint32_t request_length; /* comn_set_feature request len */ 248 + uint32_t version; /* comn_set_feature version */ 249 + uint32_t csf_feature; /* comn_set_feature feature */ 250 + uint32_t word69; /* comn_set_feature parameter len */ 251 + uint32_t word70; /* comn_set_feature parameter val0 */ 252 + #define lpfc_emb0_subcmnd_csf_p0_SHIFT 0 253 + #define lpfc_emb0_subcmnd_csf_p0_MASK 0x3 254 + #define lpfc_emb0_subcmnd_csf_p0_WORD word70 250 255 }; 251 256 252 257 struct lpfc_sli_config_emb1_subsys { ··· 274 261 #define COMN_OPCODE_WRITE_OBJECT 0xAC 275 262 #define COMN_OPCODE_READ_OBJECT_LIST 0xAD 276 263 #define COMN_OPCODE_DELETE_OBJECT 0xAE 264 + #define COMN_OPCODE_SET_FEATURES 0xBF 277 265 #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79 278 266 #define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20 279 267 uint32_t timeout;