diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 20:02:55 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 12:04:32 -0500 |
commit | ab2a9ba189e889b3e8990e52e90d2cd9606b2aa1 (patch) | |
tree | 0114a0fcb8caf0daee0fa23a8d9b788ad1eef0f2 /drivers/scsi/bfa/bfad_drv.h | |
parent | 08a17ced7a78064f4f03de7d68b8cd32581f0510 (diff) | |
download | blackbird-op-linux-ab2a9ba189e889b3e8990e52e90d2cd9606b2aa1.tar.gz blackbird-op-linux-ab2a9ba189e889b3e8990e52e90d2cd9606b2aa1.zip |
[SCSI] bfa: add debugfs support
- Add debugfs support to obtain firmware trace, driver trace
and read/write to registers.
- debugfs hierarchy:
/sys/kernel/debug/bfa/host#
where the host number corresponds to the one under /sys/class/scsi_host/host#
- Following are the new debugfs entries added:
drvtrc: collect current driver trace
fwtrc: collect current firmware trace.
fwsave: collect last saved fw trace as a result of firmware crash.
regwr: write one word to chip register
regrd: read one or more words from chip register.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfad_drv.h')
-rw-r--r-- | drivers/scsi/bfa/bfad_drv.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h index fb6ac1d3fd17..465b8b86ec9c 100644 --- a/drivers/scsi/bfa/bfad_drv.h +++ b/drivers/scsi/bfa/bfad_drv.h @@ -111,6 +111,9 @@ struct bfad_port_s { struct bfad_im_port_s *im_port; /* IM specific data */ struct bfad_tm_port_s *tm_port; /* TM specific data */ struct bfad_ipfc_port_s *ipfc_port; /* IPFC specific data */ + + /* port debugfs specific data */ + struct dentry *port_debugfs_root; }; /* @@ -186,6 +189,10 @@ struct bfad_s { struct fc_host_statistics link_stats; struct list_head pbc_pcfg_list; atomic_t wq_reqcnt; + /* debugfs specific data */ + char *regdata; + u32 reglen; + struct dentry *bfad_dentry_files[5]; }; struct bfad_pcfg_s { @@ -276,7 +283,9 @@ void bfad_drv_uninit(struct bfad_s *bfad); void bfad_drv_log_level_set(struct bfad_s *bfad); bfa_status_t bfad_fc4_module_init(void); void bfad_fc4_module_exit(void); -int bfad_worker (void *ptr); +int bfad_worker(void *ptr); +void bfad_debugfs_init(struct bfad_port_s *port); +void bfad_debugfs_exit(struct bfad_port_s *port); void bfad_pci_remove(struct pci_dev *pdev); int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); @@ -289,6 +298,7 @@ extern struct list_head bfad_list; extern int bfa_lun_queue_depth; extern int bfad_supported_fc4s; extern int bfa_linkup_delay; +extern int bfa_debugfs_enable; extern struct mutex bfad_mutex; #endif /* __BFAD_DRV_H__ */ |