diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-12 14:38:08 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-12 14:38:08 +0100 |
commit | edc72786d208e77db94f84dcb0d166c0d23d82f7 (patch) | |
tree | 6fd32770f9cb2f1a888775514294d60aecba5245 /drivers/scsi/bfa/include/cs/bfa_debug.h | |
parent | 6a5e293f1b34920c69a932ce37b4a4714a428dc7 (diff) | |
parent | 4367216a099b4df3fa2c4f2b086cda1a1e9afc4e (diff) | |
download | lwn-edc72786d208e77db94f84dcb0d166c0d23d82f7.tar.gz lwn-edc72786d208e77db94f84dcb0d166c0d23d82f7.zip |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'drivers/scsi/bfa/include/cs/bfa_debug.h')
-rw-r--r-- | drivers/scsi/bfa/include/cs/bfa_debug.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/include/cs/bfa_debug.h b/drivers/scsi/bfa/include/cs/bfa_debug.h new file mode 100644 index 000000000000..441be86b1b0f --- /dev/null +++ b/drivers/scsi/bfa/include/cs/bfa_debug.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. + * All rights reserved + * www.brocade.com + * + * Linux driver for Brocade Fibre Channel Host Bus Adapter. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License (GPL) Version 2 as + * published by the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +/** + * bfa_debug.h BFA debug interfaces + */ + +#ifndef __BFA_DEBUG_H__ +#define __BFA_DEBUG_H__ + +#define bfa_assert(__cond) do { \ + if (!(__cond)) \ + bfa_panic(__LINE__, __FILE__, #__cond); \ +} while (0) + +#define bfa_sm_fault(__mod, __event) do { \ + bfa_sm_panic((__mod)->logm, __LINE__, __FILE__, __event); \ +} while (0) + +#ifndef BFA_PERF_BUILD +#define bfa_assert_fp(__cond) bfa_assert(__cond) +#else +#define bfa_assert_fp(__cond) +#endif + +struct bfa_log_mod_s; +void bfa_panic(int line, char *file, char *panicstr); +void bfa_sm_panic(struct bfa_log_mod_s *logm, int line, char *file, int event); + +#endif /* __BFA_DEBUG_H__ */ |