* [PATCH 20/32] bfa: IOC recovery fix in fcmode.
@ 2010-03-04 1:46 kgudipat
0 siblings, 0 replies; 2+ messages in thread
From: kgudipat @ 2010-03-04 1:46 UTC (permalink / raw)
To: James.Bottomley, linux-scsi; +Cc: adapter_linux_open_src_team, huangj, kgudipat
From: Krishna Gudipati <kgudipat@brocade.com>
Change details:
- ioc_recover failed to work in fcmode, as a result,
bfa_ioc_ct_notify_hbfail(struct bfa_ioc_s ioc->*ioc) will do just
bfa_reg_write(ioc->ioc_regs.err_set, __PSS_ERR_STATUS_SET);
bfa_reg_read(ioc->ioc_regs.err_set);
However, ioc_regs.err_set is not initialized.
- Fixed the code to initialize the ioc_regs.err_set during the notify_hbfail.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
---
drivers/scsi/bfa/bfa_ioc_ct.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c
index e756713..45d82d6 100644
--- a/drivers/scsi/bfa/bfa_ioc_ct.c
+++ b/drivers/scsi/bfa/bfa_ioc_ct.c
@@ -34,7 +34,7 @@ static bfa_status_t bfa_ioc_ct_pll_init(struct bfa_ioc_s *ioc);
static bfa_boolean_t bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc);
static uint32_t * bfa_ioc_ct_fwimg_get_chunk(struct bfa_ioc_s *ioc,
- uint32_t off);
+ uint32_t off);
static uint32_t bfa_ioc_ct_fwimg_get_size(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_map_port(struct bfa_ioc_s *ioc);
@@ -172,10 +172,14 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc)
static void
bfa_ioc_ct_notify_hbfail(struct bfa_ioc_s *ioc)
{
-
- bfa_reg_write(ioc->ioc_regs.ll_halt, __FW_INIT_HALT_P);
- /* Wait for halt to take effect */
- bfa_reg_read(ioc->ioc_regs.ll_halt);
+ if (ioc->cna) {
+ bfa_reg_write(ioc->ioc_regs.ll_halt, __FW_INIT_HALT_P);
+ /* Wait for halt to take effect */
+ bfa_reg_read(ioc->ioc_regs.ll_halt);
+ } else {
+ bfa_reg_write(ioc->ioc_regs.err_set, __PSS_ERR_STATUS_SET);
+ bfa_reg_read(ioc->ioc_regs.err_set);
+ }
}
/**
@@ -255,6 +259,11 @@ bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc)
*/
ioc->ioc_regs.smem_page_start = (rb + PSS_SMEM_PAGE_START);
ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT;
+
+ /*
+ * err set reg : for notification of hb failure in fcmode
+ */
+ ioc->ioc_regs.err_set = (rb + ERR_SET_REG);
}
/**
--
1.6.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 20/32] bfa: IOC recovery fix in fcmode.
@ 2010-02-26 1:49 Krishna Gudipati
0 siblings, 0 replies; 2+ messages in thread
From: Krishna Gudipati @ 2010-02-26 1:49 UTC (permalink / raw)
To: James.Bottomley, linux-scsi; +Cc: adapter_linux_open_src_team, huangj, kgudipat
Change details:
- ioc_recover failed to work in fcmode, as a result,
bfa_ioc_ct_notify_hbfail(struct bfa_ioc_s ioc->*ioc) will do just
bfa_reg_write(ioc->ioc_regs.err_set, __PSS_ERR_STATUS_SET);
bfa_reg_read(ioc->ioc_regs.err_set);
However, ioc_regs.err_set is not initialized.
- Fixed the code to initialize the ioc_regs.err_set during the notify_hbfail.
---
drivers/scsi/bfa/bfa_ioc_ct.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c
index e756713..45d82d6 100644
--- a/drivers/scsi/bfa/bfa_ioc_ct.c
+++ b/drivers/scsi/bfa/bfa_ioc_ct.c
@@ -34,7 +34,7 @@ static bfa_status_t bfa_ioc_ct_pll_init(struct bfa_ioc_s *ioc);
static bfa_boolean_t bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc);
static uint32_t * bfa_ioc_ct_fwimg_get_chunk(struct bfa_ioc_s *ioc,
- uint32_t off);
+ uint32_t off);
static uint32_t bfa_ioc_ct_fwimg_get_size(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_map_port(struct bfa_ioc_s *ioc);
@@ -172,10 +172,14 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc)
static void
bfa_ioc_ct_notify_hbfail(struct bfa_ioc_s *ioc)
{
-
- bfa_reg_write(ioc->ioc_regs.ll_halt, __FW_INIT_HALT_P);
- /* Wait for halt to take effect */
- bfa_reg_read(ioc->ioc_regs.ll_halt);
+ if (ioc->cna) {
+ bfa_reg_write(ioc->ioc_regs.ll_halt, __FW_INIT_HALT_P);
+ /* Wait for halt to take effect */
+ bfa_reg_read(ioc->ioc_regs.ll_halt);
+ } else {
+ bfa_reg_write(ioc->ioc_regs.err_set, __PSS_ERR_STATUS_SET);
+ bfa_reg_read(ioc->ioc_regs.err_set);
+ }
}
/**
@@ -255,6 +259,11 @@ bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc)
*/
ioc->ioc_regs.smem_page_start = (rb + PSS_SMEM_PAGE_START);
ioc->ioc_regs.smem_pg0 = BFI_IOC_SMEM_PG0_CT;
+
+ /*
+ * err set reg : for notification of hb failure in fcmode
+ */
+ ioc->ioc_regs.err_set = (rb + ERR_SET_REG);
}
/**
--
1.6.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-04 1:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04 1:46 [PATCH 20/32] bfa: IOC recovery fix in fcmode kgudipat
-- strict thread matches above, loose matches on Subject: below --
2010-02-26 1:49 Krishna Gudipati
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.