diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 23:02:55 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:04:32 -0400 |
commit | ab2a9ba189e889b3e8990e52e90d2cd9606b2aa1 (patch) | |
tree | 0114a0fcb8caf0daee0fa23a8d9b788ad1eef0f2 /drivers/scsi/bfa/bfad_drv.h | |
parent | 08a17ced7a78064f4f03de7d68b8cd32581f0510 (diff) |
[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 { | |||
111 | struct bfad_im_port_s *im_port; /* IM specific data */ | 111 | struct bfad_im_port_s *im_port; /* IM specific data */ |
112 | struct bfad_tm_port_s *tm_port; /* TM specific data */ | 112 | struct bfad_tm_port_s *tm_port; /* TM specific data */ |
113 | struct bfad_ipfc_port_s *ipfc_port; /* IPFC specific data */ | 113 | struct bfad_ipfc_port_s *ipfc_port; /* IPFC specific data */ |
114 | |||
115 | /* port debugfs specific data */ | ||
116 | struct dentry *port_debugfs_root; | ||
114 | }; | 117 | }; |
115 | 118 | ||
116 | /* | 119 | /* |
@@ -186,6 +189,10 @@ struct bfad_s { | |||
186 | struct fc_host_statistics link_stats; | 189 | struct fc_host_statistics link_stats; |
187 | struct list_head pbc_pcfg_list; | 190 | struct list_head pbc_pcfg_list; |
188 | atomic_t wq_reqcnt; | 191 | atomic_t wq_reqcnt; |
192 | /* debugfs specific data */ | ||
193 | char *regdata; | ||
194 | u32 reglen; | ||
195 | struct dentry *bfad_dentry_files[5]; | ||
189 | }; | 196 | }; |
190 | 197 | ||
191 | struct bfad_pcfg_s { | 198 | struct bfad_pcfg_s { |
@@ -276,7 +283,9 @@ void bfad_drv_uninit(struct bfad_s *bfad); | |||
276 | void bfad_drv_log_level_set(struct bfad_s *bfad); | 283 | void bfad_drv_log_level_set(struct bfad_s *bfad); |
277 | bfa_status_t bfad_fc4_module_init(void); | 284 | bfa_status_t bfad_fc4_module_init(void); |
278 | void bfad_fc4_module_exit(void); | 285 | void bfad_fc4_module_exit(void); |
279 | int bfad_worker (void *ptr); | 286 | int bfad_worker(void *ptr); |
287 | void bfad_debugfs_init(struct bfad_port_s *port); | ||
288 | void bfad_debugfs_exit(struct bfad_port_s *port); | ||
280 | 289 | ||
281 | void bfad_pci_remove(struct pci_dev *pdev); | 290 | void bfad_pci_remove(struct pci_dev *pdev); |
282 | int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); | 291 | int bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid); |
@@ -289,6 +298,7 @@ extern struct list_head bfad_list; | |||
289 | extern int bfa_lun_queue_depth; | 298 | extern int bfa_lun_queue_depth; |
290 | extern int bfad_supported_fc4s; | 299 | extern int bfad_supported_fc4s; |
291 | extern int bfa_linkup_delay; | 300 | extern int bfa_linkup_delay; |
301 | extern int bfa_debugfs_enable; | ||
292 | extern struct mutex bfad_mutex; | 302 | extern struct mutex bfad_mutex; |
293 | 303 | ||
294 | #endif /* __BFAD_DRV_H__ */ | 304 | #endif /* __BFAD_DRV_H__ */ |