lpfc 8.3.0 : Add BlockGuard support (T10-DIF) Part 1
Subsystems (2)
PATCH 11/14 lpfc 8.3.0 : Add BlockGuard support (T10-DIF) Part 1
lpfc 8.3.0 : Add BlockGuard support (T10-DIF) Part 1
Update struct definitions, #defines, sysfs entries, and initialization to support BlockGuard.
Signed-off-by James Smart <[email protected]>
---
drivers/scsi/lpfc/lpfc.h | 14 ++- drivers/scsi/lpfc/lpfc_attr.c | 119 ++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_crtn.h | 12 ++ drivers/scsi/lpfc/lpfc_hw.h | 207 ++++++++++++++++++++++++++++++++++++++- drivers/scsi/lpfc/lpfc_init.c | 89 +++++++++++++++++ drivers/scsi/lpfc/lpfc_logmsg.h | 1 6 files changed, 432 insertions(+), 10 deletions(-)
drivers/scsi/lpfc/lpfc.h +12 -2
@@ -29,8 +29,10 @@ struct lpfc_sli2_slim;#define LPFC_MAX_NS_RETRY 3/* Number of retry attempts to contact the NameServer before giving up. */ #define LPFC_CMD_PER_LUN 3/* max outstanding cmds per lun */ -#define LPFC_DEFAULT_SG_SEG_CNT 64/* sg element count per scsi cmnd */ -#define LPFC_MAX_SG_SEG_CNT 256/* sg element count per scsi cmnd */ +#define LPFC_DEFAULT_SG_SEG_CNT 64/* sg element count per scsi cmnd */ +#define LPFC_DEFAULT_PROT_SG_SEG_CNT 4096/* sg protection elements count */ +#define LPFC_MAX_SG_SEG_CNT 4096/* sg element count per scsi cmnd */ +#define LPFC_MAX_PROT_SG_SEG_CNT 4096/* prot sg element count per scsi cmd*/ #define LPFC_IOCB_LIST_CNT 2250/* list of IOCBs for fast-path usage. */ #define LPFC_Q_RAMP_UP_INTERVAL 120/* lun q_depth ramp up interval */ #define LPFC_VNAME_LEN 100/* vport symbolic name length */
@@ -426,6 +428,7 @@ struct lpfc_hba {#define LPFC_SLI3_VPORT_TEARDOWN 0x04#define LPFC_SLI3_CRP_ENABLED 0x08#define LPFC_SLI3_INB_ENABLED 0x10 +#define LPFC_SLI3_BG_ENABLED 0x20uint32_t iocb_cmd_size;uint32_t iocb_rsp_size;
@@ -499,12 +502,14 @@ struct lpfc_hba {uint32_t cfg_poll_tmo;uint32_t cfg_use_msi;uint32_t cfg_sg_seg_cnt; +uint32_t cfg_prot_sg_seg_cnt;uint32_t cfg_sg_dma_buf_size;uint64_t cfg_soft_wwnn;uint64_t cfg_soft_wwpn;uint32_t cfg_hba_queue_depth;uint32_t cfg_enable_hba_reset;uint32_t cfg_enable_hba_heartbeat; +uint32_t cfg_enable_bg;lpfc_vpd_t vpd;/* vital product data */
@@ -570,6 +575,9 @@ struct lpfc_hba {uint64_t fc4InputRequests;uint64_t fc4OutputRequests;uint64_t fc4ControlRequests; +uint64_t bg_guard_err_cnt; +uint64_t bg_apptag_err_cnt; +uint64_t bg_reftag_err_cnt;struct lpfc_sysfs_mbox sysfs_mbox;
@@ -619,6 +627,8 @@ struct lpfc_hba {struct dentry *debug_hbqinfo;struct dentry *debug_dumpHostSlim;struct dentry *debug_dumpHBASlim; +struct dentry *debug_dumpData;/* BlockGuard BPL*/ +struct dentry *debug_dumpDif;/* BlockGuard BPL*/ struct dentry *debug_slow_ring_trc;struct lpfc_debugfs_trc *slow_ring_trc;atomic_t slow_ring_trc_cnt;
drivers/scsi/lpfc/lpfc_attr.c +116 -3
178 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_crtn.h +12 -0
@@ -285,6 +285,18 @@ extern void lpfc_debugfs_slow_ring_trc(struct lpfc_hba *, char *, uint32_t, uint32_t, uint32_t);extern struct lpfc_hbq_init *lpfc_hbq_defs[]; +/* externs BlockGuard */ +extern char *_dump_buf_data; +extern unsigned long _dump_buf_data_order; +extern char *_dump_buf_dif; +extern unsigned long _dump_buf_dif_order; +extern spinlock_t _dump_buf_lock; +extern int _dump_buf_done; +extern spinlock_t pgcnt_lock; +extern unsigned int pgcnt; +extern unsigned int lpfc_prot_mask; +extern unsigned char lpfc_prot_guard; +/* Interface exported by fabric iocb scheduler */ void lpfc_fabric_abort_nport (struct lpfc_nodelist *);void lpfc_fabric_abort_hba (struct lpfc_hba *);
drivers/scsi/lpfc/lpfc_hw.h +202 -5
245 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_init.c +89 -0
113 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_logmsg.h +1 -0
@@ -27,6 +27,7 @@#define LOG_FCP 0x40/* FCP traffic history */ #define LOG_NODE 0x80/* Node table events */ #define LOG_TEMP 0x100/* Temperature sensor events */ +#define LOG_BG 0x200/* BlockBuard events */ #define LOG_MISC 0x400/* Miscellaneous events */ #define LOG_SLI 0x800/* SLI events */ #define LOG_FCP_ERROR 0x1000/* log errors, not underruns */