-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Header i40e_osdep.h contains only IO primitives and couple of debug printing macros. Split this header file to i40e_io.h and i40e_debug.h and move i40e_debug_mask enum to i40e_debug.h Signed-off-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
- Loading branch information
Ivan Vecera
authored and
Tony Nguyen
committed
Oct 5, 2023
1 parent
ef5d540
commit 5dfd37c
Showing
8 changed files
with
68 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright(c) 2023 Intel Corporation. */ | ||
|
||
#ifndef _I40E_DEBUG_H_ | ||
#define _I40E_DEBUG_H_ | ||
|
||
#include <linux/dev_printk.h> | ||
|
||
/* debug masks - set these bits in hw->debug_mask to control output */ | ||
enum i40e_debug_mask { | ||
I40E_DEBUG_INIT = 0x00000001, | ||
I40E_DEBUG_RELEASE = 0x00000002, | ||
|
||
I40E_DEBUG_LINK = 0x00000010, | ||
I40E_DEBUG_PHY = 0x00000020, | ||
I40E_DEBUG_HMC = 0x00000040, | ||
I40E_DEBUG_NVM = 0x00000080, | ||
I40E_DEBUG_LAN = 0x00000100, | ||
I40E_DEBUG_FLOW = 0x00000200, | ||
I40E_DEBUG_DCB = 0x00000400, | ||
I40E_DEBUG_DIAG = 0x00000800, | ||
I40E_DEBUG_FD = 0x00001000, | ||
I40E_DEBUG_PACKAGE = 0x00002000, | ||
I40E_DEBUG_IWARP = 0x00F00000, | ||
I40E_DEBUG_AQ_MESSAGE = 0x01000000, | ||
I40E_DEBUG_AQ_DESCRIPTOR = 0x02000000, | ||
I40E_DEBUG_AQ_DESC_BUFFER = 0x04000000, | ||
I40E_DEBUG_AQ_COMMAND = 0x06000000, | ||
I40E_DEBUG_AQ = 0x0F000000, | ||
|
||
I40E_DEBUG_USER = 0xF0000000, | ||
|
||
I40E_DEBUG_ALL = 0xFFFFFFFF | ||
}; | ||
|
||
struct i40e_hw; | ||
struct device *i40e_hw_to_dev(struct i40e_hw *hw); | ||
|
||
#define hw_dbg(hw, S, A...) dev_dbg(i40e_hw_to_dev(hw), S, ##A) | ||
|
||
#define i40e_debug(h, m, s, ...) \ | ||
do { \ | ||
if (((m) & (h)->debug_mask)) \ | ||
dev_info(i40e_hw_to_dev(hw), s, ##__VA_ARGS__); \ | ||
} while (0) | ||
|
||
#endif /* _I40E_DEBUG_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright(c) 2023 Intel Corporation. */ | ||
|
||
#ifndef _I40E_IO_H_ | ||
#define _I40E_IO_H_ | ||
|
||
/* get readq/writeq support for 32 bit kernels, use the low-first version */ | ||
#include <linux/io-64-nonatomic-lo-hi.h> | ||
|
||
#define wr32(a, reg, value) writel((value), ((a)->hw_addr + (reg))) | ||
#define rd32(a, reg) readl((a)->hw_addr + (reg)) | ||
|
||
#define rd64(a, reg) readq((a)->hw_addr + (reg)) | ||
#define i40e_flush(a) readl((a)->hw_addr + I40E_GLGEN_STAT) | ||
|
||
#endif /* _I40E_IO_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters