Skip to content

Commit 2470f3a

Browse files
Intiyaz Bashadavem330
authored andcommitted
liquidio: moved console_bitmask module param to lio_main.c
Moving PF module param console_bitmask to lio_main.c for consistency. Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9060e6b commit 2470f3a

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,21 @@ static char fw_type[LIO_MAX_FW_TYPE_LEN];
5959
module_param_string(fw_type, fw_type, sizeof(fw_type), 0000);
6060
MODULE_PARM_DESC(fw_type, "Type of firmware to be loaded. Default \"nic\"");
6161

62+
static u32 console_bitmask;
63+
module_param(console_bitmask, int, 0644);
64+
MODULE_PARM_DESC(console_bitmask,
65+
"Bitmask indicating which consoles have debug output redirected to syslog.");
66+
67+
/**
68+
* \brief determines if a given console has debug enabled.
69+
* @param console console to check
70+
* @returns 1 = enabled. 0 otherwise
71+
*/
72+
int octeon_console_debug_enabled(u32 console)
73+
{
74+
return (console_bitmask >> (console)) & 0x1;
75+
}
76+
6277
static int ptp_enable = 1;
6378

6479
/* Polling interval for determining when NIC application is alive */

drivers/net/ethernet/cavium/liquidio/octeon_console.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
3737
u32 flags);
3838
static int octeon_console_read(struct octeon_device *oct, u32 console_num,
3939
char *buffer, u32 buf_size);
40-
static u32 console_bitmask;
41-
module_param(console_bitmask, int, 0644);
42-
MODULE_PARM_DESC(console_bitmask,
43-
"Bitmask indicating which consoles have debug output redirected to syslog.");
4440

4541
#define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008
4642
#define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004
@@ -135,16 +131,6 @@ struct octeon_pci_console_desc {
135131
/* Implicit storage for console_addr_array */
136132
};
137133

138-
/**
139-
* \brief determines if a given console has debug enabled.
140-
* @param console console to check
141-
* @returns 1 = enabled. 0 otherwise
142-
*/
143-
static int octeon_console_debug_enabled(u32 console)
144-
{
145-
return (console_bitmask >> (console)) & 0x1;
146-
}
147-
148134
/**
149135
* This function is the implementation of the get macros defined
150136
* for individual structure members. The argument are generated

drivers/net/ethernet/cavium/liquidio/octeon_device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,8 @@ int octeon_wait_for_bootloader(struct octeon_device *oct,
739739
*/
740740
int octeon_init_consoles(struct octeon_device *oct);
741741

742+
int octeon_console_debug_enabled(u32 console);
743+
742744
/**
743745
* Adds access to a console to the device.
744746
*

0 commit comments

Comments
 (0)