aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-12-27 00:48:53 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-31 10:38:53 -0500
commit2f2f40a45845e52fbbe07bcd3e09ccff44feb01b (patch)
tree687e69e250d3e501c31a972d3498e35ed1e2c644 /drivers/scsi
parentd4b671c58ebeb56dfc8fe8bcca25e0a06bc9359a (diff)
[SCSI] bfa: remove inactive functions
This patch removes some inactive functions and macros. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bfa/Makefile2
-rw-r--r--drivers/scsi/bfa/bfa_core.c8
-rw-r--r--drivers/scsi/bfa/bfa_cs.h35
-rw-r--r--drivers/scsi/bfa/bfa_fcpim.c23
-rw-r--r--drivers/scsi/bfa/bfa_svc.c4
-rw-r--r--drivers/scsi/bfa/bfad.c1
-rw-r--r--drivers/scsi/bfa/bfad_im.c1
7 files changed, 0 insertions, 74 deletions
diff --git a/drivers/scsi/bfa/Makefile b/drivers/scsi/bfa/Makefile
index ed26a6a97a44..4ce6f4942327 100644
--- a/drivers/scsi/bfa/Makefile
+++ b/drivers/scsi/bfa/Makefile
@@ -4,5 +4,3 @@ bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o
4bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o 4bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o
5bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o 5bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o
6bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o 6bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o
7
8ccflags-y := -DBFA_PERF_BUILD
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
index 6e13ba249c83..d6c7e05ae4ce 100644
--- a/drivers/scsi/bfa/bfa_core.c
+++ b/drivers/scsi/bfa/bfa_core.c
@@ -296,8 +296,6 @@ bfa_msix_rspq(struct bfa_s *bfa, int qid)
296 u32 pi, ci; 296 u32 pi, ci;
297 struct list_head *waitq; 297 struct list_head *waitq;
298 298
299 bfa_trc_fp(bfa, qid);
300
301 qid &= (BFI_IOC_MAX_CQS - 1); 299 qid &= (BFI_IOC_MAX_CQS - 1);
302 300
303 bfa->iocfc.hwif.hw_rspq_ack(bfa, qid); 301 bfa->iocfc.hwif.hw_rspq_ack(bfa, qid);
@@ -305,16 +303,10 @@ bfa_msix_rspq(struct bfa_s *bfa, int qid)
305 ci = bfa_rspq_ci(bfa, qid); 303 ci = bfa_rspq_ci(bfa, qid);
306 pi = bfa_rspq_pi(bfa, qid); 304 pi = bfa_rspq_pi(bfa, qid);
307 305
308 bfa_trc_fp(bfa, ci);
309 bfa_trc_fp(bfa, pi);
310
311 if (bfa->rme_process) { 306 if (bfa->rme_process) {
312 while (ci != pi) { 307 while (ci != pi) {
313 m = bfa_rspq_elem(bfa, qid, ci); 308 m = bfa_rspq_elem(bfa, qid, ci);
314 bfa_assert_fp(m->mhdr.msg_class < BFI_MC_MAX);
315
316 bfa_isrs[m->mhdr.msg_class] (bfa, m); 309 bfa_isrs[m->mhdr.msg_class] (bfa, m);
317
318 CQ_INCR(ci, bfa->iocfc.cfg.drvcfg.num_rspq_elems); 310 CQ_INCR(ci, bfa->iocfc.cfg.drvcfg.num_rspq_elems);
319 } 311 }
320 } 312 }
diff --git a/drivers/scsi/bfa/bfa_cs.h b/drivers/scsi/bfa/bfa_cs.h
index 913057dcb401..12bfeed268eb 100644
--- a/drivers/scsi/bfa/bfa_cs.h
+++ b/drivers/scsi/bfa/bfa_cs.h
@@ -107,13 +107,6 @@ bfa_trc_stop(struct bfa_trc_mod_s *trcm)
107 trcm->stopped = 1; 107 trcm->stopped = 1;
108} 108}
109 109
110#ifdef FWTRC
111extern void dc_flush(void *data);
112#else
113#define dc_flush(data)
114#endif
115
116
117static inline void 110static inline void
118__bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data) 111__bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data)
119{ 112{
@@ -127,12 +120,10 @@ __bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data)
127 trc->line = (u16) line; 120 trc->line = (u16) line;
128 trc->data.u64 = data; 121 trc->data.u64 = data;
129 trc->timestamp = BFA_TRC_TS(trcm); 122 trc->timestamp = BFA_TRC_TS(trcm);
130 dc_flush(trc);
131 123
132 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); 124 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1);
133 if (trcm->tail == trcm->head) 125 if (trcm->tail == trcm->head)
134 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); 126 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1);
135 dc_flush(trcm);
136} 127}
137 128
138 129
@@ -149,32 +140,18 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
149 trc->line = (u16) line; 140 trc->line = (u16) line;
150 trc->data.u32.u32 = data; 141 trc->data.u32.u32 = data;
151 trc->timestamp = BFA_TRC_TS(trcm); 142 trc->timestamp = BFA_TRC_TS(trcm);
152 dc_flush(trc);
153 143
154 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); 144 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1);
155 if (trcm->tail == trcm->head) 145 if (trcm->tail == trcm->head)
156 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); 146 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1);
157 dc_flush(trcm);
158} 147}
159 148
160#ifndef BFA_PERF_BUILD
161#define bfa_trc_fp(_trcp, _data) bfa_trc(_trcp, _data)
162#else
163#define bfa_trc_fp(_trcp, _data)
164#endif
165
166#define bfa_sm_fault(__mod, __event) do { \ 149#define bfa_sm_fault(__mod, __event) do { \
167 bfa_trc(__mod, (((u32)0xDEAD << 16) | __event)); \ 150 bfa_trc(__mod, (((u32)0xDEAD << 16) | __event)); \
168 printk(KERN_ERR "Assertion failure: %s:%d: %d", \ 151 printk(KERN_ERR "Assertion failure: %s:%d: %d", \
169 __FILE__, __LINE__, (__event)); \ 152 __FILE__, __LINE__, (__event)); \
170} while (0) 153} while (0)
171 154
172#ifndef BFA_PERF_BUILD
173#define bfa_assert_fp(__cond) bfa_assert(__cond)
174#else
175#define bfa_assert_fp(__cond)
176#endif
177
178/* BFA queue definitions */ 155/* BFA queue definitions */
179#define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next)) 156#define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next))
180#define bfa_q_next(_qe) (((struct list_head *) (_qe))->next) 157#define bfa_q_next(_qe) (((struct list_head *) (_qe))->next)
@@ -197,7 +174,6 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
197 bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \ 174 bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \
198 (struct list_head *) (_q); \ 175 (struct list_head *) (_q); \
199 bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe));\ 176 bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe));\
200 BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \
201 } else { \ 177 } else { \
202 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\ 178 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\
203 } \ 179 } \
@@ -212,7 +188,6 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
212 bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \ 188 bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \
213 (struct list_head *) (_q); \ 189 (struct list_head *) (_q); \
214 bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\ 190 bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\
215 BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \
216 } else { \ 191 } else { \
217 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\ 192 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\
218 } \ 193 } \
@@ -234,16 +209,6 @@ bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
234 return 0; 209 return 0;
235} 210}
236 211
237/*
238 * #ifdef BFA_DEBUG (Using bfa_assert to check for debug_build is not
239 * consistent across modules)
240 */
241#ifndef BFA_PERF_BUILD
242#define BFA_Q_DBG_INIT(_qe) bfa_q_qe_init(_qe)
243#else
244#define BFA_Q_DBG_INIT(_qe)
245#endif
246
247#define bfa_q_is_on_q(_q, _qe) \ 212#define bfa_q_is_on_q(_q, _qe) \
248 bfa_q_is_on_q_func(_q, (struct list_head *)(_qe)) 213 bfa_q_is_on_q_func(_q, (struct list_head *)(_qe))
249 214
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index f57c066725da..a4989a02e494 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -1367,9 +1367,6 @@ bfa_itnim_clear_stats(struct bfa_itnim_s *itnim)
1367static void 1367static void
1368bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1368bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1369{ 1369{
1370 bfa_trc_fp(ioim->bfa, ioim->iotag);
1371 bfa_trc_fp(ioim->bfa, event);
1372
1373 switch (event) { 1370 switch (event) {
1374 case BFA_IOIM_SM_START: 1371 case BFA_IOIM_SM_START:
1375 if (!bfa_itnim_is_online(ioim->itnim)) { 1372 if (!bfa_itnim_is_online(ioim->itnim)) {
@@ -1479,9 +1476,6 @@ bfa_ioim_sm_sgalloc(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1479static void 1476static void
1480bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1477bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1481{ 1478{
1482 bfa_trc_fp(ioim->bfa, ioim->iotag);
1483 bfa_trc_fp(ioim->bfa, event);
1484
1485 switch (event) { 1479 switch (event) {
1486 case BFA_IOIM_SM_COMP_GOOD: 1480 case BFA_IOIM_SM_COMP_GOOD:
1487 bfa_sm_set_state(ioim, bfa_ioim_sm_hcb); 1481 bfa_sm_set_state(ioim, bfa_ioim_sm_hcb);
@@ -1563,9 +1557,6 @@ bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1563static void 1557static void
1564bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1558bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1565{ 1559{
1566 bfa_trc_fp(ioim->bfa, ioim->iotag);
1567 bfa_trc_fp(ioim->bfa, event);
1568
1569 switch (event) { 1560 switch (event) {
1570 case BFA_IOIM_SM_FREE: 1561 case BFA_IOIM_SM_FREE:
1571 /* abts and rrq done. Now retry the IO with new tag */ 1562 /* abts and rrq done. Now retry the IO with new tag */
@@ -1886,9 +1877,6 @@ bfa_ioim_sm_cleanup_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1886static void 1877static void
1887bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1878bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1888{ 1879{
1889 bfa_trc_fp(ioim->bfa, ioim->iotag);
1890 bfa_trc_fp(ioim->bfa, event);
1891
1892 switch (event) { 1880 switch (event) {
1893 case BFA_IOIM_SM_HCB: 1881 case BFA_IOIM_SM_HCB:
1894 bfa_sm_set_state(ioim, bfa_ioim_sm_uninit); 1882 bfa_sm_set_state(ioim, bfa_ioim_sm_uninit);
@@ -2529,9 +2517,7 @@ bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
2529 ioim = BFA_IOIM_FROM_TAG(fcpim, iotag); 2517 ioim = BFA_IOIM_FROM_TAG(fcpim, iotag);
2530 WARN_ON(BFA_IOIM_TAG_2_ID(ioim->iotag) != iotag); 2518 WARN_ON(BFA_IOIM_TAG_2_ID(ioim->iotag) != iotag);
2531 2519
2532 bfa_trc_fp(ioim->bfa, ioim->iotag);
2533 bfa_ioim_cb_profile_comp(fcpim, ioim); 2520 bfa_ioim_cb_profile_comp(fcpim, ioim);
2534
2535 bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD); 2521 bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD);
2536} 2522}
2537 2523
@@ -2608,7 +2594,6 @@ bfa_ioim_alloc(struct bfa_s *bfa, struct bfad_ioim_s *dio,
2608 fcpim->ios_active++; 2594 fcpim->ios_active++;
2609 2595
2610 list_add_tail(&ioim->qe, &itnim->io_q); 2596 list_add_tail(&ioim->qe, &itnim->io_q);
2611 bfa_trc_fp(ioim->bfa, ioim->iotag);
2612 2597
2613 return ioim; 2598 return ioim;
2614} 2599}
@@ -2618,12 +2603,6 @@ bfa_ioim_free(struct bfa_ioim_s *ioim)
2618{ 2603{
2619 struct bfa_fcpim_mod_s *fcpim = ioim->fcpim; 2604 struct bfa_fcpim_mod_s *fcpim = ioim->fcpim;
2620 2605
2621 bfa_trc_fp(ioim->bfa, ioim->iotag);
2622 bfa_assert_fp(bfa_sm_cmp_state(ioim, bfa_ioim_sm_uninit));
2623
2624 bfa_assert_fp(list_empty(&ioim->sgpg_q) ||
2625 (ioim->nsges > BFI_SGE_INLINE));
2626
2627 if (ioim->nsgpgs > 0) 2606 if (ioim->nsgpgs > 0)
2628 bfa_sgpg_mfree(ioim->bfa, &ioim->sgpg_q, ioim->nsgpgs); 2607 bfa_sgpg_mfree(ioim->bfa, &ioim->sgpg_q, ioim->nsgpgs);
2629 2608
@@ -2638,8 +2617,6 @@ bfa_ioim_free(struct bfa_ioim_s *ioim)
2638void 2617void
2639bfa_ioim_start(struct bfa_ioim_s *ioim) 2618bfa_ioim_start(struct bfa_ioim_s *ioim)
2640{ 2619{
2641 bfa_trc_fp(ioim->bfa, ioim->iotag);
2642
2643 bfa_ioim_cb_profile_start(ioim->fcpim, ioim); 2620 bfa_ioim_cb_profile_start(ioim->fcpim, ioim);
2644 2621
2645 /* 2622 /*
diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
index d33e93a7a672..6577d0d922f6 100644
--- a/drivers/scsi/bfa/bfa_svc.c
+++ b/drivers/scsi/bfa/bfa_svc.c
@@ -4670,8 +4670,6 @@ bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs)
4670 struct bfa_sgpg_s *hsgpg; 4670 struct bfa_sgpg_s *hsgpg;
4671 int i; 4671 int i;
4672 4672
4673 bfa_trc_fp(bfa, nsgpgs);
4674
4675 if (mod->free_sgpgs < nsgpgs) 4673 if (mod->free_sgpgs < nsgpgs)
4676 return BFA_STATUS_ENOMEM; 4674 return BFA_STATUS_ENOMEM;
4677 4675
@@ -4691,8 +4689,6 @@ bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg)
4691 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); 4689 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
4692 struct bfa_sgpg_wqe_s *wqe; 4690 struct bfa_sgpg_wqe_s *wqe;
4693 4691
4694 bfa_trc_fp(bfa, nsgpg);
4695
4696 mod->free_sgpgs += nsgpg; 4692 mod->free_sgpgs += nsgpg;
4697 WARN_ON(mod->free_sgpgs > mod->num_sgpgs); 4693 WARN_ON(mod->free_sgpgs > mod->num_sgpgs);
4698 4694
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index 4e94d28ae328..44524cf55d33 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1166,7 +1166,6 @@ bfad_intx(int irq, void *dev_id)
1166 spin_lock_irqsave(&bfad->bfad_lock, flags); 1166 spin_lock_irqsave(&bfad->bfad_lock, flags);
1167 bfa_comp_free(&bfad->bfa, &doneq); 1167 bfa_comp_free(&bfad->bfa, &doneq);
1168 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1168 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1169 bfa_trc_fp(bfad, irq);
1170 } 1169 }
1171 1170
1172 return IRQ_HANDLED; 1171 return IRQ_HANDLED;
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index f0bcda8f077f..c2b36179e8e8 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -1174,7 +1174,6 @@ bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd
1174 } 1174 }
1175 1175
1176 cmnd->host_scribble = (char *)hal_io; 1176 cmnd->host_scribble = (char *)hal_io;
1177 bfa_trc_fp(bfad, hal_io->iotag);
1178 bfa_ioim_start(hal_io); 1177 bfa_ioim_start(hal_io);
1179 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1178 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1180 1179