diff options
author | Jing Huang <huangj@brocade.com> | 2010-10-18 20:17:23 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-25 17:28:09 -0400 |
commit | 5fbe25c7a664601666895e8f95eaa59bd9741392 (patch) | |
tree | f2d452938ba5ba924d0e8cc4f173f963df13018e /drivers/scsi/bfa/bfa_ioc.c | |
parent | acdc79a60cb3cbbc9f07bb5032d890e9cf94f0ff (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_ioc.c')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 238 |
1 files changed, 119 insertions, 119 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index fddab8857e8c..54475b53a5ab 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | BFA_TRC_FILE(CNA, IOC); | 24 | BFA_TRC_FILE(CNA, IOC); |
25 | 25 | ||
26 | /** | 26 | /* |
27 | * IOC local definitions | 27 | * IOC local definitions |
28 | */ | 28 | */ |
29 | #define BFA_IOC_TOV 3000 /* msecs */ | 29 | #define BFA_IOC_TOV 3000 /* msecs */ |
@@ -49,7 +49,7 @@ BFA_TRC_FILE(CNA, IOC); | |||
49 | BFA_TRC_MAX * sizeof(struct bfa_trc_s))) | 49 | BFA_TRC_MAX * sizeof(struct bfa_trc_s))) |
50 | #define BFA_DBG_FWTRC_OFF(_fn) (BFI_IOC_TRC_OFF + BFA_DBG_FWTRC_LEN * (_fn)) | 50 | #define BFA_DBG_FWTRC_OFF(_fn) (BFI_IOC_TRC_OFF + BFA_DBG_FWTRC_LEN * (_fn)) |
51 | 51 | ||
52 | /** | 52 | /* |
53 | * Asic specific macros : see bfa_hw_cb.c and bfa_hw_ct.c for details. | 53 | * Asic specific macros : see bfa_hw_cb.c and bfa_hw_ct.c for details. |
54 | */ | 54 | */ |
55 | 55 | ||
@@ -101,11 +101,11 @@ static void bfa_ioc_pf_disabled(struct bfa_ioc_s *ioc); | |||
101 | static void bfa_ioc_pf_failed(struct bfa_ioc_s *ioc); | 101 | static void bfa_ioc_pf_failed(struct bfa_ioc_s *ioc); |
102 | static void bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc); | 102 | static void bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc); |
103 | 103 | ||
104 | /** | 104 | /* |
105 | * hal_ioc_sm | 105 | * hal_ioc_sm |
106 | */ | 106 | */ |
107 | 107 | ||
108 | /** | 108 | /* |
109 | * IOC state machine definitions/declarations | 109 | * IOC state machine definitions/declarations |
110 | */ | 110 | */ |
111 | enum ioc_event { | 111 | enum ioc_event { |
@@ -144,7 +144,7 @@ static struct bfa_sm_table_s ioc_sm_table[] = { | |||
144 | {BFA_SM(bfa_ioc_sm_disabled), BFA_IOC_DISABLED}, | 144 | {BFA_SM(bfa_ioc_sm_disabled), BFA_IOC_DISABLED}, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | /** | 147 | /* |
148 | * IOCPF state machine definitions/declarations | 148 | * IOCPF state machine definitions/declarations |
149 | */ | 149 | */ |
150 | 150 | ||
@@ -174,7 +174,7 @@ static void bfa_iocpf_stop(struct bfa_ioc_s *ioc); | |||
174 | static void bfa_iocpf_timeout(void *ioc_arg); | 174 | static void bfa_iocpf_timeout(void *ioc_arg); |
175 | static void bfa_iocpf_sem_timeout(void *ioc_arg); | 175 | static void bfa_iocpf_sem_timeout(void *ioc_arg); |
176 | 176 | ||
177 | /** | 177 | /* |
178 | * IOCPF state machine events | 178 | * IOCPF state machine events |
179 | */ | 179 | */ |
180 | enum iocpf_event { | 180 | enum iocpf_event { |
@@ -191,7 +191,7 @@ enum iocpf_event { | |||
191 | IOCPF_E_TIMEOUT = 11, /* f/w response timeout */ | 191 | IOCPF_E_TIMEOUT = 11, /* f/w response timeout */ |
192 | }; | 192 | }; |
193 | 193 | ||
194 | /** | 194 | /* |
195 | * IOCPF states | 195 | * IOCPF states |
196 | */ | 196 | */ |
197 | enum bfa_iocpf_state { | 197 | enum bfa_iocpf_state { |
@@ -232,11 +232,11 @@ static struct bfa_sm_table_s iocpf_sm_table[] = { | |||
232 | {BFA_SM(bfa_iocpf_sm_disabled), BFA_IOCPF_DISABLED}, | 232 | {BFA_SM(bfa_iocpf_sm_disabled), BFA_IOCPF_DISABLED}, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | /** | 235 | /* |
236 | * IOC State Machine | 236 | * IOC State Machine |
237 | */ | 237 | */ |
238 | 238 | ||
239 | /** | 239 | /* |
240 | * Beginning state. IOC uninit state. | 240 | * Beginning state. IOC uninit state. |
241 | */ | 241 | */ |
242 | 242 | ||
@@ -245,7 +245,7 @@ bfa_ioc_sm_uninit_entry(struct bfa_ioc_s *ioc) | |||
245 | { | 245 | { |
246 | } | 246 | } |
247 | 247 | ||
248 | /** | 248 | /* |
249 | * IOC is in uninit state. | 249 | * IOC is in uninit state. |
250 | */ | 250 | */ |
251 | static void | 251 | static void |
@@ -262,7 +262,7 @@ bfa_ioc_sm_uninit(struct bfa_ioc_s *ioc, enum ioc_event event) | |||
262 | bfa_sm_fault(ioc, event); | 262 | bfa_sm_fault(ioc, event); |
263 | } | 263 | } |
264 | } | 264 | } |
265 | /** | 265 | /* |
266 | * Reset entry actions -- initialize state machine | 266 | * Reset entry actions -- initialize state machine |
267 | */ | 267 | */ |
268 | static void | 268 | static void |
@@ -271,7 +271,7 @@ bfa_ioc_sm_reset_entry(struct bfa_ioc_s *ioc) | |||
271 | bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); | 271 | bfa_fsm_set_state(&ioc->iocpf, bfa_iocpf_sm_reset); |
272 | } | 272 | } |
273 | 273 | ||
274 | /** | 274 | /* |
275 | * IOC is in reset state. | 275 | * IOC is in reset state. |
276 | */ | 276 | */ |
277 | static void | 277 | static void |
@@ -304,7 +304,7 @@ bfa_ioc_sm_enabling_entry(struct bfa_ioc_s *ioc) | |||
304 | bfa_iocpf_enable(ioc); | 304 | bfa_iocpf_enable(ioc); |
305 | } | 305 | } |
306 | 306 | ||
307 | /** | 307 | /* |
308 | * Host IOC function is being enabled, awaiting response from firmware. | 308 | * Host IOC function is being enabled, awaiting response from firmware. |
309 | * Semaphore is acquired. | 309 | * Semaphore is acquired. |
310 | */ | 310 | */ |
@@ -352,7 +352,7 @@ bfa_ioc_sm_getattr_entry(struct bfa_ioc_s *ioc) | |||
352 | bfa_ioc_send_getattr(ioc); | 352 | bfa_ioc_send_getattr(ioc); |
353 | } | 353 | } |
354 | 354 | ||
355 | /** | 355 | /* |
356 | * IOC configuration in progress. Timer is active. | 356 | * IOC configuration in progress. Timer is active. |
357 | */ | 357 | */ |
358 | static void | 358 | static void |
@@ -447,7 +447,7 @@ bfa_ioc_sm_disabling_entry(struct bfa_ioc_s *ioc) | |||
447 | BFA_LOG(KERN_INFO, bfad, log_level, "IOC disabled\n"); | 447 | BFA_LOG(KERN_INFO, bfad, log_level, "IOC disabled\n"); |
448 | } | 448 | } |
449 | 449 | ||
450 | /** | 450 | /* |
451 | * IOC is being disabled | 451 | * IOC is being disabled |
452 | */ | 452 | */ |
453 | static void | 453 | static void |
@@ -474,7 +474,7 @@ bfa_ioc_sm_disabling(struct bfa_ioc_s *ioc, enum ioc_event event) | |||
474 | } | 474 | } |
475 | } | 475 | } |
476 | 476 | ||
477 | /** | 477 | /* |
478 | * IOC disable completion entry. | 478 | * IOC disable completion entry. |
479 | */ | 479 | */ |
480 | static void | 480 | static void |
@@ -514,7 +514,7 @@ bfa_ioc_sm_initfail_entry(struct bfa_ioc_s *ioc) | |||
514 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); | 514 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); |
515 | } | 515 | } |
516 | 516 | ||
517 | /** | 517 | /* |
518 | * Hardware initialization failed. | 518 | * Hardware initialization failed. |
519 | */ | 519 | */ |
520 | static void | 520 | static void |
@@ -528,7 +528,7 @@ bfa_ioc_sm_initfail(struct bfa_ioc_s *ioc, enum ioc_event event) | |||
528 | break; | 528 | break; |
529 | 529 | ||
530 | case IOC_E_FAILED: | 530 | case IOC_E_FAILED: |
531 | /** | 531 | /* |
532 | * Initialization failure during iocpf init retry. | 532 | * Initialization failure during iocpf init retry. |
533 | */ | 533 | */ |
534 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); | 534 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); |
@@ -556,7 +556,7 @@ bfa_ioc_sm_fail_entry(struct bfa_ioc_s *ioc) | |||
556 | struct bfa_ioc_hbfail_notify_s *notify; | 556 | struct bfa_ioc_hbfail_notify_s *notify; |
557 | struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; | 557 | struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; |
558 | 558 | ||
559 | /** | 559 | /* |
560 | * Notify driver and common modules registered for notification. | 560 | * Notify driver and common modules registered for notification. |
561 | */ | 561 | */ |
562 | ioc->cbfn->hbfail_cbfn(ioc->bfa); | 562 | ioc->cbfn->hbfail_cbfn(ioc->bfa); |
@@ -569,7 +569,7 @@ bfa_ioc_sm_fail_entry(struct bfa_ioc_s *ioc) | |||
569 | "Heart Beat of IOC has failed\n"); | 569 | "Heart Beat of IOC has failed\n"); |
570 | } | 570 | } |
571 | 571 | ||
572 | /** | 572 | /* |
573 | * IOC failure. | 573 | * IOC failure. |
574 | */ | 574 | */ |
575 | static void | 575 | static void |
@@ -580,7 +580,7 @@ bfa_ioc_sm_fail(struct bfa_ioc_s *ioc, enum ioc_event event) | |||
580 | switch (event) { | 580 | switch (event) { |
581 | 581 | ||
582 | case IOC_E_FAILED: | 582 | case IOC_E_FAILED: |
583 | /** | 583 | /* |
584 | * Initialization failure during iocpf recovery. | 584 | * Initialization failure during iocpf recovery. |
585 | * !!! Fall through !!! | 585 | * !!! Fall through !!! |
586 | */ | 586 | */ |
@@ -608,12 +608,12 @@ bfa_ioc_sm_fail(struct bfa_ioc_s *ioc, enum ioc_event event) | |||
608 | 608 | ||
609 | 609 | ||
610 | 610 | ||
611 | /** | 611 | /* |
612 | * IOCPF State Machine | 612 | * IOCPF State Machine |
613 | */ | 613 | */ |
614 | 614 | ||
615 | 615 | ||
616 | /** | 616 | /* |
617 | * Reset entry actions -- initialize state machine | 617 | * Reset entry actions -- initialize state machine |
618 | */ | 618 | */ |
619 | static void | 619 | static void |
@@ -623,7 +623,7 @@ bfa_iocpf_sm_reset_entry(struct bfa_iocpf_s *iocpf) | |||
623 | iocpf->auto_recover = bfa_auto_recover; | 623 | iocpf->auto_recover = bfa_auto_recover; |
624 | } | 624 | } |
625 | 625 | ||
626 | /** | 626 | /* |
627 | * Beginning state. IOC is in reset state. | 627 | * Beginning state. IOC is in reset state. |
628 | */ | 628 | */ |
629 | static void | 629 | static void |
@@ -646,7 +646,7 @@ bfa_iocpf_sm_reset(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | /** | 649 | /* |
650 | * Semaphore should be acquired for version check. | 650 | * Semaphore should be acquired for version check. |
651 | */ | 651 | */ |
652 | static void | 652 | static void |
@@ -655,7 +655,7 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) | |||
655 | bfa_ioc_hw_sem_get(iocpf->ioc); | 655 | bfa_ioc_hw_sem_get(iocpf->ioc); |
656 | } | 656 | } |
657 | 657 | ||
658 | /** | 658 | /* |
659 | * Awaiting h/w semaphore to continue with version check. | 659 | * Awaiting h/w semaphore to continue with version check. |
660 | */ | 660 | */ |
661 | static void | 661 | static void |
@@ -692,7 +692,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
692 | } | 692 | } |
693 | } | 693 | } |
694 | 694 | ||
695 | /** | 695 | /* |
696 | * Notify enable completion callback. | 696 | * Notify enable completion callback. |
697 | */ | 697 | */ |
698 | static void | 698 | static void |
@@ -708,7 +708,7 @@ bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf_s *iocpf) | |||
708 | bfa_iocpf_timer_start(iocpf->ioc); | 708 | bfa_iocpf_timer_start(iocpf->ioc); |
709 | } | 709 | } |
710 | 710 | ||
711 | /** | 711 | /* |
712 | * Awaiting firmware version match. | 712 | * Awaiting firmware version match. |
713 | */ | 713 | */ |
714 | static void | 714 | static void |
@@ -739,7 +739,7 @@ bfa_iocpf_sm_mismatch(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | /** | 742 | /* |
743 | * Request for semaphore. | 743 | * Request for semaphore. |
744 | */ | 744 | */ |
745 | static void | 745 | static void |
@@ -748,7 +748,7 @@ bfa_iocpf_sm_semwait_entry(struct bfa_iocpf_s *iocpf) | |||
748 | bfa_ioc_hw_sem_get(iocpf->ioc); | 748 | bfa_ioc_hw_sem_get(iocpf->ioc); |
749 | } | 749 | } |
750 | 750 | ||
751 | /** | 751 | /* |
752 | * Awaiting semaphore for h/w initialzation. | 752 | * Awaiting semaphore for h/w initialzation. |
753 | */ | 753 | */ |
754 | static void | 754 | static void |
@@ -782,7 +782,7 @@ bfa_iocpf_sm_hwinit_entry(struct bfa_iocpf_s *iocpf) | |||
782 | bfa_ioc_reset(iocpf->ioc, BFA_FALSE); | 782 | bfa_ioc_reset(iocpf->ioc, BFA_FALSE); |
783 | } | 783 | } |
784 | 784 | ||
785 | /** | 785 | /* |
786 | * Hardware is being initialized. Interrupts are enabled. | 786 | * Hardware is being initialized. Interrupts are enabled. |
787 | * Holding hardware semaphore lock. | 787 | * Holding hardware semaphore lock. |
788 | */ | 788 | */ |
@@ -839,7 +839,7 @@ bfa_iocpf_sm_enabling_entry(struct bfa_iocpf_s *iocpf) | |||
839 | bfa_ioc_send_enable(iocpf->ioc); | 839 | bfa_ioc_send_enable(iocpf->ioc); |
840 | } | 840 | } |
841 | 841 | ||
842 | /** | 842 | /* |
843 | * Host IOC function is being enabled, awaiting response from firmware. | 843 | * Host IOC function is being enabled, awaiting response from firmware. |
844 | * Semaphore is acquired. | 844 | * Semaphore is acquired. |
845 | */ | 845 | */ |
@@ -943,7 +943,7 @@ bfa_iocpf_sm_disabling_entry(struct bfa_iocpf_s *iocpf) | |||
943 | bfa_ioc_send_disable(iocpf->ioc); | 943 | bfa_ioc_send_disable(iocpf->ioc); |
944 | } | 944 | } |
945 | 945 | ||
946 | /** | 946 | /* |
947 | * IOC is being disabled | 947 | * IOC is being disabled |
948 | */ | 948 | */ |
949 | static void | 949 | static void |
@@ -979,7 +979,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
979 | } | 979 | } |
980 | } | 980 | } |
981 | 981 | ||
982 | /** | 982 | /* |
983 | * IOC disable completion entry. | 983 | * IOC disable completion entry. |
984 | */ | 984 | */ |
985 | static void | 985 | static void |
@@ -1017,7 +1017,7 @@ bfa_iocpf_sm_initfail_entry(struct bfa_iocpf_s *iocpf) | |||
1017 | bfa_iocpf_timer_start(iocpf->ioc); | 1017 | bfa_iocpf_timer_start(iocpf->ioc); |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | /** | 1020 | /* |
1021 | * Hardware initialization failed. | 1021 | * Hardware initialization failed. |
1022 | */ | 1022 | */ |
1023 | static void | 1023 | static void |
@@ -1052,18 +1052,18 @@ bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
1052 | static void | 1052 | static void |
1053 | bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf) | 1053 | bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf) |
1054 | { | 1054 | { |
1055 | /** | 1055 | /* |
1056 | * Mark IOC as failed in hardware and stop firmware. | 1056 | * Mark IOC as failed in hardware and stop firmware. |
1057 | */ | 1057 | */ |
1058 | bfa_ioc_lpu_stop(iocpf->ioc); | 1058 | bfa_ioc_lpu_stop(iocpf->ioc); |
1059 | writel(BFI_IOC_FAIL, iocpf->ioc->ioc_regs.ioc_fwstate); | 1059 | writel(BFI_IOC_FAIL, iocpf->ioc->ioc_regs.ioc_fwstate); |
1060 | 1060 | ||
1061 | /** | 1061 | /* |
1062 | * Notify other functions on HB failure. | 1062 | * Notify other functions on HB failure. |
1063 | */ | 1063 | */ |
1064 | bfa_ioc_notify_hbfail(iocpf->ioc); | 1064 | bfa_ioc_notify_hbfail(iocpf->ioc); |
1065 | 1065 | ||
1066 | /** | 1066 | /* |
1067 | * Flush any queued up mailbox requests. | 1067 | * Flush any queued up mailbox requests. |
1068 | */ | 1068 | */ |
1069 | bfa_ioc_mbox_hbfail(iocpf->ioc); | 1069 | bfa_ioc_mbox_hbfail(iocpf->ioc); |
@@ -1072,7 +1072,7 @@ bfa_iocpf_sm_fail_entry(struct bfa_iocpf_s *iocpf) | |||
1072 | bfa_iocpf_recovery_timer_start(iocpf->ioc); | 1072 | bfa_iocpf_recovery_timer_start(iocpf->ioc); |
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | /** | 1075 | /* |
1076 | * IOC is in failed state. | 1076 | * IOC is in failed state. |
1077 | */ | 1077 | */ |
1078 | static void | 1078 | static void |
@@ -1100,7 +1100,7 @@ bfa_iocpf_sm_fail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) | |||
1100 | 1100 | ||
1101 | 1101 | ||
1102 | 1102 | ||
1103 | /** | 1103 | /* |
1104 | * hal_ioc_pvt BFA IOC private functions | 1104 | * hal_ioc_pvt BFA IOC private functions |
1105 | */ | 1105 | */ |
1106 | 1106 | ||
@@ -1112,7 +1112,7 @@ bfa_ioc_disable_comp(struct bfa_ioc_s *ioc) | |||
1112 | 1112 | ||
1113 | ioc->cbfn->disable_cbfn(ioc->bfa); | 1113 | ioc->cbfn->disable_cbfn(ioc->bfa); |
1114 | 1114 | ||
1115 | /** | 1115 | /* |
1116 | * Notify common modules registered for notification. | 1116 | * Notify common modules registered for notification. |
1117 | */ | 1117 | */ |
1118 | list_for_each(qe, &ioc->hb_notify_q) { | 1118 | list_for_each(qe, &ioc->hb_notify_q) { |
@@ -1154,7 +1154,7 @@ bfa_ioc_hw_sem_get(struct bfa_ioc_s *ioc) | |||
1154 | { | 1154 | { |
1155 | u32 r32; | 1155 | u32 r32; |
1156 | 1156 | ||
1157 | /** | 1157 | /* |
1158 | * First read to the semaphore register will return 0, subsequent reads | 1158 | * First read to the semaphore register will return 0, subsequent reads |
1159 | * will return 1. Semaphore is released by writing 1 to the register | 1159 | * will return 1. Semaphore is released by writing 1 to the register |
1160 | */ | 1160 | */ |
@@ -1179,7 +1179,7 @@ bfa_ioc_hw_sem_get_cancel(struct bfa_ioc_s *ioc) | |||
1179 | bfa_sem_timer_stop(ioc); | 1179 | bfa_sem_timer_stop(ioc); |
1180 | } | 1180 | } |
1181 | 1181 | ||
1182 | /** | 1182 | /* |
1183 | * Initialize LPU local memory (aka secondary memory / SRAM) | 1183 | * Initialize LPU local memory (aka secondary memory / SRAM) |
1184 | */ | 1184 | */ |
1185 | static void | 1185 | static void |
@@ -1199,7 +1199,7 @@ bfa_ioc_lmem_init(struct bfa_ioc_s *ioc) | |||
1199 | pss_ctl |= __PSS_I2C_CLK_DIV(3UL); | 1199 | pss_ctl |= __PSS_I2C_CLK_DIV(3UL); |
1200 | writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); | 1200 | writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); |
1201 | 1201 | ||
1202 | /** | 1202 | /* |
1203 | * wait for memory initialization to be complete | 1203 | * wait for memory initialization to be complete |
1204 | */ | 1204 | */ |
1205 | i = 0; | 1205 | i = 0; |
@@ -1208,7 +1208,7 @@ bfa_ioc_lmem_init(struct bfa_ioc_s *ioc) | |||
1208 | i++; | 1208 | i++; |
1209 | } while (!(pss_ctl & __PSS_LMEM_INIT_DONE) && (i < PSS_LMEM_INIT_TIME)); | 1209 | } while (!(pss_ctl & __PSS_LMEM_INIT_DONE) && (i < PSS_LMEM_INIT_TIME)); |
1210 | 1210 | ||
1211 | /** | 1211 | /* |
1212 | * If memory initialization is not successful, IOC timeout will catch | 1212 | * If memory initialization is not successful, IOC timeout will catch |
1213 | * such failures. | 1213 | * such failures. |
1214 | */ | 1214 | */ |
@@ -1224,7 +1224,7 @@ bfa_ioc_lpu_start(struct bfa_ioc_s *ioc) | |||
1224 | { | 1224 | { |
1225 | u32 pss_ctl; | 1225 | u32 pss_ctl; |
1226 | 1226 | ||
1227 | /** | 1227 | /* |
1228 | * Take processor out of reset. | 1228 | * Take processor out of reset. |
1229 | */ | 1229 | */ |
1230 | pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); | 1230 | pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); |
@@ -1238,7 +1238,7 @@ bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc) | |||
1238 | { | 1238 | { |
1239 | u32 pss_ctl; | 1239 | u32 pss_ctl; |
1240 | 1240 | ||
1241 | /** | 1241 | /* |
1242 | * Put processors in reset. | 1242 | * Put processors in reset. |
1243 | */ | 1243 | */ |
1244 | pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); | 1244 | pss_ctl = readl(ioc->ioc_regs.pss_ctl_reg); |
@@ -1247,7 +1247,7 @@ bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc) | |||
1247 | writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); | 1247 | writel(pss_ctl, ioc->ioc_regs.pss_ctl_reg); |
1248 | } | 1248 | } |
1249 | 1249 | ||
1250 | /** | 1250 | /* |
1251 | * Get driver and firmware versions. | 1251 | * Get driver and firmware versions. |
1252 | */ | 1252 | */ |
1253 | void | 1253 | void |
@@ -1270,7 +1270,7 @@ bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr) | |||
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | /** | 1273 | /* |
1274 | * Returns TRUE if same. | 1274 | * Returns TRUE if same. |
1275 | */ | 1275 | */ |
1276 | bfa_boolean_t | 1276 | bfa_boolean_t |
@@ -1295,7 +1295,7 @@ bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr) | |||
1295 | return BFA_TRUE; | 1295 | return BFA_TRUE; |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | /** | 1298 | /* |
1299 | * Return true if current running version is valid. Firmware signature and | 1299 | * Return true if current running version is valid. Firmware signature and |
1300 | * execution context (driver/bios) must match. | 1300 | * execution context (driver/bios) must match. |
1301 | */ | 1301 | */ |
@@ -1304,7 +1304,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env) | |||
1304 | { | 1304 | { |
1305 | struct bfi_ioc_image_hdr_s fwhdr, *drv_fwhdr; | 1305 | struct bfi_ioc_image_hdr_s fwhdr, *drv_fwhdr; |
1306 | 1306 | ||
1307 | /** | 1307 | /* |
1308 | * If bios/efi boot (flash based) -- return true | 1308 | * If bios/efi boot (flash based) -- return true |
1309 | */ | 1309 | */ |
1310 | if (bfa_ioc_is_bios_optrom(ioc)) | 1310 | if (bfa_ioc_is_bios_optrom(ioc)) |
@@ -1329,7 +1329,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc_s *ioc, u32 boot_env) | |||
1329 | return bfa_ioc_fwver_cmp(ioc, &fwhdr); | 1329 | return bfa_ioc_fwver_cmp(ioc, &fwhdr); |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | /** | 1332 | /* |
1333 | * Conditionally flush any pending message from firmware at start. | 1333 | * Conditionally flush any pending message from firmware at start. |
1334 | */ | 1334 | */ |
1335 | static void | 1335 | static void |
@@ -1361,7 +1361,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1361 | boot_type = BFI_BOOT_TYPE_NORMAL; | 1361 | boot_type = BFI_BOOT_TYPE_NORMAL; |
1362 | boot_env = BFI_BOOT_LOADER_OS; | 1362 | boot_env = BFI_BOOT_LOADER_OS; |
1363 | 1363 | ||
1364 | /** | 1364 | /* |
1365 | * Flash based firmware boot BIOS env. | 1365 | * Flash based firmware boot BIOS env. |
1366 | */ | 1366 | */ |
1367 | if (bfa_ioc_is_bios_optrom(ioc)) { | 1367 | if (bfa_ioc_is_bios_optrom(ioc)) { |
@@ -1369,7 +1369,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1369 | boot_env = BFI_BOOT_LOADER_BIOS; | 1369 | boot_env = BFI_BOOT_LOADER_BIOS; |
1370 | } | 1370 | } |
1371 | 1371 | ||
1372 | /** | 1372 | /* |
1373 | * Flash based firmware boot UEFI env. | 1373 | * Flash based firmware boot UEFI env. |
1374 | */ | 1374 | */ |
1375 | if (bfa_ioc_is_uefi(ioc)) { | 1375 | if (bfa_ioc_is_uefi(ioc)) { |
@@ -1377,7 +1377,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1377 | boot_env = BFI_BOOT_LOADER_UEFI; | 1377 | boot_env = BFI_BOOT_LOADER_UEFI; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /** | 1380 | /* |
1381 | * check if firmware is valid | 1381 | * check if firmware is valid |
1382 | */ | 1382 | */ |
1383 | fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ? | 1383 | fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ? |
@@ -1388,7 +1388,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1388 | return; | 1388 | return; |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | /** | 1391 | /* |
1392 | * If hardware initialization is in progress (initialized by other IOC), | 1392 | * If hardware initialization is in progress (initialized by other IOC), |
1393 | * just wait for an initialization completion interrupt. | 1393 | * just wait for an initialization completion interrupt. |
1394 | */ | 1394 | */ |
@@ -1397,7 +1397,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1397 | return; | 1397 | return; |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | /** | 1400 | /* |
1401 | * If IOC function is disabled and firmware version is same, | 1401 | * If IOC function is disabled and firmware version is same, |
1402 | * just re-enable IOC. | 1402 | * just re-enable IOC. |
1403 | * | 1403 | * |
@@ -1408,7 +1408,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1408 | if (ioc_fwstate == BFI_IOC_DISABLED || | 1408 | if (ioc_fwstate == BFI_IOC_DISABLED || |
1409 | (!bfa_ioc_is_bios_optrom(ioc) && ioc_fwstate == BFI_IOC_OP)) { | 1409 | (!bfa_ioc_is_bios_optrom(ioc) && ioc_fwstate == BFI_IOC_OP)) { |
1410 | 1410 | ||
1411 | /** | 1411 | /* |
1412 | * When using MSI-X any pending firmware ready event should | 1412 | * When using MSI-X any pending firmware ready event should |
1413 | * be flushed. Otherwise MSI-X interrupts are not delivered. | 1413 | * be flushed. Otherwise MSI-X interrupts are not delivered. |
1414 | */ | 1414 | */ |
@@ -1418,7 +1418,7 @@ bfa_ioc_hwinit(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1418 | return; | 1418 | return; |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | /** | 1421 | /* |
1422 | * Initialize the h/w for any other states. | 1422 | * Initialize the h/w for any other states. |
1423 | */ | 1423 | */ |
1424 | bfa_ioc_boot(ioc, boot_type, boot_env); | 1424 | bfa_ioc_boot(ioc, boot_type, boot_env); |
@@ -1529,7 +1529,7 @@ bfa_ioc_hb_stop(struct bfa_ioc_s *ioc) | |||
1529 | } | 1529 | } |
1530 | 1530 | ||
1531 | 1531 | ||
1532 | /** | 1532 | /* |
1533 | * Initiate a full firmware download. | 1533 | * Initiate a full firmware download. |
1534 | */ | 1534 | */ |
1535 | static void | 1535 | static void |
@@ -1542,7 +1542,7 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, | |||
1542 | u32 chunkno = 0; | 1542 | u32 chunkno = 0; |
1543 | u32 i; | 1543 | u32 i; |
1544 | 1544 | ||
1545 | /** | 1545 | /* |
1546 | * Initialize LMEM first before code download | 1546 | * Initialize LMEM first before code download |
1547 | */ | 1547 | */ |
1548 | bfa_ioc_lmem_init(ioc); | 1548 | bfa_ioc_lmem_init(ioc); |
@@ -1563,7 +1563,7 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, | |||
1563 | BFA_IOC_FLASH_CHUNK_ADDR(chunkno)); | 1563 | BFA_IOC_FLASH_CHUNK_ADDR(chunkno)); |
1564 | } | 1564 | } |
1565 | 1565 | ||
1566 | /** | 1566 | /* |
1567 | * write smem | 1567 | * write smem |
1568 | */ | 1568 | */ |
1569 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, | 1569 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, |
@@ -1571,7 +1571,7 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, | |||
1571 | 1571 | ||
1572 | loff += sizeof(u32); | 1572 | loff += sizeof(u32); |
1573 | 1573 | ||
1574 | /** | 1574 | /* |
1575 | * handle page offset wrap around | 1575 | * handle page offset wrap around |
1576 | */ | 1576 | */ |
1577 | loff = PSS_SMEM_PGOFF(loff); | 1577 | loff = PSS_SMEM_PGOFF(loff); |
@@ -1598,7 +1598,7 @@ bfa_ioc_reset(struct bfa_ioc_s *ioc, bfa_boolean_t force) | |||
1598 | bfa_ioc_hwinit(ioc, force); | 1598 | bfa_ioc_hwinit(ioc, force); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | /** | 1601 | /* |
1602 | * Update BFA configuration from firmware configuration. | 1602 | * Update BFA configuration from firmware configuration. |
1603 | */ | 1603 | */ |
1604 | static void | 1604 | static void |
@@ -1613,7 +1613,7 @@ bfa_ioc_getattr_reply(struct bfa_ioc_s *ioc) | |||
1613 | bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); | 1613 | bfa_fsm_send_event(ioc, IOC_E_FWRSP_GETATTR); |
1614 | } | 1614 | } |
1615 | 1615 | ||
1616 | /** | 1616 | /* |
1617 | * Attach time initialization of mbox logic. | 1617 | * Attach time initialization of mbox logic. |
1618 | */ | 1618 | */ |
1619 | static void | 1619 | static void |
@@ -1629,7 +1629,7 @@ bfa_ioc_mbox_attach(struct bfa_ioc_s *ioc) | |||
1629 | } | 1629 | } |
1630 | } | 1630 | } |
1631 | 1631 | ||
1632 | /** | 1632 | /* |
1633 | * Mbox poll timer -- restarts any pending mailbox requests. | 1633 | * Mbox poll timer -- restarts any pending mailbox requests. |
1634 | */ | 1634 | */ |
1635 | static void | 1635 | static void |
@@ -1639,27 +1639,27 @@ bfa_ioc_mbox_poll(struct bfa_ioc_s *ioc) | |||
1639 | struct bfa_mbox_cmd_s *cmd; | 1639 | struct bfa_mbox_cmd_s *cmd; |
1640 | u32 stat; | 1640 | u32 stat; |
1641 | 1641 | ||
1642 | /** | 1642 | /* |
1643 | * If no command pending, do nothing | 1643 | * If no command pending, do nothing |
1644 | */ | 1644 | */ |
1645 | if (list_empty(&mod->cmd_q)) | 1645 | if (list_empty(&mod->cmd_q)) |
1646 | return; | 1646 | return; |
1647 | 1647 | ||
1648 | /** | 1648 | /* |
1649 | * If previous command is not yet fetched by firmware, do nothing | 1649 | * If previous command is not yet fetched by firmware, do nothing |
1650 | */ | 1650 | */ |
1651 | stat = readl(ioc->ioc_regs.hfn_mbox_cmd); | 1651 | stat = readl(ioc->ioc_regs.hfn_mbox_cmd); |
1652 | if (stat) | 1652 | if (stat) |
1653 | return; | 1653 | return; |
1654 | 1654 | ||
1655 | /** | 1655 | /* |
1656 | * Enqueue command to firmware. | 1656 | * Enqueue command to firmware. |
1657 | */ | 1657 | */ |
1658 | bfa_q_deq(&mod->cmd_q, &cmd); | 1658 | bfa_q_deq(&mod->cmd_q, &cmd); |
1659 | bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); | 1659 | bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); |
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | /** | 1662 | /* |
1663 | * Cleanup any pending requests. | 1663 | * Cleanup any pending requests. |
1664 | */ | 1664 | */ |
1665 | static void | 1665 | static void |
@@ -1672,7 +1672,7 @@ bfa_ioc_mbox_hbfail(struct bfa_ioc_s *ioc) | |||
1672 | bfa_q_deq(&mod->cmd_q, &cmd); | 1672 | bfa_q_deq(&mod->cmd_q, &cmd); |
1673 | } | 1673 | } |
1674 | 1674 | ||
1675 | /** | 1675 | /* |
1676 | * Read data from SMEM to host through PCI memmap | 1676 | * Read data from SMEM to host through PCI memmap |
1677 | * | 1677 | * |
1678 | * @param[in] ioc memory for IOC | 1678 | * @param[in] ioc memory for IOC |
@@ -1710,7 +1710,7 @@ bfa_ioc_smem_read(struct bfa_ioc_s *ioc, void *tbuf, u32 soff, u32 sz) | |||
1710 | buf[i] = be32_to_cpu(r32); | 1710 | buf[i] = be32_to_cpu(r32); |
1711 | loff += sizeof(u32); | 1711 | loff += sizeof(u32); |
1712 | 1712 | ||
1713 | /** | 1713 | /* |
1714 | * handle page offset wrap around | 1714 | * handle page offset wrap around |
1715 | */ | 1715 | */ |
1716 | loff = PSS_SMEM_PGOFF(loff); | 1716 | loff = PSS_SMEM_PGOFF(loff); |
@@ -1729,7 +1729,7 @@ bfa_ioc_smem_read(struct bfa_ioc_s *ioc, void *tbuf, u32 soff, u32 sz) | |||
1729 | return BFA_STATUS_OK; | 1729 | return BFA_STATUS_OK; |
1730 | } | 1730 | } |
1731 | 1731 | ||
1732 | /** | 1732 | /* |
1733 | * Clear SMEM data from host through PCI memmap | 1733 | * Clear SMEM data from host through PCI memmap |
1734 | * | 1734 | * |
1735 | * @param[in] ioc memory for IOC | 1735 | * @param[in] ioc memory for IOC |
@@ -1764,7 +1764,7 @@ bfa_ioc_smem_clr(struct bfa_ioc_s *ioc, u32 soff, u32 sz) | |||
1764 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, 0); | 1764 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, 0); |
1765 | loff += sizeof(u32); | 1765 | loff += sizeof(u32); |
1766 | 1766 | ||
1767 | /** | 1767 | /* |
1768 | * handle page offset wrap around | 1768 | * handle page offset wrap around |
1769 | */ | 1769 | */ |
1770 | loff = PSS_SMEM_PGOFF(loff); | 1770 | loff = PSS_SMEM_PGOFF(loff); |
@@ -1783,7 +1783,7 @@ bfa_ioc_smem_clr(struct bfa_ioc_s *ioc, u32 soff, u32 sz) | |||
1783 | return BFA_STATUS_OK; | 1783 | return BFA_STATUS_OK; |
1784 | } | 1784 | } |
1785 | 1785 | ||
1786 | /** | 1786 | /* |
1787 | * hal iocpf to ioc interface | 1787 | * hal iocpf to ioc interface |
1788 | */ | 1788 | */ |
1789 | static void | 1789 | static void |
@@ -1808,7 +1808,7 @@ static void | |||
1808 | bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc) | 1808 | bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc) |
1809 | { | 1809 | { |
1810 | struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; | 1810 | struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad; |
1811 | /** | 1811 | /* |
1812 | * Provide enable completion callback. | 1812 | * Provide enable completion callback. |
1813 | */ | 1813 | */ |
1814 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); | 1814 | ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE); |
@@ -1819,7 +1819,7 @@ bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc) | |||
1819 | 1819 | ||
1820 | 1820 | ||
1821 | 1821 | ||
1822 | /** | 1822 | /* |
1823 | * hal_ioc_public | 1823 | * hal_ioc_public |
1824 | */ | 1824 | */ |
1825 | 1825 | ||
@@ -1843,7 +1843,7 @@ bfa_ioc_pll_init(struct bfa_ioc_s *ioc) | |||
1843 | return BFA_STATUS_OK; | 1843 | return BFA_STATUS_OK; |
1844 | } | 1844 | } |
1845 | 1845 | ||
1846 | /** | 1846 | /* |
1847 | * Interface used by diag module to do firmware boot with memory test | 1847 | * Interface used by diag module to do firmware boot with memory test |
1848 | * as the entry vector. | 1848 | * as the entry vector. |
1849 | */ | 1849 | */ |
@@ -1857,7 +1857,7 @@ bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env) | |||
1857 | if (bfa_ioc_pll_init(ioc) != BFA_STATUS_OK) | 1857 | if (bfa_ioc_pll_init(ioc) != BFA_STATUS_OK) |
1858 | return; | 1858 | return; |
1859 | 1859 | ||
1860 | /** | 1860 | /* |
1861 | * Initialize IOC state of all functions on a chip reset. | 1861 | * Initialize IOC state of all functions on a chip reset. |
1862 | */ | 1862 | */ |
1863 | rb = ioc->pcidev.pci_bar_kva; | 1863 | rb = ioc->pcidev.pci_bar_kva; |
@@ -1872,14 +1872,14 @@ bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_env) | |||
1872 | bfa_ioc_msgflush(ioc); | 1872 | bfa_ioc_msgflush(ioc); |
1873 | bfa_ioc_download_fw(ioc, boot_type, boot_env); | 1873 | bfa_ioc_download_fw(ioc, boot_type, boot_env); |
1874 | 1874 | ||
1875 | /** | 1875 | /* |
1876 | * Enable interrupts just before starting LPU | 1876 | * Enable interrupts just before starting LPU |
1877 | */ | 1877 | */ |
1878 | ioc->cbfn->reset_cbfn(ioc->bfa); | 1878 | ioc->cbfn->reset_cbfn(ioc->bfa); |
1879 | bfa_ioc_lpu_start(ioc); | 1879 | bfa_ioc_lpu_start(ioc); |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | /** | 1882 | /* |
1883 | * Enable/disable IOC failure auto recovery. | 1883 | * Enable/disable IOC failure auto recovery. |
1884 | */ | 1884 | */ |
1885 | void | 1885 | void |
@@ -1913,7 +1913,7 @@ bfa_ioc_msgget(struct bfa_ioc_s *ioc, void *mbmsg) | |||
1913 | u32 r32; | 1913 | u32 r32; |
1914 | int i; | 1914 | int i; |
1915 | 1915 | ||
1916 | /** | 1916 | /* |
1917 | * read the MBOX msg | 1917 | * read the MBOX msg |
1918 | */ | 1918 | */ |
1919 | for (i = 0; i < (sizeof(union bfi_ioc_i2h_msg_u) / sizeof(u32)); | 1919 | for (i = 0; i < (sizeof(union bfi_ioc_i2h_msg_u) / sizeof(u32)); |
@@ -1923,7 +1923,7 @@ bfa_ioc_msgget(struct bfa_ioc_s *ioc, void *mbmsg) | |||
1923 | msgp[i] = cpu_to_be32(r32); | 1923 | msgp[i] = cpu_to_be32(r32); |
1924 | } | 1924 | } |
1925 | 1925 | ||
1926 | /** | 1926 | /* |
1927 | * turn off mailbox interrupt by clearing mailbox status | 1927 | * turn off mailbox interrupt by clearing mailbox status |
1928 | */ | 1928 | */ |
1929 | writel(1, ioc->ioc_regs.lpu_mbox_cmd); | 1929 | writel(1, ioc->ioc_regs.lpu_mbox_cmd); |
@@ -1966,7 +1966,7 @@ bfa_ioc_isr(struct bfa_ioc_s *ioc, struct bfi_mbmsg_s *m) | |||
1966 | } | 1966 | } |
1967 | } | 1967 | } |
1968 | 1968 | ||
1969 | /** | 1969 | /* |
1970 | * IOC attach time initialization and setup. | 1970 | * IOC attach time initialization and setup. |
1971 | * | 1971 | * |
1972 | * @param[in] ioc memory for IOC | 1972 | * @param[in] ioc memory for IOC |
@@ -1991,7 +1991,7 @@ bfa_ioc_attach(struct bfa_ioc_s *ioc, void *bfa, struct bfa_ioc_cbfn_s *cbfn, | |||
1991 | bfa_fsm_send_event(ioc, IOC_E_RESET); | 1991 | bfa_fsm_send_event(ioc, IOC_E_RESET); |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | /** | 1994 | /* |
1995 | * Driver detach time IOC cleanup. | 1995 | * Driver detach time IOC cleanup. |
1996 | */ | 1996 | */ |
1997 | void | 1997 | void |
@@ -2000,7 +2000,7 @@ bfa_ioc_detach(struct bfa_ioc_s *ioc) | |||
2000 | bfa_fsm_send_event(ioc, IOC_E_DETACH); | 2000 | bfa_fsm_send_event(ioc, IOC_E_DETACH); |
2001 | } | 2001 | } |
2002 | 2002 | ||
2003 | /** | 2003 | /* |
2004 | * Setup IOC PCI properties. | 2004 | * Setup IOC PCI properties. |
2005 | * | 2005 | * |
2006 | * @param[in] pcidev PCI device information for this IOC | 2006 | * @param[in] pcidev PCI device information for this IOC |
@@ -2014,7 +2014,7 @@ bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, | |||
2014 | ioc->ctdev = bfa_asic_id_ct(ioc->pcidev.device_id); | 2014 | ioc->ctdev = bfa_asic_id_ct(ioc->pcidev.device_id); |
2015 | ioc->cna = ioc->ctdev && !ioc->fcmode; | 2015 | ioc->cna = ioc->ctdev && !ioc->fcmode; |
2016 | 2016 | ||
2017 | /** | 2017 | /* |
2018 | * Set asic specific interfaces. See bfa_ioc_cb.c and bfa_ioc_ct.c | 2018 | * Set asic specific interfaces. See bfa_ioc_cb.c and bfa_ioc_ct.c |
2019 | */ | 2019 | */ |
2020 | if (ioc->ctdev) | 2020 | if (ioc->ctdev) |
@@ -2026,7 +2026,7 @@ bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, | |||
2026 | bfa_ioc_reg_init(ioc); | 2026 | bfa_ioc_reg_init(ioc); |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | /** | 2029 | /* |
2030 | * Initialize IOC dma memory | 2030 | * Initialize IOC dma memory |
2031 | * | 2031 | * |
2032 | * @param[in] dm_kva kernel virtual address of IOC dma memory | 2032 | * @param[in] dm_kva kernel virtual address of IOC dma memory |
@@ -2035,7 +2035,7 @@ bfa_ioc_pci_init(struct bfa_ioc_s *ioc, struct bfa_pcidev_s *pcidev, | |||
2035 | void | 2035 | void |
2036 | bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa) | 2036 | bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa) |
2037 | { | 2037 | { |
2038 | /** | 2038 | /* |
2039 | * dma memory for firmware attribute | 2039 | * dma memory for firmware attribute |
2040 | */ | 2040 | */ |
2041 | ioc->attr_dma.kva = dm_kva; | 2041 | ioc->attr_dma.kva = dm_kva; |
@@ -2043,7 +2043,7 @@ bfa_ioc_mem_claim(struct bfa_ioc_s *ioc, u8 *dm_kva, u64 dm_pa) | |||
2043 | ioc->attr = (struct bfi_ioc_attr_s *) dm_kva; | 2043 | ioc->attr = (struct bfi_ioc_attr_s *) dm_kva; |
2044 | } | 2044 | } |
2045 | 2045 | ||
2046 | /** | 2046 | /* |
2047 | * Return size of dma memory required. | 2047 | * Return size of dma memory required. |
2048 | */ | 2048 | */ |
2049 | u32 | 2049 | u32 |
@@ -2068,7 +2068,7 @@ bfa_ioc_disable(struct bfa_ioc_s *ioc) | |||
2068 | bfa_fsm_send_event(ioc, IOC_E_DISABLE); | 2068 | bfa_fsm_send_event(ioc, IOC_E_DISABLE); |
2069 | } | 2069 | } |
2070 | 2070 | ||
2071 | /** | 2071 | /* |
2072 | * Returns memory required for saving firmware trace in case of crash. | 2072 | * Returns memory required for saving firmware trace in case of crash. |
2073 | * Driver must call this interface to allocate memory required for | 2073 | * Driver must call this interface to allocate memory required for |
2074 | * automatic saving of firmware trace. Driver should call | 2074 | * automatic saving of firmware trace. Driver should call |
@@ -2081,7 +2081,7 @@ bfa_ioc_debug_trcsz(bfa_boolean_t auto_recover) | |||
2081 | return (auto_recover) ? BFA_DBG_FWTRC_LEN : 0; | 2081 | return (auto_recover) ? BFA_DBG_FWTRC_LEN : 0; |
2082 | } | 2082 | } |
2083 | 2083 | ||
2084 | /** | 2084 | /* |
2085 | * Initialize memory for saving firmware trace. Driver must initialize | 2085 | * Initialize memory for saving firmware trace. Driver must initialize |
2086 | * trace memory before call bfa_ioc_enable(). | 2086 | * trace memory before call bfa_ioc_enable(). |
2087 | */ | 2087 | */ |
@@ -2104,7 +2104,7 @@ bfa_ioc_smem_pgoff(struct bfa_ioc_s *ioc, u32 fmaddr) | |||
2104 | return PSS_SMEM_PGOFF(fmaddr); | 2104 | return PSS_SMEM_PGOFF(fmaddr); |
2105 | } | 2105 | } |
2106 | 2106 | ||
2107 | /** | 2107 | /* |
2108 | * Register mailbox message handler functions | 2108 | * Register mailbox message handler functions |
2109 | * | 2109 | * |
2110 | * @param[in] ioc IOC instance | 2110 | * @param[in] ioc IOC instance |
@@ -2120,7 +2120,7 @@ bfa_ioc_mbox_register(struct bfa_ioc_s *ioc, bfa_ioc_mbox_mcfunc_t *mcfuncs) | |||
2120 | mod->mbhdlr[mc].cbfn = mcfuncs[mc]; | 2120 | mod->mbhdlr[mc].cbfn = mcfuncs[mc]; |
2121 | } | 2121 | } |
2122 | 2122 | ||
2123 | /** | 2123 | /* |
2124 | * Register mailbox message handler function, to be called by common modules | 2124 | * Register mailbox message handler function, to be called by common modules |
2125 | */ | 2125 | */ |
2126 | void | 2126 | void |
@@ -2133,7 +2133,7 @@ bfa_ioc_mbox_regisr(struct bfa_ioc_s *ioc, enum bfi_mclass mc, | |||
2133 | mod->mbhdlr[mc].cbarg = cbarg; | 2133 | mod->mbhdlr[mc].cbarg = cbarg; |
2134 | } | 2134 | } |
2135 | 2135 | ||
2136 | /** | 2136 | /* |
2137 | * Queue a mailbox command request to firmware. Waits if mailbox is busy. | 2137 | * Queue a mailbox command request to firmware. Waits if mailbox is busy. |
2138 | * Responsibility of caller to serialize | 2138 | * Responsibility of caller to serialize |
2139 | * | 2139 | * |
@@ -2146,7 +2146,7 @@ bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd) | |||
2146 | struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; | 2146 | struct bfa_ioc_mbox_mod_s *mod = &ioc->mbox_mod; |
2147 | u32 stat; | 2147 | u32 stat; |
2148 | 2148 | ||
2149 | /** | 2149 | /* |
2150 | * If a previous command is pending, queue new command | 2150 | * If a previous command is pending, queue new command |
2151 | */ | 2151 | */ |
2152 | if (!list_empty(&mod->cmd_q)) { | 2152 | if (!list_empty(&mod->cmd_q)) { |
@@ -2154,7 +2154,7 @@ bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd) | |||
2154 | return; | 2154 | return; |
2155 | } | 2155 | } |
2156 | 2156 | ||
2157 | /** | 2157 | /* |
2158 | * If mailbox is busy, queue command for poll timer | 2158 | * If mailbox is busy, queue command for poll timer |
2159 | */ | 2159 | */ |
2160 | stat = readl(ioc->ioc_regs.hfn_mbox_cmd); | 2160 | stat = readl(ioc->ioc_regs.hfn_mbox_cmd); |
@@ -2163,13 +2163,13 @@ bfa_ioc_mbox_queue(struct bfa_ioc_s *ioc, struct bfa_mbox_cmd_s *cmd) | |||
2163 | return; | 2163 | return; |
2164 | } | 2164 | } |
2165 | 2165 | ||
2166 | /** | 2166 | /* |
2167 | * mailbox is free -- queue command to firmware | 2167 | * mailbox is free -- queue command to firmware |
2168 | */ | 2168 | */ |
2169 | bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); | 2169 | bfa_ioc_mbox_send(ioc, cmd->msg, sizeof(cmd->msg)); |
2170 | } | 2170 | } |
2171 | 2171 | ||
2172 | /** | 2172 | /* |
2173 | * Handle mailbox interrupts | 2173 | * Handle mailbox interrupts |
2174 | */ | 2174 | */ |
2175 | void | 2175 | void |
@@ -2181,7 +2181,7 @@ bfa_ioc_mbox_isr(struct bfa_ioc_s *ioc) | |||
2181 | 2181 | ||
2182 | bfa_ioc_msgget(ioc, &m); | 2182 | bfa_ioc_msgget(ioc, &m); |
2183 | 2183 | ||
2184 | /** | 2184 | /* |
2185 | * Treat IOC message class as special. | 2185 | * Treat IOC message class as special. |
2186 | */ | 2186 | */ |
2187 | mc = m.mh.msg_class; | 2187 | mc = m.mh.msg_class; |
@@ -2209,7 +2209,7 @@ bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc) | |||
2209 | ioc->port_id = bfa_ioc_pcifn(ioc); | 2209 | ioc->port_id = bfa_ioc_pcifn(ioc); |
2210 | } | 2210 | } |
2211 | 2211 | ||
2212 | /** | 2212 | /* |
2213 | * return true if IOC is disabled | 2213 | * return true if IOC is disabled |
2214 | */ | 2214 | */ |
2215 | bfa_boolean_t | 2215 | bfa_boolean_t |
@@ -2219,7 +2219,7 @@ bfa_ioc_is_disabled(struct bfa_ioc_s *ioc) | |||
2219 | bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled); | 2219 | bfa_fsm_cmp_state(ioc, bfa_ioc_sm_disabled); |
2220 | } | 2220 | } |
2221 | 2221 | ||
2222 | /** | 2222 | /* |
2223 | * return true if IOC firmware is different. | 2223 | * return true if IOC firmware is different. |
2224 | */ | 2224 | */ |
2225 | bfa_boolean_t | 2225 | bfa_boolean_t |
@@ -2238,7 +2238,7 @@ bfa_ioc_fw_mismatch(struct bfa_ioc_s *ioc) | |||
2238 | ((__sm) == BFI_IOC_FAIL) || \ | 2238 | ((__sm) == BFI_IOC_FAIL) || \ |
2239 | ((__sm) == BFI_IOC_CFG_DISABLED)) | 2239 | ((__sm) == BFI_IOC_CFG_DISABLED)) |
2240 | 2240 | ||
2241 | /** | 2241 | /* |
2242 | * Check if adapter is disabled -- both IOCs should be in a disabled | 2242 | * Check if adapter is disabled -- both IOCs should be in a disabled |
2243 | * state. | 2243 | * state. |
2244 | */ | 2244 | */ |
@@ -2264,7 +2264,7 @@ bfa_ioc_adapter_is_disabled(struct bfa_ioc_s *ioc) | |||
2264 | return BFA_TRUE; | 2264 | return BFA_TRUE; |
2265 | } | 2265 | } |
2266 | 2266 | ||
2267 | /** | 2267 | /* |
2268 | * Add to IOC heartbeat failure notification queue. To be used by common | 2268 | * Add to IOC heartbeat failure notification queue. To be used by common |
2269 | * modules such as cee, port, diag. | 2269 | * modules such as cee, port, diag. |
2270 | */ | 2270 | */ |
@@ -2391,7 +2391,7 @@ bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model) | |||
2391 | 2391 | ||
2392 | ioc_attr = ioc->attr; | 2392 | ioc_attr = ioc->attr; |
2393 | 2393 | ||
2394 | /** | 2394 | /* |
2395 | * model name | 2395 | * model name |
2396 | */ | 2396 | */ |
2397 | snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u", | 2397 | snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u", |
@@ -2455,7 +2455,7 @@ bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr) | |||
2455 | bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev); | 2455 | bfa_ioc_get_pci_chip_rev(ioc, ioc_attr->pci_attr.chip_rev); |
2456 | } | 2456 | } |
2457 | 2457 | ||
2458 | /** | 2458 | /* |
2459 | * hal_wwn_public | 2459 | * hal_wwn_public |
2460 | */ | 2460 | */ |
2461 | wwn_t | 2461 | wwn_t |
@@ -2521,7 +2521,7 @@ bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc) | |||
2521 | return ioc->fcmode || !bfa_asic_id_ct(ioc->pcidev.device_id); | 2521 | return ioc->fcmode || !bfa_asic_id_ct(ioc->pcidev.device_id); |
2522 | } | 2522 | } |
2523 | 2523 | ||
2524 | /** | 2524 | /* |
2525 | * Retrieve saved firmware trace from a prior IOC failure. | 2525 | * Retrieve saved firmware trace from a prior IOC failure. |
2526 | */ | 2526 | */ |
2527 | bfa_status_t | 2527 | bfa_status_t |
@@ -2541,7 +2541,7 @@ bfa_ioc_debug_fwsave(struct bfa_ioc_s *ioc, void *trcdata, int *trclen) | |||
2541 | return BFA_STATUS_OK; | 2541 | return BFA_STATUS_OK; |
2542 | } | 2542 | } |
2543 | 2543 | ||
2544 | /** | 2544 | /* |
2545 | * Clear saved firmware trace | 2545 | * Clear saved firmware trace |
2546 | */ | 2546 | */ |
2547 | void | 2547 | void |
@@ -2550,7 +2550,7 @@ bfa_ioc_debug_fwsave_clear(struct bfa_ioc_s *ioc) | |||
2550 | ioc->dbg_fwsave_once = BFA_TRUE; | 2550 | ioc->dbg_fwsave_once = BFA_TRUE; |
2551 | } | 2551 | } |
2552 | 2552 | ||
2553 | /** | 2553 | /* |
2554 | * Retrieve saved firmware trace from a prior IOC failure. | 2554 | * Retrieve saved firmware trace from a prior IOC failure. |
2555 | */ | 2555 | */ |
2556 | bfa_status_t | 2556 | bfa_status_t |
@@ -2590,7 +2590,7 @@ bfa_ioc_fwsync(struct bfa_ioc_s *ioc) | |||
2590 | 2590 | ||
2591 | bfa_ioc_send_fwsync(ioc); | 2591 | bfa_ioc_send_fwsync(ioc); |
2592 | 2592 | ||
2593 | /** | 2593 | /* |
2594 | * After sending a fw sync mbox command wait for it to | 2594 | * After sending a fw sync mbox command wait for it to |
2595 | * take effect. We will not wait for a response because | 2595 | * take effect. We will not wait for a response because |
2596 | * 1. fw_sync mbox cmd doesn't have a response. | 2596 | * 1. fw_sync mbox cmd doesn't have a response. |
@@ -2605,7 +2605,7 @@ bfa_ioc_fwsync(struct bfa_ioc_s *ioc) | |||
2605 | fwsync_iter--; | 2605 | fwsync_iter--; |
2606 | } | 2606 | } |
2607 | 2607 | ||
2608 | /** | 2608 | /* |
2609 | * Dump firmware smem | 2609 | * Dump firmware smem |
2610 | */ | 2610 | */ |
2611 | bfa_status_t | 2611 | bfa_status_t |
@@ -2625,7 +2625,7 @@ bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf, | |||
2625 | loff = *offset; | 2625 | loff = *offset; |
2626 | dlen = *buflen; | 2626 | dlen = *buflen; |
2627 | 2627 | ||
2628 | /** | 2628 | /* |
2629 | * First smem read, sync smem before proceeding | 2629 | * First smem read, sync smem before proceeding |
2630 | * No need to sync before reading every chunk. | 2630 | * No need to sync before reading every chunk. |
2631 | */ | 2631 | */ |
@@ -2652,7 +2652,7 @@ bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf, | |||
2652 | return status; | 2652 | return status; |
2653 | } | 2653 | } |
2654 | 2654 | ||
2655 | /** | 2655 | /* |
2656 | * Firmware statistics | 2656 | * Firmware statistics |
2657 | */ | 2657 | */ |
2658 | bfa_status_t | 2658 | bfa_status_t |
@@ -2697,7 +2697,7 @@ bfa_ioc_fw_stats_clear(struct bfa_ioc_s *ioc) | |||
2697 | return status; | 2697 | return status; |
2698 | } | 2698 | } |
2699 | 2699 | ||
2700 | /** | 2700 | /* |
2701 | * Save firmware trace if configured. | 2701 | * Save firmware trace if configured. |
2702 | */ | 2702 | */ |
2703 | static void | 2703 | static void |
@@ -2711,7 +2711,7 @@ bfa_ioc_debug_save(struct bfa_ioc_s *ioc) | |||
2711 | } | 2711 | } |
2712 | } | 2712 | } |
2713 | 2713 | ||
2714 | /** | 2714 | /* |
2715 | * Firmware failure detected. Start recovery actions. | 2715 | * Firmware failure detected. Start recovery actions. |
2716 | */ | 2716 | */ |
2717 | static void | 2717 | static void |
@@ -2733,7 +2733,7 @@ bfa_ioc_check_attr_wwns(struct bfa_ioc_s *ioc) | |||
2733 | return; | 2733 | return; |
2734 | } | 2734 | } |
2735 | 2735 | ||
2736 | /** | 2736 | /* |
2737 | * hal_iocpf_pvt BFA IOC PF private functions | 2737 | * hal_iocpf_pvt BFA IOC PF private functions |
2738 | */ | 2738 | */ |
2739 | 2739 | ||
@@ -2790,7 +2790,7 @@ bfa_iocpf_sem_timeout(void *ioc_arg) | |||
2790 | bfa_ioc_hw_sem_get(ioc); | 2790 | bfa_ioc_hw_sem_get(ioc); |
2791 | } | 2791 | } |
2792 | 2792 | ||
2793 | /** | 2793 | /* |
2794 | * bfa timer function | 2794 | * bfa timer function |
2795 | */ | 2795 | */ |
2796 | void | 2796 | void |
@@ -2835,7 +2835,7 @@ bfa_timer_beat(struct bfa_timer_mod_s *mod) | |||
2835 | } | 2835 | } |
2836 | } | 2836 | } |
2837 | 2837 | ||
2838 | /** | 2838 | /* |
2839 | * Should be called with lock protection | 2839 | * Should be called with lock protection |
2840 | */ | 2840 | */ |
2841 | void | 2841 | void |
@@ -2853,7 +2853,7 @@ bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer, | |||
2853 | list_add_tail(&timer->qe, &mod->timer_q); | 2853 | list_add_tail(&timer->qe, &mod->timer_q); |
2854 | } | 2854 | } |
2855 | 2855 | ||
2856 | /** | 2856 | /* |
2857 | * Should be called with lock protection | 2857 | * Should be called with lock protection |
2858 | */ | 2858 | */ |
2859 | void | 2859 | void |