Commit c7495937 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.12: BSG Fixes and enhancements

- Add memcpy to mailbox completion to transfer reply correctly.
- Add support for BSG mailbox commands (dump, update_cfg, and
   event_log_status).
- Add warning message and refuse mailbox command while mgmt is blocked.
- Add checks for memory allocation failure.
- Add check for sli4 dump zero BDE size.
- Only copy data if mailbox commands succeed.
- Add support for Read Event Log mailbox command.
Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 49198b37
This diff is collapsed.
...@@ -96,7 +96,7 @@ struct dfc_mbox_req { ...@@ -96,7 +96,7 @@ struct dfc_mbox_req {
uint32_t command; uint32_t command;
uint32_t mbOffset; uint32_t mbOffset;
uint32_t inExtWLen; uint32_t inExtWLen;
uint32_t outWxtWLen; uint32_t outExtWLen;
}; };
/* Used for menlo command or menlo data. The xri is only used for menlo data */ /* Used for menlo command or menlo data. The xri is only used for menlo data */
......
...@@ -1732,6 +1732,17 @@ typedef struct { ...@@ -1732,6 +1732,17 @@ typedef struct {
} un; } un;
} BIU_DIAG_VAR; } BIU_DIAG_VAR;
/* Structure for MB command READ_EVENT_LOG (0x38) */
struct READ_EVENT_LOG_VAR {
uint32_t word1;
#define lpfc_event_log_SHIFT 29
#define lpfc_event_log_MASK 0x00000001
#define lpfc_event_log_WORD word1
#define USE_MAILBOX_RESPONSE 1
uint32_t offset;
struct ulp_bde64 rcv_bde64;
};
/* Structure for MB Command INIT_LINK (05) */ /* Structure for MB Command INIT_LINK (05) */
typedef struct { typedef struct {
...@@ -2966,6 +2977,9 @@ typedef union { ...@@ -2966,6 +2977,9 @@ typedef union {
REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */ REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */
UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */ UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */
ASYNCEVT_ENABLE_VAR varCfgAsyncEvent; /*cmd = x33 (CONFIG_ASYNC) */ ASYNCEVT_ENABLE_VAR varCfgAsyncEvent; /*cmd = x33 (CONFIG_ASYNC) */
struct READ_EVENT_LOG_VAR varRdEventLog; /* cmd = 0x38
* (READ_EVENT_LOG)
*/
struct config_msi_var varCfgMSI;/* cmd = x30 (CONFIG_MSI) */ struct config_msi_var varCfgMSI;/* cmd = x30 (CONFIG_MSI) */
} MAILVARIANTS; } MAILVARIANTS;
......
...@@ -1659,6 +1659,8 @@ lpfc_sli_chk_mbx_command(uint8_t mbxCommand) ...@@ -1659,6 +1659,8 @@ lpfc_sli_chk_mbx_command(uint8_t mbxCommand)
case MBX_INIT_VPI: case MBX_INIT_VPI:
case MBX_INIT_VFI: case MBX_INIT_VFI:
case MBX_RESUME_RPI: case MBX_RESUME_RPI:
case MBX_READ_EVENT_LOG_STATUS:
case MBX_READ_EVENT_LOG:
ret = mbxCommand; ret = mbxCommand;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment