aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcpim.c
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-10-18 20:17:23 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-25 17:28:09 -0400
commit5fbe25c7a664601666895e8f95eaa59bd9741392 (patch)
treef2d452938ba5ba924d0e8cc4f173f963df13018e /drivers/scsi/bfa/bfa_fcpim.c
parentacdc79a60cb3cbbc9f07bb5032d890e9cf94f0ff (diff)
[SCSI] bfa: fix comments for c files
This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com) regarding comment blocks that begining with "/**". bfa driver comments currently do not follow kernel-doc convention, we hence replace all /** with /* and **/ with */. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcpim.c')
-rw-r--r--drivers/scsi/bfa/bfa_fcpim.c300
1 files changed, 150 insertions, 150 deletions
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index 8c585bd855ed..135c4427801c 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -26,7 +26,7 @@ BFA_MODULE(fcpim);
26 (__l->__stats += __r->__stats) 26 (__l->__stats += __r->__stats)
27 27
28 28
29/** 29/*
30 * BFA ITNIM Related definitions 30 * BFA ITNIM Related definitions
31 */ 31 */
32static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim); 32static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim);
@@ -72,7 +72,7 @@ static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim);
72 } \ 72 } \
73} while (0) 73} while (0)
74 74
75/** 75/*
76 * bfa_itnim_sm BFA itnim state machine 76 * bfa_itnim_sm BFA itnim state machine
77 */ 77 */
78 78
@@ -89,7 +89,7 @@ enum bfa_itnim_event {
89 BFA_ITNIM_SM_QRESUME = 9, /* queue space available */ 89 BFA_ITNIM_SM_QRESUME = 9, /* queue space available */
90}; 90};
91 91
92/** 92/*
93 * BFA IOIM related definitions 93 * BFA IOIM related definitions
94 */ 94 */
95#define bfa_ioim_move_to_comp_q(__ioim) do { \ 95#define bfa_ioim_move_to_comp_q(__ioim) do { \
@@ -107,11 +107,11 @@ enum bfa_itnim_event {
107 if ((__fcpim)->profile_start) \ 107 if ((__fcpim)->profile_start) \
108 (__fcpim)->profile_start(__ioim); \ 108 (__fcpim)->profile_start(__ioim); \
109} while (0) 109} while (0)
110/** 110/*
111 * hal_ioim_sm 111 * hal_ioim_sm
112 */ 112 */
113 113
114/** 114/*
115 * IO state machine events 115 * IO state machine events
116 */ 116 */
117enum bfa_ioim_event { 117enum bfa_ioim_event {
@@ -136,11 +136,11 @@ enum bfa_ioim_event {
136}; 136};
137 137
138 138
139/** 139/*
140 * BFA TSKIM related definitions 140 * BFA TSKIM related definitions
141 */ 141 */
142 142
143/** 143/*
144 * task management completion handling 144 * task management completion handling
145 */ 145 */
146#define bfa_tskim_qcomp(__tskim, __cbfn) do { \ 146#define bfa_tskim_qcomp(__tskim, __cbfn) do { \
@@ -165,7 +165,7 @@ enum bfa_tskim_event {
165 BFA_TSKIM_SM_CLEANUP_DONE = 9, /* TM abort completion */ 165 BFA_TSKIM_SM_CLEANUP_DONE = 9, /* TM abort completion */
166}; 166};
167 167
168/** 168/*
169 * forward declaration for BFA ITNIM functions 169 * forward declaration for BFA ITNIM functions
170 */ 170 */
171static void bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim); 171static void bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim);
@@ -183,7 +183,7 @@ static void bfa_itnim_iotov_start(struct bfa_itnim_s *itnim);
183static void bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim); 183static void bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim);
184static void bfa_itnim_iotov_delete(struct bfa_itnim_s *itnim); 184static void bfa_itnim_iotov_delete(struct bfa_itnim_s *itnim);
185 185
186/** 186/*
187 * forward declaration of ITNIM state machine 187 * forward declaration of ITNIM state machine
188 */ 188 */
189static void bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim, 189static void bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim,
@@ -217,7 +217,7 @@ static void bfa_itnim_sm_fwdelete_qfull(struct bfa_itnim_s *itnim,
217static void bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim, 217static void bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim,
218 enum bfa_itnim_event event); 218 enum bfa_itnim_event event);
219 219
220/** 220/*
221 * forward declaration for BFA IOIM functions 221 * forward declaration for BFA IOIM functions
222 */ 222 */
223static bfa_boolean_t bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim); 223static bfa_boolean_t bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim);
@@ -233,7 +233,7 @@ static void __bfa_cb_ioim_pathtov(void *cbarg, bfa_boolean_t complete);
233static bfa_boolean_t bfa_ioim_is_abortable(struct bfa_ioim_s *ioim); 233static bfa_boolean_t bfa_ioim_is_abortable(struct bfa_ioim_s *ioim);
234 234
235 235
236/** 236/*
237 * forward declaration of BFA IO state machine 237 * forward declaration of BFA IO state machine
238 */ 238 */
239static void bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, 239static void bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim,
@@ -261,7 +261,7 @@ static void bfa_ioim_sm_resfree(struct bfa_ioim_s *ioim,
261static void bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, 261static void bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim,
262 enum bfa_ioim_event event); 262 enum bfa_ioim_event event);
263 263
264/** 264/*
265 * forward declaration for BFA TSKIM functions 265 * forward declaration for BFA TSKIM functions
266 */ 266 */
267static void __bfa_cb_tskim_done(void *cbarg, bfa_boolean_t complete); 267static void __bfa_cb_tskim_done(void *cbarg, bfa_boolean_t complete);
@@ -276,7 +276,7 @@ static bfa_boolean_t bfa_tskim_send_abort(struct bfa_tskim_s *tskim);
276static void bfa_tskim_iocdisable_ios(struct bfa_tskim_s *tskim); 276static void bfa_tskim_iocdisable_ios(struct bfa_tskim_s *tskim);
277 277
278 278
279/** 279/*
280 * forward declaration of BFA TSKIM state machine 280 * forward declaration of BFA TSKIM state machine
281 */ 281 */
282static void bfa_tskim_sm_uninit(struct bfa_tskim_s *tskim, 282static void bfa_tskim_sm_uninit(struct bfa_tskim_s *tskim,
@@ -294,11 +294,11 @@ static void bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
294static void bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim, 294static void bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim,
295 enum bfa_tskim_event event); 295 enum bfa_tskim_event event);
296 296
297/** 297/*
298 * hal_fcpim_mod BFA FCP Initiator Mode module 298 * hal_fcpim_mod BFA FCP Initiator Mode module
299 */ 299 */
300 300
301/** 301/*
302 * Compute and return memory needed by FCP(im) module. 302 * Compute and return memory needed by FCP(im) module.
303 */ 303 */
304static void 304static void
@@ -307,7 +307,7 @@ bfa_fcpim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len,
307{ 307{
308 bfa_itnim_meminfo(cfg, km_len, dm_len); 308 bfa_itnim_meminfo(cfg, km_len, dm_len);
309 309
310 /** 310 /*
311 * IO memory 311 * IO memory
312 */ 312 */
313 if (cfg->fwcfg.num_ioim_reqs < BFA_IOIM_MIN) 313 if (cfg->fwcfg.num_ioim_reqs < BFA_IOIM_MIN)
@@ -320,7 +320,7 @@ bfa_fcpim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len,
320 320
321 *dm_len += cfg->fwcfg.num_ioim_reqs * BFI_IOIM_SNSLEN; 321 *dm_len += cfg->fwcfg.num_ioim_reqs * BFI_IOIM_SNSLEN;
322 322
323 /** 323 /*
324 * task management command memory 324 * task management command memory
325 */ 325 */
326 if (cfg->fwcfg.num_tskim_reqs < BFA_TSKIM_MIN) 326 if (cfg->fwcfg.num_tskim_reqs < BFA_TSKIM_MIN)
@@ -604,11 +604,11 @@ bfa_fcpim_set_ioredirect(struct bfa_s *bfa, bfa_boolean_t state)
604 604
605 605
606 606
607/** 607/*
608 * BFA ITNIM module state machine functions 608 * BFA ITNIM module state machine functions
609 */ 609 */
610 610
611/** 611/*
612 * Beginning/unallocated state - no events expected. 612 * Beginning/unallocated state - no events expected.
613 */ 613 */
614static void 614static void
@@ -629,7 +629,7 @@ bfa_itnim_sm_uninit(struct bfa_itnim_s *itnim, enum bfa_itnim_event event)
629 } 629 }
630} 630}
631 631
632/** 632/*
633 * Beginning state, only online event expected. 633 * Beginning state, only online event expected.
634 */ 634 */
635static void 635static void
@@ -660,7 +660,7 @@ bfa_itnim_sm_created(struct bfa_itnim_s *itnim, enum bfa_itnim_event event)
660 } 660 }
661} 661}
662 662
663/** 663/*
664 * Waiting for itnim create response from firmware. 664 * Waiting for itnim create response from firmware.
665 */ 665 */
666static void 666static void
@@ -732,7 +732,7 @@ bfa_itnim_sm_fwcreate_qfull(struct bfa_itnim_s *itnim,
732 } 732 }
733} 733}
734 734
735/** 735/*
736 * Waiting for itnim create response from firmware, a delete is pending. 736 * Waiting for itnim create response from firmware, a delete is pending.
737 */ 737 */
738static void 738static void
@@ -760,7 +760,7 @@ bfa_itnim_sm_delete_pending(struct bfa_itnim_s *itnim,
760 } 760 }
761} 761}
762 762
763/** 763/*
764 * Online state - normal parking state. 764 * Online state - normal parking state.
765 */ 765 */
766static void 766static void
@@ -802,7 +802,7 @@ bfa_itnim_sm_online(struct bfa_itnim_s *itnim, enum bfa_itnim_event event)
802 } 802 }
803} 803}
804 804
805/** 805/*
806 * Second level error recovery need. 806 * Second level error recovery need.
807 */ 807 */
808static void 808static void
@@ -833,7 +833,7 @@ bfa_itnim_sm_sler(struct bfa_itnim_s *itnim, enum bfa_itnim_event event)
833 } 833 }
834} 834}
835 835
836/** 836/*
837 * Going offline. Waiting for active IO cleanup. 837 * Going offline. Waiting for active IO cleanup.
838 */ 838 */
839static void 839static void
@@ -870,7 +870,7 @@ bfa_itnim_sm_cleanup_offline(struct bfa_itnim_s *itnim,
870 } 870 }
871} 871}
872 872
873/** 873/*
874 * Deleting itnim. Waiting for active IO cleanup. 874 * Deleting itnim. Waiting for active IO cleanup.
875 */ 875 */
876static void 876static void
@@ -898,7 +898,7 @@ bfa_itnim_sm_cleanup_delete(struct bfa_itnim_s *itnim,
898 } 898 }
899} 899}
900 900
901/** 901/*
902 * Rport offline. Fimrware itnim is being deleted - awaiting f/w response. 902 * Rport offline. Fimrware itnim is being deleted - awaiting f/w response.
903 */ 903 */
904static void 904static void
@@ -955,7 +955,7 @@ bfa_itnim_sm_fwdelete_qfull(struct bfa_itnim_s *itnim,
955 } 955 }
956} 956}
957 957
958/** 958/*
959 * Offline state. 959 * Offline state.
960 */ 960 */
961static void 961static void
@@ -987,7 +987,7 @@ bfa_itnim_sm_offline(struct bfa_itnim_s *itnim, enum bfa_itnim_event event)
987 } 987 }
988} 988}
989 989
990/** 990/*
991 * IOC h/w failed state. 991 * IOC h/w failed state.
992 */ 992 */
993static void 993static void
@@ -1023,7 +1023,7 @@ bfa_itnim_sm_iocdisable(struct bfa_itnim_s *itnim,
1023 } 1023 }
1024} 1024}
1025 1025
1026/** 1026/*
1027 * Itnim is deleted, waiting for firmware response to delete. 1027 * Itnim is deleted, waiting for firmware response to delete.
1028 */ 1028 */
1029static void 1029static void
@@ -1068,7 +1068,7 @@ bfa_itnim_sm_deleting_qfull(struct bfa_itnim_s *itnim,
1068 } 1068 }
1069} 1069}
1070 1070
1071/** 1071/*
1072 * Initiate cleanup of all IOs on an IOC failure. 1072 * Initiate cleanup of all IOs on an IOC failure.
1073 */ 1073 */
1074static void 1074static void
@@ -1088,7 +1088,7 @@ bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim)
1088 bfa_ioim_iocdisable(ioim); 1088 bfa_ioim_iocdisable(ioim);
1089 } 1089 }
1090 1090
1091 /** 1091 /*
1092 * For IO request in pending queue, we pretend an early timeout. 1092 * For IO request in pending queue, we pretend an early timeout.
1093 */ 1093 */
1094 list_for_each_safe(qe, qen, &itnim->pending_q) { 1094 list_for_each_safe(qe, qen, &itnim->pending_q) {
@@ -1102,7 +1102,7 @@ bfa_itnim_iocdisable_cleanup(struct bfa_itnim_s *itnim)
1102 } 1102 }
1103} 1103}
1104 1104
1105/** 1105/*
1106 * IO cleanup completion 1106 * IO cleanup completion
1107 */ 1107 */
1108static void 1108static void
@@ -1114,7 +1114,7 @@ bfa_itnim_cleanp_comp(void *itnim_cbarg)
1114 bfa_sm_send_event(itnim, BFA_ITNIM_SM_CLEANUP); 1114 bfa_sm_send_event(itnim, BFA_ITNIM_SM_CLEANUP);
1115} 1115}
1116 1116
1117/** 1117/*
1118 * Initiate cleanup of all IOs. 1118 * Initiate cleanup of all IOs.
1119 */ 1119 */
1120static void 1120static void
@@ -1129,7 +1129,7 @@ bfa_itnim_cleanup(struct bfa_itnim_s *itnim)
1129 list_for_each_safe(qe, qen, &itnim->io_q) { 1129 list_for_each_safe(qe, qen, &itnim->io_q) {
1130 ioim = (struct bfa_ioim_s *) qe; 1130 ioim = (struct bfa_ioim_s *) qe;
1131 1131
1132 /** 1132 /*
1133 * Move IO to a cleanup queue from active queue so that a later 1133 * Move IO to a cleanup queue from active queue so that a later
1134 * TM will not pickup this IO. 1134 * TM will not pickup this IO.
1135 */ 1135 */
@@ -1176,7 +1176,7 @@ __bfa_cb_itnim_sler(void *cbarg, bfa_boolean_t complete)
1176 bfa_cb_itnim_sler(itnim->ditn); 1176 bfa_cb_itnim_sler(itnim->ditn);
1177} 1177}
1178 1178
1179/** 1179/*
1180 * Call to resume any I/O requests waiting for room in request queue. 1180 * Call to resume any I/O requests waiting for room in request queue.
1181 */ 1181 */
1182static void 1182static void
@@ -1190,7 +1190,7 @@ bfa_itnim_qresume(void *cbarg)
1190 1190
1191 1191
1192 1192
1193/** 1193/*
1194 * bfa_itnim_public 1194 * bfa_itnim_public
1195 */ 1195 */
1196 1196
@@ -1210,7 +1210,7 @@ void
1210bfa_itnim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len, 1210bfa_itnim_meminfo(struct bfa_iocfc_cfg_s *cfg, u32 *km_len,
1211 u32 *dm_len) 1211 u32 *dm_len)
1212{ 1212{
1213 /** 1213 /*
1214 * ITN memory 1214 * ITN memory
1215 */ 1215 */
1216 *km_len += cfg->fwcfg.num_rports * sizeof(struct bfa_itnim_s); 1216 *km_len += cfg->fwcfg.num_rports * sizeof(struct bfa_itnim_s);
@@ -1264,7 +1264,7 @@ bfa_itnim_send_fwcreate(struct bfa_itnim_s *itnim)
1264 1264
1265 itnim->msg_no++; 1265 itnim->msg_no++;
1266 1266
1267 /** 1267 /*
1268 * check for room in queue to send request now 1268 * check for room in queue to send request now
1269 */ 1269 */
1270 m = bfa_reqq_next(itnim->bfa, itnim->reqq); 1270 m = bfa_reqq_next(itnim->bfa, itnim->reqq);
@@ -1281,7 +1281,7 @@ bfa_itnim_send_fwcreate(struct bfa_itnim_s *itnim)
1281 m->msg_no = itnim->msg_no; 1281 m->msg_no = itnim->msg_no;
1282 bfa_stats(itnim, fw_create); 1282 bfa_stats(itnim, fw_create);
1283 1283
1284 /** 1284 /*
1285 * queue I/O message to firmware 1285 * queue I/O message to firmware
1286 */ 1286 */
1287 bfa_reqq_produce(itnim->bfa, itnim->reqq); 1287 bfa_reqq_produce(itnim->bfa, itnim->reqq);
@@ -1293,7 +1293,7 @@ bfa_itnim_send_fwdelete(struct bfa_itnim_s *itnim)
1293{ 1293{
1294 struct bfi_itnim_delete_req_s *m; 1294 struct bfi_itnim_delete_req_s *m;
1295 1295
1296 /** 1296 /*
1297 * check for room in queue to send request now 1297 * check for room in queue to send request now
1298 */ 1298 */
1299 m = bfa_reqq_next(itnim->bfa, itnim->reqq); 1299 m = bfa_reqq_next(itnim->bfa, itnim->reqq);
@@ -1307,14 +1307,14 @@ bfa_itnim_send_fwdelete(struct bfa_itnim_s *itnim)
1307 m->fw_handle = itnim->rport->fw_handle; 1307 m->fw_handle = itnim->rport->fw_handle;
1308 bfa_stats(itnim, fw_delete); 1308 bfa_stats(itnim, fw_delete);
1309 1309
1310 /** 1310 /*
1311 * queue I/O message to firmware 1311 * queue I/O message to firmware
1312 */ 1312 */
1313 bfa_reqq_produce(itnim->bfa, itnim->reqq); 1313 bfa_reqq_produce(itnim->bfa, itnim->reqq);
1314 return BFA_TRUE; 1314 return BFA_TRUE;
1315} 1315}
1316 1316
1317/** 1317/*
1318 * Cleanup all pending failed inflight requests. 1318 * Cleanup all pending failed inflight requests.
1319 */ 1319 */
1320static void 1320static void
@@ -1329,7 +1329,7 @@ bfa_itnim_delayed_comp(struct bfa_itnim_s *itnim, bfa_boolean_t iotov)
1329 } 1329 }
1330} 1330}
1331 1331
1332/** 1332/*
1333 * Start all pending IO requests. 1333 * Start all pending IO requests.
1334 */ 1334 */
1335static void 1335static void
@@ -1339,12 +1339,12 @@ bfa_itnim_iotov_online(struct bfa_itnim_s *itnim)
1339 1339
1340 bfa_itnim_iotov_stop(itnim); 1340 bfa_itnim_iotov_stop(itnim);
1341 1341
1342 /** 1342 /*
1343 * Abort all inflight IO requests in the queue 1343 * Abort all inflight IO requests in the queue
1344 */ 1344 */
1345 bfa_itnim_delayed_comp(itnim, BFA_FALSE); 1345 bfa_itnim_delayed_comp(itnim, BFA_FALSE);
1346 1346
1347 /** 1347 /*
1348 * Start all pending IO requests. 1348 * Start all pending IO requests.
1349 */ 1349 */
1350 while (!list_empty(&itnim->pending_q)) { 1350 while (!list_empty(&itnim->pending_q)) {
@@ -1354,7 +1354,7 @@ bfa_itnim_iotov_online(struct bfa_itnim_s *itnim)
1354 } 1354 }
1355} 1355}
1356 1356
1357/** 1357/*
1358 * Fail all pending IO requests 1358 * Fail all pending IO requests
1359 */ 1359 */
1360static void 1360static void
@@ -1362,12 +1362,12 @@ bfa_itnim_iotov_cleanup(struct bfa_itnim_s *itnim)
1362{ 1362{
1363 struct bfa_ioim_s *ioim; 1363 struct bfa_ioim_s *ioim;
1364 1364
1365 /** 1365 /*
1366 * Fail all inflight IO requests in the queue 1366 * Fail all inflight IO requests in the queue
1367 */ 1367 */
1368 bfa_itnim_delayed_comp(itnim, BFA_TRUE); 1368 bfa_itnim_delayed_comp(itnim, BFA_TRUE);
1369 1369
1370 /** 1370 /*
1371 * Fail any pending IO requests. 1371 * Fail any pending IO requests.
1372 */ 1372 */
1373 while (!list_empty(&itnim->pending_q)) { 1373 while (!list_empty(&itnim->pending_q)) {
@@ -1377,7 +1377,7 @@ bfa_itnim_iotov_cleanup(struct bfa_itnim_s *itnim)
1377 } 1377 }
1378} 1378}
1379 1379
1380/** 1380/*
1381 * IO TOV timer callback. Fail any pending IO requests. 1381 * IO TOV timer callback. Fail any pending IO requests.
1382 */ 1382 */
1383static void 1383static void
@@ -1392,7 +1392,7 @@ bfa_itnim_iotov(void *itnim_arg)
1392 bfa_cb_itnim_tov(itnim->ditn); 1392 bfa_cb_itnim_tov(itnim->ditn);
1393} 1393}
1394 1394
1395/** 1395/*
1396 * Start IO TOV timer for failing back pending IO requests in offline state. 1396 * Start IO TOV timer for failing back pending IO requests in offline state.
1397 */ 1397 */
1398static void 1398static void
@@ -1407,7 +1407,7 @@ bfa_itnim_iotov_start(struct bfa_itnim_s *itnim)
1407 } 1407 }
1408} 1408}
1409 1409
1410/** 1410/*
1411 * Stop IO TOV timer. 1411 * Stop IO TOV timer.
1412 */ 1412 */
1413static void 1413static void
@@ -1419,7 +1419,7 @@ bfa_itnim_iotov_stop(struct bfa_itnim_s *itnim)
1419 } 1419 }
1420} 1420}
1421 1421
1422/** 1422/*
1423 * Stop IO TOV timer. 1423 * Stop IO TOV timer.
1424 */ 1424 */
1425static void 1425static void
@@ -1459,11 +1459,11 @@ bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim)
1459 1459
1460 1460
1461 1461
1462/** 1462/*
1463 * bfa_itnim_public 1463 * bfa_itnim_public
1464 */ 1464 */
1465 1465
1466/** 1466/*
1467 * Itnim interrupt processing. 1467 * Itnim interrupt processing.
1468 */ 1468 */
1469void 1469void
@@ -1509,7 +1509,7 @@ bfa_itnim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
1509 1509
1510 1510
1511 1511
1512/** 1512/*
1513 * bfa_itnim_api 1513 * bfa_itnim_api
1514 */ 1514 */
1515 1515
@@ -1552,7 +1552,7 @@ bfa_itnim_offline(struct bfa_itnim_s *itnim)
1552 bfa_sm_send_event(itnim, BFA_ITNIM_SM_OFFLINE); 1552 bfa_sm_send_event(itnim, BFA_ITNIM_SM_OFFLINE);
1553} 1553}
1554 1554
1555/** 1555/*
1556 * Return true if itnim is considered offline for holding off IO request. 1556 * Return true if itnim is considered offline for holding off IO request.
1557 * IO is not held if itnim is being deleted. 1557 * IO is not held if itnim is being deleted.
1558 */ 1558 */
@@ -1603,11 +1603,11 @@ bfa_itnim_clear_stats(struct bfa_itnim_s *itnim)
1603 itnim->ioprofile.io_latency.min[j] = ~0; 1603 itnim->ioprofile.io_latency.min[j] = ~0;
1604} 1604}
1605 1605
1606/** 1606/*
1607 * BFA IO module state machine functions 1607 * BFA IO module state machine functions
1608 */ 1608 */
1609 1609
1610/** 1610/*
1611 * IO is not started (unallocated). 1611 * IO is not started (unallocated).
1612 */ 1612 */
1613static void 1613static void
@@ -1657,7 +1657,7 @@ bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1657 break; 1657 break;
1658 1658
1659 case BFA_IOIM_SM_ABORT: 1659 case BFA_IOIM_SM_ABORT:
1660 /** 1660 /*
1661 * IO in pending queue can get abort requests. Complete abort 1661 * IO in pending queue can get abort requests. Complete abort
1662 * requests immediately. 1662 * requests immediately.
1663 */ 1663 */
@@ -1672,7 +1672,7 @@ bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1672 } 1672 }
1673} 1673}
1674 1674
1675/** 1675/*
1676 * IO is waiting for SG pages. 1676 * IO is waiting for SG pages.
1677 */ 1677 */
1678static void 1678static void
@@ -1719,7 +1719,7 @@ bfa_ioim_sm_sgalloc(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1719 } 1719 }
1720} 1720}
1721 1721
1722/** 1722/*
1723 * IO is active. 1723 * IO is active.
1724 */ 1724 */
1725static void 1725static void
@@ -1803,7 +1803,7 @@ bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1803 } 1803 }
1804} 1804}
1805 1805
1806/** 1806/*
1807* IO is retried with new tag. 1807* IO is retried with new tag.
1808*/ 1808*/
1809static void 1809static void
@@ -1844,7 +1844,7 @@ bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1844 break; 1844 break;
1845 1845
1846 case BFA_IOIM_SM_ABORT: 1846 case BFA_IOIM_SM_ABORT:
1847 /** in this state IO abort is done. 1847 /* in this state IO abort is done.
1848 * Waiting for IO tag resource free. 1848 * Waiting for IO tag resource free.
1849 */ 1849 */
1850 bfa_sm_set_state(ioim, bfa_ioim_sm_hcb_free); 1850 bfa_sm_set_state(ioim, bfa_ioim_sm_hcb_free);
@@ -1857,7 +1857,7 @@ bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1857 } 1857 }
1858} 1858}
1859 1859
1860/** 1860/*
1861 * IO is being aborted, waiting for completion from firmware. 1861 * IO is being aborted, waiting for completion from firmware.
1862 */ 1862 */
1863static void 1863static void
@@ -1919,7 +1919,7 @@ bfa_ioim_sm_abort(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1919 } 1919 }
1920} 1920}
1921 1921
1922/** 1922/*
1923 * IO is being cleaned up (implicit abort), waiting for completion from 1923 * IO is being cleaned up (implicit abort), waiting for completion from
1924 * firmware. 1924 * firmware.
1925 */ 1925 */
@@ -1937,7 +1937,7 @@ bfa_ioim_sm_cleanup(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1937 break; 1937 break;
1938 1938
1939 case BFA_IOIM_SM_ABORT: 1939 case BFA_IOIM_SM_ABORT:
1940 /** 1940 /*
1941 * IO is already being aborted implicitly 1941 * IO is already being aborted implicitly
1942 */ 1942 */
1943 ioim->io_cbfn = __bfa_cb_ioim_abort; 1943 ioim->io_cbfn = __bfa_cb_ioim_abort;
@@ -1969,7 +1969,7 @@ bfa_ioim_sm_cleanup(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1969 break; 1969 break;
1970 1970
1971 case BFA_IOIM_SM_CLEANUP: 1971 case BFA_IOIM_SM_CLEANUP:
1972 /** 1972 /*
1973 * IO can be in cleanup state already due to TM command. 1973 * IO can be in cleanup state already due to TM command.
1974 * 2nd cleanup request comes from ITN offline event. 1974 * 2nd cleanup request comes from ITN offline event.
1975 */ 1975 */
@@ -1980,7 +1980,7 @@ bfa_ioim_sm_cleanup(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
1980 } 1980 }
1981} 1981}
1982 1982
1983/** 1983/*
1984 * IO is waiting for room in request CQ 1984 * IO is waiting for room in request CQ
1985 */ 1985 */
1986static void 1986static void
@@ -2024,7 +2024,7 @@ bfa_ioim_sm_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2024 } 2024 }
2025} 2025}
2026 2026
2027/** 2027/*
2028 * Active IO is being aborted, waiting for room in request CQ. 2028 * Active IO is being aborted, waiting for room in request CQ.
2029 */ 2029 */
2030static void 2030static void
@@ -2075,7 +2075,7 @@ bfa_ioim_sm_abort_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2075 } 2075 }
2076} 2076}
2077 2077
2078/** 2078/*
2079 * Active IO is being cleaned up, waiting for room in request CQ. 2079 * Active IO is being cleaned up, waiting for room in request CQ.
2080 */ 2080 */
2081static void 2081static void
@@ -2091,7 +2091,7 @@ bfa_ioim_sm_cleanup_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2091 break; 2091 break;
2092 2092
2093 case BFA_IOIM_SM_ABORT: 2093 case BFA_IOIM_SM_ABORT:
2094 /** 2094 /*
2095 * IO is alraedy being cleaned up implicitly 2095 * IO is alraedy being cleaned up implicitly
2096 */ 2096 */
2097 ioim->io_cbfn = __bfa_cb_ioim_abort; 2097 ioim->io_cbfn = __bfa_cb_ioim_abort;
@@ -2125,7 +2125,7 @@ bfa_ioim_sm_cleanup_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2125 } 2125 }
2126} 2126}
2127 2127
2128/** 2128/*
2129 * IO bfa callback is pending. 2129 * IO bfa callback is pending.
2130 */ 2130 */
2131static void 2131static void
@@ -2152,7 +2152,7 @@ bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2152 } 2152 }
2153} 2153}
2154 2154
2155/** 2155/*
2156 * IO bfa callback is pending. IO resource cannot be freed. 2156 * IO bfa callback is pending. IO resource cannot be freed.
2157 */ 2157 */
2158static void 2158static void
@@ -2185,7 +2185,7 @@ bfa_ioim_sm_hcb_free(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2185 } 2185 }
2186} 2186}
2187 2187
2188/** 2188/*
2189 * IO is completed, waiting resource free from firmware. 2189 * IO is completed, waiting resource free from firmware.
2190 */ 2190 */
2191static void 2191static void
@@ -2214,7 +2214,7 @@ bfa_ioim_sm_resfree(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
2214 2214
2215 2215
2216 2216
2217/** 2217/*
2218 * hal_ioim_private 2218 * hal_ioim_private
2219 */ 2219 */
2220 2220
@@ -2247,7 +2247,7 @@ __bfa_cb_ioim_comp(void *cbarg, bfa_boolean_t complete)
2247 2247
2248 m = (struct bfi_ioim_rsp_s *) &ioim->iosp->comp_rspmsg; 2248 m = (struct bfi_ioim_rsp_s *) &ioim->iosp->comp_rspmsg;
2249 if (m->io_status == BFI_IOIM_STS_OK) { 2249 if (m->io_status == BFI_IOIM_STS_OK) {
2250 /** 2250 /*
2251 * setup sense information, if present 2251 * setup sense information, if present
2252 */ 2252 */
2253 if ((m->scsi_status == SCSI_STATUS_CHECK_CONDITION) && 2253 if ((m->scsi_status == SCSI_STATUS_CHECK_CONDITION) &&
@@ -2256,7 +2256,7 @@ __bfa_cb_ioim_comp(void *cbarg, bfa_boolean_t complete)
2256 snsinfo = ioim->iosp->snsinfo; 2256 snsinfo = ioim->iosp->snsinfo;
2257 } 2257 }
2258 2258
2259 /** 2259 /*
2260 * setup residue value correctly for normal completions 2260 * setup residue value correctly for normal completions
2261 */ 2261 */
2262 if (m->resid_flags == FCP_RESID_UNDER) { 2262 if (m->resid_flags == FCP_RESID_UNDER) {
@@ -2327,7 +2327,7 @@ bfa_ioim_sgpg_alloced(void *cbarg)
2327 bfa_sm_send_event(ioim, BFA_IOIM_SM_SGALLOCED); 2327 bfa_sm_send_event(ioim, BFA_IOIM_SM_SGALLOCED);
2328} 2328}
2329 2329
2330/** 2330/*
2331 * Send I/O request to firmware. 2331 * Send I/O request to firmware.
2332 */ 2332 */
2333static bfa_boolean_t 2333static bfa_boolean_t
@@ -2343,7 +2343,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2343 struct scatterlist *sg; 2343 struct scatterlist *sg;
2344 struct scsi_cmnd *cmnd = (struct scsi_cmnd *) ioim->dio; 2344 struct scsi_cmnd *cmnd = (struct scsi_cmnd *) ioim->dio;
2345 2345
2346 /** 2346 /*
2347 * check for room in queue to send request now 2347 * check for room in queue to send request now
2348 */ 2348 */
2349 m = bfa_reqq_next(ioim->bfa, ioim->reqq); 2349 m = bfa_reqq_next(ioim->bfa, ioim->reqq);
@@ -2354,14 +2354,14 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2354 return BFA_FALSE; 2354 return BFA_FALSE;
2355 } 2355 }
2356 2356
2357 /** 2357 /*
2358 * build i/o request message next 2358 * build i/o request message next
2359 */ 2359 */
2360 m->io_tag = cpu_to_be16(ioim->iotag); 2360 m->io_tag = cpu_to_be16(ioim->iotag);
2361 m->rport_hdl = ioim->itnim->rport->fw_handle; 2361 m->rport_hdl = ioim->itnim->rport->fw_handle;
2362 m->io_timeout = bfa_cb_ioim_get_timeout(ioim->dio); 2362 m->io_timeout = bfa_cb_ioim_get_timeout(ioim->dio);
2363 2363
2364 /** 2364 /*
2365 * build inline IO SG element here 2365 * build inline IO SG element here
2366 */ 2366 */
2367 sge = &m->sges[0]; 2367 sge = &m->sges[0];
@@ -2387,7 +2387,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2387 sge->flags = BFI_SGE_PGDLEN; 2387 sge->flags = BFI_SGE_PGDLEN;
2388 bfa_sge_to_be(sge); 2388 bfa_sge_to_be(sge);
2389 2389
2390 /** 2390 /*
2391 * set up I/O command parameters 2391 * set up I/O command parameters
2392 */ 2392 */
2393 m->cmnd = cmnd_z0; 2393 m->cmnd = cmnd_z0;
@@ -2397,7 +2397,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2397 fcp_dl = bfa_cb_ioim_get_size(ioim->dio); 2397 fcp_dl = bfa_cb_ioim_get_size(ioim->dio);
2398 m->cmnd.fcp_dl = cpu_to_be32(fcp_dl); 2398 m->cmnd.fcp_dl = cpu_to_be32(fcp_dl);
2399 2399
2400 /** 2400 /*
2401 * set up I/O message header 2401 * set up I/O message header
2402 */ 2402 */
2403 switch (m->cmnd.iodir) { 2403 switch (m->cmnd.iodir) {
@@ -2426,7 +2426,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2426 m->cmnd.priority = bfa_cb_ioim_get_priority(ioim->dio); 2426 m->cmnd.priority = bfa_cb_ioim_get_priority(ioim->dio);
2427 m->cmnd.taskattr = bfa_cb_ioim_get_taskattr(ioim->dio); 2427 m->cmnd.taskattr = bfa_cb_ioim_get_taskattr(ioim->dio);
2428 2428
2429 /** 2429 /*
2430 * Handle large CDB (>16 bytes). 2430 * Handle large CDB (>16 bytes).
2431 */ 2431 */
2432 m->cmnd.addl_cdb_len = (bfa_cb_ioim_get_cdblen(ioim->dio) - 2432 m->cmnd.addl_cdb_len = (bfa_cb_ioim_get_cdblen(ioim->dio) -
@@ -2440,14 +2440,14 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim)
2440 } 2440 }
2441#endif 2441#endif
2442 2442
2443 /** 2443 /*
2444 * queue I/O message to firmware 2444 * queue I/O message to firmware
2445 */ 2445 */
2446 bfa_reqq_produce(ioim->bfa, ioim->reqq); 2446 bfa_reqq_produce(ioim->bfa, ioim->reqq);
2447 return BFA_TRUE; 2447 return BFA_TRUE;
2448} 2448}
2449 2449
2450/** 2450/*
2451 * Setup any additional SG pages needed.Inline SG element is setup 2451 * Setup any additional SG pages needed.Inline SG element is setup
2452 * at queuing time. 2452 * at queuing time.
2453 */ 2453 */
@@ -2458,7 +2458,7 @@ bfa_ioim_sge_setup(struct bfa_ioim_s *ioim)
2458 2458
2459 bfa_assert(ioim->nsges > BFI_SGE_INLINE); 2459 bfa_assert(ioim->nsges > BFI_SGE_INLINE);
2460 2460
2461 /** 2461 /*
2462 * allocate SG pages needed 2462 * allocate SG pages needed
2463 */ 2463 */
2464 nsgpgs = BFA_SGPG_NPAGE(ioim->nsges); 2464 nsgpgs = BFA_SGPG_NPAGE(ioim->nsges);
@@ -2507,7 +2507,7 @@ bfa_ioim_sgpg_setup(struct bfa_ioim_s *ioim)
2507 sge->sg_len = sg_dma_len(sg); 2507 sge->sg_len = sg_dma_len(sg);
2508 pgcumsz += sge->sg_len; 2508 pgcumsz += sge->sg_len;
2509 2509
2510 /** 2510 /*
2511 * set flags 2511 * set flags
2512 */ 2512 */
2513 if (i < (nsges - 1)) 2513 if (i < (nsges - 1))
@@ -2522,7 +2522,7 @@ bfa_ioim_sgpg_setup(struct bfa_ioim_s *ioim)
2522 2522
2523 sgpg = (struct bfa_sgpg_s *) bfa_q_next(sgpg); 2523 sgpg = (struct bfa_sgpg_s *) bfa_q_next(sgpg);
2524 2524
2525 /** 2525 /*
2526 * set the link element of each page 2526 * set the link element of each page
2527 */ 2527 */
2528 if (sgeid == ioim->nsges) { 2528 if (sgeid == ioim->nsges) {
@@ -2539,7 +2539,7 @@ bfa_ioim_sgpg_setup(struct bfa_ioim_s *ioim)
2539 } while (sgeid < ioim->nsges); 2539 } while (sgeid < ioim->nsges);
2540} 2540}
2541 2541
2542/** 2542/*
2543 * Send I/O abort request to firmware. 2543 * Send I/O abort request to firmware.
2544 */ 2544 */
2545static bfa_boolean_t 2545static bfa_boolean_t
@@ -2548,14 +2548,14 @@ bfa_ioim_send_abort(struct bfa_ioim_s *ioim)
2548 struct bfi_ioim_abort_req_s *m; 2548 struct bfi_ioim_abort_req_s *m;
2549 enum bfi_ioim_h2i msgop; 2549 enum bfi_ioim_h2i msgop;
2550 2550
2551 /** 2551 /*
2552 * check for room in queue to send request now 2552 * check for room in queue to send request now
2553 */ 2553 */
2554 m = bfa_reqq_next(ioim->bfa, ioim->reqq); 2554 m = bfa_reqq_next(ioim->bfa, ioim->reqq);
2555 if (!m) 2555 if (!m)
2556 return BFA_FALSE; 2556 return BFA_FALSE;
2557 2557
2558 /** 2558 /*
2559 * build i/o request message next 2559 * build i/o request message next
2560 */ 2560 */
2561 if (ioim->iosp->abort_explicit) 2561 if (ioim->iosp->abort_explicit)
@@ -2567,14 +2567,14 @@ bfa_ioim_send_abort(struct bfa_ioim_s *ioim)
2567 m->io_tag = cpu_to_be16(ioim->iotag); 2567 m->io_tag = cpu_to_be16(ioim->iotag);
2568 m->abort_tag = ++ioim->abort_tag; 2568 m->abort_tag = ++ioim->abort_tag;
2569 2569
2570 /** 2570 /*
2571 * queue I/O message to firmware 2571 * queue I/O message to firmware
2572 */ 2572 */
2573 bfa_reqq_produce(ioim->bfa, ioim->reqq); 2573 bfa_reqq_produce(ioim->bfa, ioim->reqq);
2574 return BFA_TRUE; 2574 return BFA_TRUE;
2575} 2575}
2576 2576
2577/** 2577/*
2578 * Call to resume any I/O requests waiting for room in request queue. 2578 * Call to resume any I/O requests waiting for room in request queue.
2579 */ 2579 */
2580static void 2580static void
@@ -2590,7 +2590,7 @@ bfa_ioim_qresume(void *cbarg)
2590static void 2590static void
2591bfa_ioim_notify_cleanup(struct bfa_ioim_s *ioim) 2591bfa_ioim_notify_cleanup(struct bfa_ioim_s *ioim)
2592{ 2592{
2593 /** 2593 /*
2594 * Move IO from itnim queue to fcpim global queue since itnim will be 2594 * Move IO from itnim queue to fcpim global queue since itnim will be
2595 * freed. 2595 * freed.
2596 */ 2596 */
@@ -2623,13 +2623,13 @@ bfa_ioim_is_abortable(struct bfa_ioim_s *ioim)
2623 return BFA_TRUE; 2623 return BFA_TRUE;
2624} 2624}
2625 2625
2626/** 2626/*
2627 * or after the link comes back. 2627 * or after the link comes back.
2628 */ 2628 */
2629void 2629void
2630bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, bfa_boolean_t iotov) 2630bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, bfa_boolean_t iotov)
2631{ 2631{
2632 /** 2632 /*
2633 * If path tov timer expired, failback with PATHTOV status - these 2633 * If path tov timer expired, failback with PATHTOV status - these
2634 * IO requests are not normally retried by IO stack. 2634 * IO requests are not normally retried by IO stack.
2635 * 2635 *
@@ -2644,7 +2644,7 @@ bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, bfa_boolean_t iotov)
2644 } 2644 }
2645 bfa_cb_queue(ioim->bfa, &ioim->hcb_qe, ioim->io_cbfn, ioim); 2645 bfa_cb_queue(ioim->bfa, &ioim->hcb_qe, ioim->io_cbfn, ioim);
2646 2646
2647 /** 2647 /*
2648 * Move IO to fcpim global queue since itnim will be 2648 * Move IO to fcpim global queue since itnim will be
2649 * freed. 2649 * freed.
2650 */ 2650 */
@@ -2654,11 +2654,11 @@ bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, bfa_boolean_t iotov)
2654 2654
2655 2655
2656 2656
2657/** 2657/*
2658 * hal_ioim_friend 2658 * hal_ioim_friend
2659 */ 2659 */
2660 2660
2661/** 2661/*
2662 * Memory allocation and initialization. 2662 * Memory allocation and initialization.
2663 */ 2663 */
2664void 2664void
@@ -2670,7 +2670,7 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
2670 u8 *snsinfo; 2670 u8 *snsinfo;
2671 u32 snsbufsz; 2671 u32 snsbufsz;
2672 2672
2673 /** 2673 /*
2674 * claim memory first 2674 * claim memory first
2675 */ 2675 */
2676 ioim = (struct bfa_ioim_s *) bfa_meminfo_kva(minfo); 2676 ioim = (struct bfa_ioim_s *) bfa_meminfo_kva(minfo);
@@ -2681,7 +2681,7 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
2681 fcpim->ioim_sp_arr = iosp; 2681 fcpim->ioim_sp_arr = iosp;
2682 bfa_meminfo_kva(minfo) = (u8 *) (iosp + fcpim->num_ioim_reqs); 2682 bfa_meminfo_kva(minfo) = (u8 *) (iosp + fcpim->num_ioim_reqs);
2683 2683
2684 /** 2684 /*
2685 * Claim DMA memory for per IO sense data. 2685 * Claim DMA memory for per IO sense data.
2686 */ 2686 */
2687 snsbufsz = fcpim->num_ioim_reqs * BFI_IOIM_SNSLEN; 2687 snsbufsz = fcpim->num_ioim_reqs * BFI_IOIM_SNSLEN;
@@ -2693,7 +2693,7 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
2693 snsinfo = fcpim->snsbase.kva; 2693 snsinfo = fcpim->snsbase.kva;
2694 bfa_iocfc_set_snsbase(fcpim->bfa, fcpim->snsbase.pa); 2694 bfa_iocfc_set_snsbase(fcpim->bfa, fcpim->snsbase.pa);
2695 2695
2696 /** 2696 /*
2697 * Initialize ioim free queues 2697 * Initialize ioim free queues
2698 */ 2698 */
2699 INIT_LIST_HEAD(&fcpim->ioim_free_q); 2699 INIT_LIST_HEAD(&fcpim->ioim_free_q);
@@ -2722,7 +2722,7 @@ bfa_ioim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
2722 } 2722 }
2723} 2723}
2724 2724
2725/** 2725/*
2726 * Driver detach time call. 2726 * Driver detach time call.
2727 */ 2727 */
2728void 2728void
@@ -2858,7 +2858,7 @@ bfa_ioim_profile_comp(struct bfa_ioim_s *ioim)
2858 io_lat->max[index] : val; 2858 io_lat->max[index] : val;
2859 io_lat->avg[index] += val; 2859 io_lat->avg[index] += val;
2860} 2860}
2861/** 2861/*
2862 * Called by itnim to clean up IO while going offline. 2862 * Called by itnim to clean up IO while going offline.
2863 */ 2863 */
2864void 2864void
@@ -2881,7 +2881,7 @@ bfa_ioim_cleanup_tm(struct bfa_ioim_s *ioim, struct bfa_tskim_s *tskim)
2881 bfa_sm_send_event(ioim, BFA_IOIM_SM_CLEANUP); 2881 bfa_sm_send_event(ioim, BFA_IOIM_SM_CLEANUP);
2882} 2882}
2883 2883
2884/** 2884/*
2885 * IOC failure handling. 2885 * IOC failure handling.
2886 */ 2886 */
2887void 2887void
@@ -2892,7 +2892,7 @@ bfa_ioim_iocdisable(struct bfa_ioim_s *ioim)
2892 bfa_sm_send_event(ioim, BFA_IOIM_SM_HWFAIL); 2892 bfa_sm_send_event(ioim, BFA_IOIM_SM_HWFAIL);
2893} 2893}
2894 2894
2895/** 2895/*
2896 * IO offline TOV popped. Fail the pending IO. 2896 * IO offline TOV popped. Fail the pending IO.
2897 */ 2897 */
2898void 2898void
@@ -2904,11 +2904,11 @@ bfa_ioim_tov(struct bfa_ioim_s *ioim)
2904 2904
2905 2905
2906 2906
2907/** 2907/*
2908 * hal_ioim_api 2908 * hal_ioim_api
2909 */ 2909 */
2910 2910
2911/** 2911/*
2912 * Allocate IOIM resource for initiator mode I/O request. 2912 * Allocate IOIM resource for initiator mode I/O request.
2913 */ 2913 */
2914struct bfa_ioim_s * 2914struct bfa_ioim_s *
@@ -2918,7 +2918,7 @@ bfa_ioim_alloc(struct bfa_s *bfa, struct bfad_ioim_s *dio,
2918 struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa); 2918 struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa);
2919 struct bfa_ioim_s *ioim; 2919 struct bfa_ioim_s *ioim;
2920 2920
2921 /** 2921 /*
2922 * alocate IOIM resource 2922 * alocate IOIM resource
2923 */ 2923 */
2924 bfa_q_deq(&fcpim->ioim_free_q, &ioim); 2924 bfa_q_deq(&fcpim->ioim_free_q, &ioim);
@@ -2969,7 +2969,7 @@ bfa_ioim_start(struct bfa_ioim_s *ioim)
2969 2969
2970 bfa_ioim_cb_profile_start(ioim->fcpim, ioim); 2970 bfa_ioim_cb_profile_start(ioim->fcpim, ioim);
2971 2971
2972 /** 2972 /*
2973 * Obtain the queue over which this request has to be issued 2973 * Obtain the queue over which this request has to be issued
2974 */ 2974 */
2975 ioim->reqq = bfa_fcpim_ioredirect_enabled(ioim->bfa) ? 2975 ioim->reqq = bfa_fcpim_ioredirect_enabled(ioim->bfa) ?
@@ -2979,7 +2979,7 @@ bfa_ioim_start(struct bfa_ioim_s *ioim)
2979 bfa_sm_send_event(ioim, BFA_IOIM_SM_START); 2979 bfa_sm_send_event(ioim, BFA_IOIM_SM_START);
2980} 2980}
2981 2981
2982/** 2982/*
2983 * Driver I/O abort request. 2983 * Driver I/O abort request.
2984 */ 2984 */
2985bfa_status_t 2985bfa_status_t
@@ -2998,11 +2998,11 @@ bfa_ioim_abort(struct bfa_ioim_s *ioim)
2998} 2998}
2999 2999
3000 3000
3001/** 3001/*
3002 * BFA TSKIM state machine functions 3002 * BFA TSKIM state machine functions
3003 */ 3003 */
3004 3004
3005/** 3005/*
3006 * Task management command beginning state. 3006 * Task management command beginning state.
3007 */ 3007 */
3008static void 3008static void
@@ -3015,7 +3015,7 @@ bfa_tskim_sm_uninit(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3015 bfa_sm_set_state(tskim, bfa_tskim_sm_active); 3015 bfa_sm_set_state(tskim, bfa_tskim_sm_active);
3016 bfa_tskim_gather_ios(tskim); 3016 bfa_tskim_gather_ios(tskim);
3017 3017
3018 /** 3018 /*
3019 * If device is offline, do not send TM on wire. Just cleanup 3019 * If device is offline, do not send TM on wire. Just cleanup
3020 * any pending IO requests and complete TM request. 3020 * any pending IO requests and complete TM request.
3021 */ 3021 */
@@ -3039,7 +3039,7 @@ bfa_tskim_sm_uninit(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3039 } 3039 }
3040} 3040}
3041 3041
3042/** 3042/*
3043 * brief 3043 * brief
3044 * TM command is active, awaiting completion from firmware to 3044 * TM command is active, awaiting completion from firmware to
3045 * cleanup IO requests in TM scope. 3045 * cleanup IO requests in TM scope.
@@ -3076,7 +3076,7 @@ bfa_tskim_sm_active(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3076 } 3076 }
3077} 3077}
3078 3078
3079/** 3079/*
3080 * An active TM is being cleaned up since ITN is offline. Awaiting cleanup 3080 * An active TM is being cleaned up since ITN is offline. Awaiting cleanup
3081 * completion event from firmware. 3081 * completion event from firmware.
3082 */ 3082 */
@@ -3087,7 +3087,7 @@ bfa_tskim_sm_cleanup(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3087 3087
3088 switch (event) { 3088 switch (event) {
3089 case BFA_TSKIM_SM_DONE: 3089 case BFA_TSKIM_SM_DONE:
3090 /** 3090 /*
3091 * Ignore and wait for ABORT completion from firmware. 3091 * Ignore and wait for ABORT completion from firmware.
3092 */ 3092 */
3093 break; 3093 break;
@@ -3120,7 +3120,7 @@ bfa_tskim_sm_iocleanup(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3120 break; 3120 break;
3121 3121
3122 case BFA_TSKIM_SM_CLEANUP: 3122 case BFA_TSKIM_SM_CLEANUP:
3123 /** 3123 /*
3124 * Ignore, TM command completed on wire. 3124 * Ignore, TM command completed on wire.
3125 * Notify TM conmpletion on IO cleanup completion. 3125 * Notify TM conmpletion on IO cleanup completion.
3126 */ 3126 */
@@ -3137,7 +3137,7 @@ bfa_tskim_sm_iocleanup(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3137 } 3137 }
3138} 3138}
3139 3139
3140/** 3140/*
3141 * Task management command is waiting for room in request CQ 3141 * Task management command is waiting for room in request CQ
3142 */ 3142 */
3143static void 3143static void
@@ -3152,7 +3152,7 @@ bfa_tskim_sm_qfull(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3152 break; 3152 break;
3153 3153
3154 case BFA_TSKIM_SM_CLEANUP: 3154 case BFA_TSKIM_SM_CLEANUP:
3155 /** 3155 /*
3156 * No need to send TM on wire since ITN is offline. 3156 * No need to send TM on wire since ITN is offline.
3157 */ 3157 */
3158 bfa_sm_set_state(tskim, bfa_tskim_sm_iocleanup); 3158 bfa_sm_set_state(tskim, bfa_tskim_sm_iocleanup);
@@ -3172,7 +3172,7 @@ bfa_tskim_sm_qfull(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3172 } 3172 }
3173} 3173}
3174 3174
3175/** 3175/*
3176 * Task management command is active, awaiting for room in request CQ 3176 * Task management command is active, awaiting for room in request CQ
3177 * to send clean up request. 3177 * to send clean up request.
3178 */ 3178 */
@@ -3185,7 +3185,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
3185 switch (event) { 3185 switch (event) {
3186 case BFA_TSKIM_SM_DONE: 3186 case BFA_TSKIM_SM_DONE:
3187 bfa_reqq_wcancel(&tskim->reqq_wait); 3187 bfa_reqq_wcancel(&tskim->reqq_wait);
3188 /** 3188 /*
3189 * 3189 *
3190 * Fall through !!! 3190 * Fall through !!!
3191 */ 3191 */
@@ -3207,7 +3207,7 @@ bfa_tskim_sm_cleanup_qfull(struct bfa_tskim_s *tskim,
3207 } 3207 }
3208} 3208}
3209 3209
3210/** 3210/*
3211 * BFA callback is pending 3211 * BFA callback is pending
3212 */ 3212 */
3213static void 3213static void
@@ -3235,7 +3235,7 @@ bfa_tskim_sm_hcb(struct bfa_tskim_s *tskim, enum bfa_tskim_event event)
3235 3235
3236 3236
3237 3237
3238/** 3238/*
3239 * hal_tskim_private 3239 * hal_tskim_private
3240 */ 3240 */
3241 3241
@@ -3288,7 +3288,7 @@ bfa_tskim_match_scope(struct bfa_tskim_s *tskim, lun_t lun)
3288 return BFA_FALSE; 3288 return BFA_FALSE;
3289} 3289}
3290 3290
3291/** 3291/*
3292 * Gather affected IO requests and task management commands. 3292 * Gather affected IO requests and task management commands.
3293 */ 3293 */
3294static void 3294static void
@@ -3300,7 +3300,7 @@ bfa_tskim_gather_ios(struct bfa_tskim_s *tskim)
3300 3300
3301 INIT_LIST_HEAD(&tskim->io_q); 3301 INIT_LIST_HEAD(&tskim->io_q);
3302 3302
3303 /** 3303 /*
3304 * Gather any active IO requests first. 3304 * Gather any active IO requests first.
3305 */ 3305 */
3306 list_for_each_safe(qe, qen, &itnim->io_q) { 3306 list_for_each_safe(qe, qen, &itnim->io_q) {
@@ -3312,7 +3312,7 @@ bfa_tskim_gather_ios(struct bfa_tskim_s *tskim)
3312 } 3312 }
3313 } 3313 }
3314 3314
3315 /** 3315 /*
3316 * Failback any pending IO requests immediately. 3316 * Failback any pending IO requests immediately.
3317 */ 3317 */
3318 list_for_each_safe(qe, qen, &itnim->pending_q) { 3318 list_for_each_safe(qe, qen, &itnim->pending_q) {
@@ -3326,7 +3326,7 @@ bfa_tskim_gather_ios(struct bfa_tskim_s *tskim)
3326 } 3326 }
3327} 3327}
3328 3328
3329/** 3329/*
3330 * IO cleanup completion 3330 * IO cleanup completion
3331 */ 3331 */
3332static void 3332static void
@@ -3338,7 +3338,7 @@ bfa_tskim_cleanp_comp(void *tskim_cbarg)
3338 bfa_sm_send_event(tskim, BFA_TSKIM_SM_IOS_DONE); 3338 bfa_sm_send_event(tskim, BFA_TSKIM_SM_IOS_DONE);
3339} 3339}
3340 3340
3341/** 3341/*
3342 * Gather affected IO requests and task management commands. 3342 * Gather affected IO requests and task management commands.
3343 */ 3343 */
3344static void 3344static void
@@ -3358,7 +3358,7 @@ bfa_tskim_cleanup_ios(struct bfa_tskim_s *tskim)
3358 bfa_wc_wait(&tskim->wc); 3358 bfa_wc_wait(&tskim->wc);
3359} 3359}
3360 3360
3361/** 3361/*
3362 * Send task management request to firmware. 3362 * Send task management request to firmware.
3363 */ 3363 */
3364static bfa_boolean_t 3364static bfa_boolean_t
@@ -3367,14 +3367,14 @@ bfa_tskim_send(struct bfa_tskim_s *tskim)
3367 struct bfa_itnim_s *itnim = tskim->itnim; 3367 struct bfa_itnim_s *itnim = tskim->itnim;
3368 struct bfi_tskim_req_s *m; 3368 struct bfi_tskim_req_s *m;
3369 3369
3370 /** 3370 /*
3371 * check for room in queue to send request now 3371 * check for room in queue to send request now
3372 */ 3372 */
3373 m = bfa_reqq_next(tskim->bfa, itnim->reqq); 3373 m = bfa_reqq_next(tskim->bfa, itnim->reqq);
3374 if (!m) 3374 if (!m)
3375 return BFA_FALSE; 3375 return BFA_FALSE;
3376 3376
3377 /** 3377 /*
3378 * build i/o request message next 3378 * build i/o request message next
3379 */ 3379 */
3380 bfi_h2i_set(m->mh, BFI_MC_TSKIM, BFI_TSKIM_H2I_TM_REQ, 3380 bfi_h2i_set(m->mh, BFI_MC_TSKIM, BFI_TSKIM_H2I_TM_REQ,
@@ -3386,14 +3386,14 @@ bfa_tskim_send(struct bfa_tskim_s *tskim)
3386 m->lun = tskim->lun; 3386 m->lun = tskim->lun;
3387 m->tm_flags = tskim->tm_cmnd; 3387 m->tm_flags = tskim->tm_cmnd;
3388 3388
3389 /** 3389 /*
3390 * queue I/O message to firmware 3390 * queue I/O message to firmware
3391 */ 3391 */
3392 bfa_reqq_produce(tskim->bfa, itnim->reqq); 3392 bfa_reqq_produce(tskim->bfa, itnim->reqq);
3393 return BFA_TRUE; 3393 return BFA_TRUE;
3394} 3394}
3395 3395
3396/** 3396/*
3397 * Send abort request to cleanup an active TM to firmware. 3397 * Send abort request to cleanup an active TM to firmware.
3398 */ 3398 */
3399static bfa_boolean_t 3399static bfa_boolean_t
@@ -3402,14 +3402,14 @@ bfa_tskim_send_abort(struct bfa_tskim_s *tskim)
3402 struct bfa_itnim_s *itnim = tskim->itnim; 3402 struct bfa_itnim_s *itnim = tskim->itnim;
3403 struct bfi_tskim_abortreq_s *m; 3403 struct bfi_tskim_abortreq_s *m;
3404 3404
3405 /** 3405 /*
3406 * check for room in queue to send request now 3406 * check for room in queue to send request now
3407 */ 3407 */
3408 m = bfa_reqq_next(tskim->bfa, itnim->reqq); 3408 m = bfa_reqq_next(tskim->bfa, itnim->reqq);
3409 if (!m) 3409 if (!m)
3410 return BFA_FALSE; 3410 return BFA_FALSE;
3411 3411
3412 /** 3412 /*
3413 * build i/o request message next 3413 * build i/o request message next
3414 */ 3414 */
3415 bfi_h2i_set(m->mh, BFI_MC_TSKIM, BFI_TSKIM_H2I_ABORT_REQ, 3415 bfi_h2i_set(m->mh, BFI_MC_TSKIM, BFI_TSKIM_H2I_ABORT_REQ,
@@ -3417,14 +3417,14 @@ bfa_tskim_send_abort(struct bfa_tskim_s *tskim)
3417 3417
3418 m->tsk_tag = cpu_to_be16(tskim->tsk_tag); 3418 m->tsk_tag = cpu_to_be16(tskim->tsk_tag);
3419 3419
3420 /** 3420 /*
3421 * queue I/O message to firmware 3421 * queue I/O message to firmware
3422 */ 3422 */
3423 bfa_reqq_produce(tskim->bfa, itnim->reqq); 3423 bfa_reqq_produce(tskim->bfa, itnim->reqq);
3424 return BFA_TRUE; 3424 return BFA_TRUE;
3425} 3425}
3426 3426
3427/** 3427/*
3428 * Call to resume task management cmnd waiting for room in request queue. 3428 * Call to resume task management cmnd waiting for room in request queue.
3429 */ 3429 */
3430static void 3430static void
@@ -3436,7 +3436,7 @@ bfa_tskim_qresume(void *cbarg)
3436 bfa_sm_send_event(tskim, BFA_TSKIM_SM_QRESUME); 3436 bfa_sm_send_event(tskim, BFA_TSKIM_SM_QRESUME);
3437} 3437}
3438 3438
3439/** 3439/*
3440 * Cleanup IOs associated with a task mangement command on IOC failures. 3440 * Cleanup IOs associated with a task mangement command on IOC failures.
3441 */ 3441 */
3442static void 3442static void
@@ -3453,11 +3453,11 @@ bfa_tskim_iocdisable_ios(struct bfa_tskim_s *tskim)
3453 3453
3454 3454
3455 3455
3456/** 3456/*
3457 * hal_tskim_friend 3457 * hal_tskim_friend
3458 */ 3458 */
3459 3459
3460/** 3460/*
3461 * Notification on completions from related ioim. 3461 * Notification on completions from related ioim.
3462 */ 3462 */
3463void 3463void
@@ -3466,7 +3466,7 @@ bfa_tskim_iodone(struct bfa_tskim_s *tskim)
3466 bfa_wc_down(&tskim->wc); 3466 bfa_wc_down(&tskim->wc);
3467} 3467}
3468 3468
3469/** 3469/*
3470 * Handle IOC h/w failure notification from itnim. 3470 * Handle IOC h/w failure notification from itnim.
3471 */ 3471 */
3472void 3472void
@@ -3477,7 +3477,7 @@ bfa_tskim_iocdisable(struct bfa_tskim_s *tskim)
3477 bfa_sm_send_event(tskim, BFA_TSKIM_SM_HWFAIL); 3477 bfa_sm_send_event(tskim, BFA_TSKIM_SM_HWFAIL);
3478} 3478}
3479 3479
3480/** 3480/*
3481 * Cleanup TM command and associated IOs as part of ITNIM offline. 3481 * Cleanup TM command and associated IOs as part of ITNIM offline.
3482 */ 3482 */
3483void 3483void
@@ -3488,7 +3488,7 @@ bfa_tskim_cleanup(struct bfa_tskim_s *tskim)
3488 bfa_sm_send_event(tskim, BFA_TSKIM_SM_CLEANUP); 3488 bfa_sm_send_event(tskim, BFA_TSKIM_SM_CLEANUP);
3489} 3489}
3490 3490
3491/** 3491/*
3492 * Memory allocation and initialization. 3492 * Memory allocation and initialization.
3493 */ 3493 */
3494void 3494void
@@ -3524,7 +3524,7 @@ bfa_tskim_attach(struct bfa_fcpim_mod_s *fcpim, struct bfa_meminfo_s *minfo)
3524void 3524void
3525bfa_tskim_detach(struct bfa_fcpim_mod_s *fcpim) 3525bfa_tskim_detach(struct bfa_fcpim_mod_s *fcpim)
3526{ 3526{
3527 /** 3527 /*
3528 * @todo 3528 * @todo
3529 */ 3529 */
3530} 3530}
@@ -3542,7 +3542,7 @@ bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
3542 3542
3543 tskim->tsk_status = rsp->tsk_status; 3543 tskim->tsk_status = rsp->tsk_status;
3544 3544
3545 /** 3545 /*
3546 * Firmware sends BFI_TSKIM_STS_ABORTED status for abort 3546 * Firmware sends BFI_TSKIM_STS_ABORTED status for abort
3547 * requests. All other statuses are for normal completions. 3547 * requests. All other statuses are for normal completions.
3548 */ 3548 */
@@ -3557,7 +3557,7 @@ bfa_tskim_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
3557 3557
3558 3558
3559 3559
3560/** 3560/*
3561 * hal_tskim_api 3561 * hal_tskim_api
3562 */ 3562 */
3563 3563
@@ -3584,7 +3584,7 @@ bfa_tskim_free(struct bfa_tskim_s *tskim)
3584 list_add_tail(&tskim->qe, &tskim->fcpim->tskim_free_q); 3584 list_add_tail(&tskim->qe, &tskim->fcpim->tskim_free_q);
3585} 3585}
3586 3586
3587/** 3587/*
3588 * Start a task management command. 3588 * Start a task management command.
3589 * 3589 *
3590 * @param[in] tskim BFA task management command instance 3590 * @param[in] tskim BFA task management command instance