Skip to content

Commit

Permalink
liquidio: moved console_bitmask module param to lio_main.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Intiyaz Basha authored and David S. Miller committed Aug 7, 2017
1 parent 9060e6b commit 2470f3a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
15 changes: 15 additions & 0 deletions drivers/net/ethernet/cavium/liquidio/lio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ static char fw_type[LIO_MAX_FW_TYPE_LEN];
module_param_string(fw_type, fw_type, sizeof(fw_type), 0000);
MODULE_PARM_DESC(fw_type, "Type of firmware to be loaded. Default \"nic\"");

static u32 console_bitmask;
module_param(console_bitmask, int, 0644);
MODULE_PARM_DESC(console_bitmask,
"Bitmask indicating which consoles have debug output redirected to syslog.");

/**
* \brief determines if a given console has debug enabled.
* @param console console to check
* @returns 1 = enabled. 0 otherwise
*/
int octeon_console_debug_enabled(u32 console)
{
return (console_bitmask >> (console)) & 0x1;
}

static int ptp_enable = 1;

/* Polling interval for determining when NIC application is alive */
Expand Down
14 changes: 0 additions & 14 deletions drivers/net/ethernet/cavium/liquidio/octeon_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
u32 flags);
static int octeon_console_read(struct octeon_device *oct, u32 console_num,
char *buffer, u32 buf_size);
static u32 console_bitmask;
module_param(console_bitmask, int, 0644);
MODULE_PARM_DESC(console_bitmask,
"Bitmask indicating which consoles have debug output redirected to syslog.");

#define BOOTLOADER_PCI_READ_BUFFER_DATA_ADDR 0x0006c008
#define BOOTLOADER_PCI_READ_BUFFER_LEN_ADDR 0x0006c004
Expand Down Expand Up @@ -135,16 +131,6 @@ struct octeon_pci_console_desc {
/* Implicit storage for console_addr_array */
};

/**
* \brief determines if a given console has debug enabled.
* @param console console to check
* @returns 1 = enabled. 0 otherwise
*/
static int octeon_console_debug_enabled(u32 console)
{
return (console_bitmask >> (console)) & 0x1;
}

/**
* This function is the implementation of the get macros defined
* for individual structure members. The argument are generated
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/cavium/liquidio/octeon_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ int octeon_wait_for_bootloader(struct octeon_device *oct,
*/
int octeon_init_consoles(struct octeon_device *oct);

int octeon_console_debug_enabled(u32 console);

/**
* Adds access to a console to the device.
*
Expand Down

0 comments on commit 2470f3a

Please sign in to comment.