]>
Commit | Line | Data |
---|---|---|
7725ccfd JH |
1 | /* |
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | |
3 | * All rights reserved | |
4 | * www.brocade.com | |
5 | * | |
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | |
10 | * published by the Free Software Foundation | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, but | |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | */ | |
17 | ||
18 | #include <cs/bfa_debug.h> | |
19 | #include <bfa_os_inc.h> | |
20 | #include <cs/bfa_q.h> | |
21 | #include <log/bfa_log_hal.h> | |
22 | ||
23 | /** | |
24 | * cs_debug_api | |
25 | */ | |
26 | ||
27 | ||
28 | void | |
29 | bfa_panic(int line, char *file, char *panicstr) | |
30 | { | |
31 | bfa_log(NULL, BFA_LOG_HAL_ASSERT, file, line, panicstr); | |
32 | bfa_os_panic(); | |
33 | } | |
34 | ||
35 | void | |
36 | bfa_sm_panic(struct bfa_log_mod_s *logm, int line, char *file, int event) | |
37 | { | |
38 | bfa_log(logm, BFA_LOG_HAL_SM_ASSERT, file, line, event); | |
39 | bfa_os_panic(); | |
40 | } | |
41 | ||
42 | int | |
43 | bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe) | |
44 | { | |
45 | struct list_head *tqe; | |
46 | ||
47 | tqe = bfa_q_next(q); | |
48 | while (tqe != q) { | |
49 | if (tqe == qe) | |
50 | return (1); | |
51 | tqe = bfa_q_next(tqe); | |
52 | if (tqe == NULL) | |
53 | break; | |
54 | } | |
55 | return (0); | |
56 | } | |
57 | ||
58 |