xref: /linux/drivers/scsi/elx/include/efc_common.h (revision 7c5b76831ec45dba58d89ed7bd5f8c5373443e12)
1216fc0b4SJames Smart /* SPDX-License-Identifier: GPL-2.0 */
2216fc0b4SJames Smart /*
3216fc0b4SJames Smart  * Copyright (C) 2021 Broadcom. All Rights Reserved. The term
4216fc0b4SJames Smart  * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
5216fc0b4SJames Smart  */
6216fc0b4SJames Smart 
7216fc0b4SJames Smart #ifndef __EFC_COMMON_H__
8216fc0b4SJames Smart #define __EFC_COMMON_H__
9216fc0b4SJames Smart 
10216fc0b4SJames Smart #include <linux/pci.h>
11216fc0b4SJames Smart 
12216fc0b4SJames Smart struct efc_dma {
13216fc0b4SJames Smart 	void		*virt;
14216fc0b4SJames Smart 	void            *alloc;
15216fc0b4SJames Smart 	dma_addr_t	phys;
16216fc0b4SJames Smart 
17216fc0b4SJames Smart 	size_t		size;
18216fc0b4SJames Smart 	size_t          len;
19216fc0b4SJames Smart 	struct pci_dev	*pdev;
20216fc0b4SJames Smart };
21216fc0b4SJames Smart 
22*7c5b7683SJames Smart #define efc_log_crit(efc, fmt, args...) \
23*7c5b7683SJames Smart 		dev_crit(&((efc)->pci)->dev, fmt, ##args)
24*7c5b7683SJames Smart 
25*7c5b7683SJames Smart #define efc_log_err(efc, fmt, args...) \
26*7c5b7683SJames Smart 		dev_err(&((efc)->pci)->dev, fmt, ##args)
27*7c5b7683SJames Smart 
28*7c5b7683SJames Smart #define efc_log_warn(efc, fmt, args...) \
29*7c5b7683SJames Smart 		dev_warn(&((efc)->pci)->dev, fmt, ##args)
30*7c5b7683SJames Smart 
31*7c5b7683SJames Smart #define efc_log_info(efc, fmt, args...) \
32*7c5b7683SJames Smart 		dev_info(&((efc)->pci)->dev, fmt, ##args)
33*7c5b7683SJames Smart 
34*7c5b7683SJames Smart #define efc_log_debug(efc, fmt, args...) \
35*7c5b7683SJames Smart 		dev_dbg(&((efc)->pci)->dev, fmt, ##args)
36*7c5b7683SJames Smart 
37216fc0b4SJames Smart #endif /* __EFC_COMMON_H__ */
38