Commit 738c9e66 authored by Krishna Gudipati's avatar Krishna Gudipati Committed by James Bottomley

[SCSI] bfa: Added firmware save clear feature for BFA driver.

Signed-off-by: default avatarKrishna Gudipati <kgudipat@brocade.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent f926a05f
...@@ -384,6 +384,15 @@ bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen) ...@@ -384,6 +384,15 @@ bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen)
return bfa_ioc_debug_fwsave(&bfa->ioc, trcdata, trclen); return bfa_ioc_debug_fwsave(&bfa->ioc, trcdata, trclen);
} }
/**
* Clear the saved firmware trace information of an IOC.
*/
void
bfa_debug_fwsave_clear(struct bfa_s *bfa)
{
bfa_ioc_debug_fwsave_clear(&bfa->ioc);
}
/** /**
* Fetch firmware trace data. * Fetch firmware trace data.
* *
......
...@@ -1488,7 +1488,6 @@ return (auto_recover) ? BFA_DBG_FWTRC_LEN : 0; ...@@ -1488,7 +1488,6 @@ return (auto_recover) ? BFA_DBG_FWTRC_LEN : 0;
void void
bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave) bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave)
{ {
bfa_assert(ioc->auto_recover);
ioc->dbg_fwsave = dbg_fwsave; ioc->dbg_fwsave = dbg_fwsave;
ioc->dbg_fwsave_len = bfa_ioc_debug_trcsz(ioc->auto_recover); ioc->dbg_fwsave_len = bfa_ioc_debug_trcsz(ioc->auto_recover);
} }
...@@ -1924,6 +1923,15 @@ bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen) ...@@ -1924,6 +1923,15 @@ bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen)
return BFA_STATUS_OK; return BFA_STATUS_OK;
} }
/**
* Clear saved firmware trace
*/
void
bfa_ioc_debug_fwsave_clear(struct bfa_ioc_s *ioc)
{
ioc->dbg_fwsave_once = BFA_TRUE;
}
/** /**
* Retrieve saved firmware trace from a prior IOC failure. * Retrieve saved firmware trace from a prior IOC failure.
*/ */
......
...@@ -270,6 +270,7 @@ int bfa_ioc_debug_trcsz(bfa_boolean_t auto_recover); ...@@ -270,6 +270,7 @@ int bfa_ioc_debug_trcsz(bfa_boolean_t auto_recover);
void bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave); void bfa_ioc_debug_memclaim(struct bfa_ioc_s *ioc, void *dbg_fwsave);
bfa_status_t bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, bfa_status_t bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata,
int *trclen); int *trclen);
void bfa_ioc_debug_fwsave_clear(struct bfa_ioc_s *ioc);
bfa_status_t bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata, bfa_status_t bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata,
int *trclen); int *trclen);
u32 bfa_ioc_smem_pgnum(struct bfa_ioc_s *ioc, u32 fmaddr); u32 bfa_ioc_smem_pgnum(struct bfa_ioc_s *ioc, u32 fmaddr);
......
...@@ -172,6 +172,7 @@ void bfa_timer_tick(struct bfa_s *bfa); ...@@ -172,6 +172,7 @@ void bfa_timer_tick(struct bfa_s *bfa);
*/ */
bfa_status_t bfa_debug_fwtrc(struct bfa_s *bfa, void *trcdata, int *trclen); bfa_status_t bfa_debug_fwtrc(struct bfa_s *bfa, void *trcdata, int *trclen);
bfa_status_t bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen); bfa_status_t bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen);
void bfa_debug_fwsave_clear(struct bfa_s *bfa);
#include "bfa_priv.h" #include "bfa_priv.h"
......
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