diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-12-22 08:30:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-23 16:50:58 -0500 |
commit | 7afc5dbde09104b023ce04465ba71aaba0fc4346 (patch) | |
tree | 03109d7dfed9afb5c0e4d1f1c86d307f577f0b6d /drivers/net/ethernet/brocade/bna/bfa_ioc.h | |
parent | 72a9730b3f556e18912f3e1b494a7aee7ae3dd91 (diff) |
bna: Add debugfs interface.
Change details:
- Add debugfs support to obtain firmware trace, saved firmware trace on
an IOC crash, driver info and read/write to registers.
- debugfs hierarchy:
bna/pci_dev:<pci_name>
where the pci_name corresponds to the one under /sys/bus/pci/drivers/bna
- Following are the new debugfs entries added:
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.
drvinfo: collect the driver information.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/bfa_ioc.h')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfa_ioc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h index fc108c7a735e..3b4460fdc148 100644 --- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h +++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #define BFA_IOC_HWSEM_TOV 500 /* msecs */ | 27 | #define BFA_IOC_HWSEM_TOV 500 /* msecs */ |
28 | #define BFA_IOC_HB_TOV 500 /* msecs */ | 28 | #define BFA_IOC_HB_TOV 500 /* msecs */ |
29 | #define BFA_IOC_POLL_TOV 200 /* msecs */ | 29 | #define BFA_IOC_POLL_TOV 200 /* msecs */ |
30 | #define BNA_DBG_FWTRC_LEN (BFI_IOC_TRC_ENTS * BFI_IOC_TRC_ENT_SZ + \ | ||
31 | BFI_IOC_TRC_HDR_SZ) | ||
30 | 32 | ||
31 | /** | 33 | /** |
32 | * PCI device information required by IOC | 34 | * PCI device information required by IOC |
@@ -306,6 +308,7 @@ void bfa_nw_ioc_disable(struct bfa_ioc *ioc); | |||
306 | 308 | ||
307 | void bfa_nw_ioc_error_isr(struct bfa_ioc *ioc); | 309 | void bfa_nw_ioc_error_isr(struct bfa_ioc *ioc); |
308 | bool bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc); | 310 | bool bfa_nw_ioc_is_disabled(struct bfa_ioc *ioc); |
311 | bool bfa_nw_ioc_is_operational(struct bfa_ioc *ioc); | ||
309 | void bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr); | 312 | void bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr); |
310 | void bfa_nw_ioc_notify_register(struct bfa_ioc *ioc, | 313 | void bfa_nw_ioc_notify_register(struct bfa_ioc *ioc, |
311 | struct bfa_ioc_notify *notify); | 314 | struct bfa_ioc_notify *notify); |
@@ -317,6 +320,9 @@ void bfa_nw_ioc_fwver_get(struct bfa_ioc *ioc, | |||
317 | bool bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, | 320 | bool bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, |
318 | struct bfi_ioc_image_hdr *fwhdr); | 321 | struct bfi_ioc_image_hdr *fwhdr); |
319 | mac_t bfa_nw_ioc_get_mac(struct bfa_ioc *ioc); | 322 | mac_t bfa_nw_ioc_get_mac(struct bfa_ioc *ioc); |
323 | void bfa_nw_ioc_debug_memclaim(struct bfa_ioc *ioc, void *dbg_fwsave); | ||
324 | int bfa_nw_ioc_debug_fwtrc(struct bfa_ioc *ioc, void *trcdata, int *trclen); | ||
325 | int bfa_nw_ioc_debug_fwsave(struct bfa_ioc *ioc, void *trcdata, int *trclen); | ||
320 | 326 | ||
321 | /* | 327 | /* |
322 | * Timeout APIs | 328 | * Timeout APIs |