aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_ioc.c
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-12-27 00:46:35 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-31 10:36:53 -0500
commitd4b671c58ebeb56dfc8fe8bcca25e0a06bc9359a (patch)
treef8b5a2cc309ce68dc4399922fe01341d2a332aa0 /drivers/scsi/bfa/bfa_ioc.c
parentaa5cbf8a70f57c5360ce1bfef692b357c866ae7f (diff)
[SCSI] bfa: replace bfa_assert with WARN_ON
Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.c')
-rw-r--r--drivers/scsi/bfa/bfa_ioc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 05b0ff93284a..431cf72f7426 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -1219,7 +1219,7 @@ bfa_ioc_sem_get(void __iomem *sem_reg)
1219 if (r32 == 0) 1219 if (r32 == 0)
1220 return BFA_TRUE; 1220 return BFA_TRUE;
1221 1221
1222 bfa_assert(cnt < BFA_SEM_SPINCNT); 1222 WARN_ON(cnt >= BFA_SEM_SPINCNT);
1223 return BFA_FALSE; 1223 return BFA_FALSE;
1224} 1224}
1225 1225
@@ -1274,7 +1274,7 @@ bfa_ioc_lmem_init(struct bfa_ioc_s *ioc)
1274 * If memory initialization is not successful, IOC timeout will catch 1274 * If memory initialization is not successful, IOC timeout will catch
1275 * such failures. 1275 * such failures.
1276 */ 1276 */
1277 bfa_assert(pss_ctl & __PSS_LMEM_INIT_DONE); 1277 WARN_ON(!(pss_ctl & __PSS_LMEM_INIT_DONE));
1278 bfa_trc(ioc, pss_ctl); 1278 bfa_trc(ioc, pss_ctl);
1279 1279
1280 pss_ctl &= ~(__PSS_LMEM_INIT_DONE | __PSS_LMEM_INIT_EN); 1280 pss_ctl &= ~(__PSS_LMEM_INIT_DONE | __PSS_LMEM_INIT_EN);
@@ -1503,7 +1503,7 @@ bfa_ioc_mbox_send(struct bfa_ioc_s *ioc, void *ioc_msg, int len)
1503 bfa_trc(ioc, msgp[0]); 1503 bfa_trc(ioc, msgp[0]);
1504 bfa_trc(ioc, len); 1504 bfa_trc(ioc, len);
1505 1505
1506 bfa_assert(len <= BFI_IOC_MSGLEN_MAX); 1506 WARN_ON(len > BFI_IOC_MSGLEN_MAX);
1507 1507
1508 /* 1508 /*
1509 * first write msg to mailbox registers 1509 * first write msg to mailbox registers
@@ -2010,7 +2010,7 @@ bfa_ioc_isr(struct bfa_ioc_s *ioc, struct bfi_mbmsg_s *m)
2010 2010
2011 default: 2011 default:
2012 bfa_trc(ioc, msg->mh.msg_id); 2012 bfa_trc(ioc, msg->mh.msg_id);
2013 bfa_assert(0); 2013 WARN_ON(1);
2014 } 2014 }
2015} 2015}
2016 2016
@@ -2345,7 +2345,7 @@ bfa_ioc_get_type(struct bfa_ioc_s *ioc)
2345 else if (ioc->ioc_mc == BFI_MC_LL) 2345 else if (ioc->ioc_mc == BFI_MC_LL)
2346 return BFA_IOC_TYPE_LL; 2346 return BFA_IOC_TYPE_LL;
2347 else { 2347 else {
2348 bfa_assert(ioc->ioc_mc == BFI_MC_LL); 2348 WARN_ON(ioc->ioc_mc != BFI_MC_LL);
2349 return BFA_IOC_TYPE_LL; 2349 return BFA_IOC_TYPE_LL;
2350 } 2350 }
2351} 2351}
@@ -2369,7 +2369,7 @@ bfa_ioc_get_adapter_fw_ver(struct bfa_ioc_s *ioc, char *fw_ver)
2369void 2369void
2370bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev) 2370bfa_ioc_get_pci_chip_rev(struct bfa_ioc_s *ioc, char *chip_rev)
2371{ 2371{
2372 bfa_assert(chip_rev); 2372 WARN_ON(!chip_rev);
2373 2373
2374 memset((void *)chip_rev, 0, BFA_IOC_CHIP_REV_LEN); 2374 memset((void *)chip_rev, 0, BFA_IOC_CHIP_REV_LEN);
2375 2375
@@ -2401,7 +2401,7 @@ bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model)
2401{ 2401{
2402 struct bfi_ioc_attr_s *ioc_attr; 2402 struct bfi_ioc_attr_s *ioc_attr;
2403 2403
2404 bfa_assert(model); 2404 WARN_ON(!model);
2405 memset((void *)model, 0, BFA_ADAPTER_MODEL_NAME_LEN); 2405 memset((void *)model, 0, BFA_ADAPTER_MODEL_NAME_LEN);
2406 2406
2407 ioc_attr = ioc->attr; 2407 ioc_attr = ioc->attr;
@@ -2772,8 +2772,8 @@ bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer,
2772 void (*timercb) (void *), void *arg, unsigned int timeout) 2772 void (*timercb) (void *), void *arg, unsigned int timeout)
2773{ 2773{
2774 2774
2775 bfa_assert(timercb != NULL); 2775 WARN_ON(timercb == NULL);
2776 bfa_assert(!bfa_q_is_on_q(&mod->timer_q, timer)); 2776 WARN_ON(bfa_q_is_on_q(&mod->timer_q, timer));
2777 2777
2778 timer->timeout = timeout; 2778 timer->timeout = timeout;
2779 timer->timercb = timercb; 2779 timer->timercb = timercb;
@@ -2788,7 +2788,7 @@ bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer,
2788void 2788void
2789bfa_timer_stop(struct bfa_timer_s *timer) 2789bfa_timer_stop(struct bfa_timer_s *timer)
2790{ 2790{
2791 bfa_assert(!list_empty(&timer->qe)); 2791 WARN_ON(list_empty(&timer->qe));
2792 2792
2793 list_del(&timer->qe); 2793 list_del(&timer->qe);
2794} 2794}