sfc: add sysfs entry to control MCDI tracing

MCDI tracing is enabled per-function with a sysfs file
    /sys/class/net/<NET_DEV>/device/mcdi_logging

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Edward Cree
2015-05-27 13:14:01 +01:00
committed by David S. Miller
parent 75aba2a52d
commit e7fef9b45a
4 changed files with 48 additions and 10 deletions

View File

@@ -59,6 +59,7 @@ enum efx_mcdi_mode {
* @async_list: Queue of asynchronous requests
* @async_timer: Timer for asynchronous request timeout
* @logging_buffer: buffer that may be used to build MCDI tracing messages
* @logging_enabled: whether to trace MCDI
*/
struct efx_mcdi_iface {
struct efx_nic *efx;
@@ -77,6 +78,7 @@ struct efx_mcdi_iface {
struct timer_list async_timer;
#ifdef CONFIG_SFC_MCDI_LOGGING
char *logging_buffer;
bool logging_enabled;
#endif
};