Skip to content

Commit

Permalink
iwlegacy: remove firmware event log
Browse files Browse the repository at this point in the history
Messages like that

iwl4965 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445332:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445336:0x0000000c:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821445533:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821445534:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821445574:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821445575:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821445576:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821445577:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821445581:0x0000000d:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446327:0x00000107:0106
iwl4965 0000:03:00.0: EVT_LOGT:1821446328:0x00000000:0302
iwl4965 0000:03:00.0: EVT_LOGT:1821446368:0x000000d4:0321
iwl4965 0000:03:00.0: EVT_LOGT:1821446369:0x00000000:1350
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1351
iwl4965 0000:03:00.0: EVT_LOGT:1821446370:0x00000000:1352
iwl4965 0000:03:00.0: EVT_LOGT:1821446371:0x00000001:1353
iwl4965 0000:03:00.0: EVT_LOGT:1821446375:0x0000000e:0357
iwl4965 0000:03:00.0: EVT_LOGT:1821446383:0x00000000:0125

are completely useless for me. Remove bunch of code that generate them.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Jun 10, 2011
1 parent dd6d2a8 commit 1ba2f12
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 742 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlegacy/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,6 @@ static struct iwl_lib_ops iwl3945_lib = {
.txq_free_tfd = iwl3945_hw_txq_free_tfd,
.txq_init = iwl3945_hw_tx_queue_init,
.load_ucode = iwl3945_load_bsm,
.dump_nic_event_log = iwl3945_dump_nic_event_log,
.dump_nic_error_log = iwl3945_dump_nic_error_log,
.apm_ops = {
.init = iwl3945_apm_init,
Expand Down Expand Up @@ -2698,7 +2697,6 @@ static struct iwl_base_params iwl3945_base_params = {
.use_bsm = true,
.led_compensation = 64,
.wd_timeout = IWL_DEF_WD_TIMEOUT,
.max_event_log_size = 512,
};

static struct iwl_cfg iwl3945_bg_cfg = {
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlegacy/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,6 @@ static struct iwl_lib_ops iwl4965_lib = {
.is_valid_rtc_data_addr = iwl4965_hw_valid_rtc_data_addr,
.init_alive_start = iwl4965_init_alive_start,
.load_ucode = iwl4965_load_bsm,
.dump_nic_event_log = iwl4965_dump_nic_event_log,
.dump_nic_error_log = iwl4965_dump_nic_error_log,
.dump_fh = iwl4965_dump_fh,
.set_channel_switch = iwl4965_hw_channel_switch,
Expand Down Expand Up @@ -2151,7 +2150,6 @@ static struct iwl_base_params iwl4965_base_params = {
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
.wd_timeout = IWL_DEF_WD_TIMEOUT,
.temperature_kelvin = true,
.max_event_log_size = 512,
.ucode_tracing = true,
.sensitivity_calib_by_driver = true,
.chain_noise_calib_by_driver = true,
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlegacy/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ void iwl_legacy_irq_handle_error(struct iwl_priv *priv)
priv->cfg->ops->lib->dump_nic_error_log(priv);
if (priv->cfg->ops->lib->dump_fh)
priv->cfg->ops->lib->dump_fh(priv, NULL, false);
priv->cfg->ops->lib->dump_nic_event_log(priv, false, NULL, false);
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
if (iwl_legacy_get_debug_level(priv) & IWL_DL_FW_ERRORS)
iwl_legacy_print_rx_config_cmd(priv,
Expand Down
7 changes: 1 addition & 6 deletions drivers/net/wireless/iwlegacy/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ struct iwl_lib_ops {
int (*is_valid_rtc_data_addr)(u32 addr);
/* 1st ucode load */
int (*load_ucode)(struct iwl_priv *priv);
int (*dump_nic_event_log)(struct iwl_priv *priv,
bool full_log, char **buf, bool display);

void (*dump_nic_error_log)(struct iwl_priv *priv);
int (*dump_fh)(struct iwl_priv *priv, char **buf, bool display);
int (*set_channel_switch)(struct iwl_priv *priv,
Expand Down Expand Up @@ -206,7 +205,6 @@ struct iwl_mod_params {
* @chain_noise_num_beacons: number of beacons used to compute chain noise
* @wd_timeout: TX queues watchdog timeout
* @temperature_kelvin: temperature report by uCode in kelvin
* @max_event_log_size: size of event log buffer size for ucode event logging
* @ucode_tracing: support ucode continuous tracing
* @sensitivity_calib_by_driver: driver has the capability to perform
* sensitivity calibration operation
Expand All @@ -226,7 +224,6 @@ struct iwl_base_params {
int chain_noise_num_beacons;
unsigned int wd_timeout;
bool temperature_kelvin;
u32 max_event_log_size;
const bool ucode_tracing;
const bool sensitivity_calib_by_driver;
const bool chain_noise_calib_by_driver;
Expand Down Expand Up @@ -515,8 +512,6 @@ extern const struct dev_pm_ops iwl_legacy_pm_ops;
* Error Handling Debugging
******************************************************/
void iwl4965_dump_nic_error_log(struct iwl_priv *priv);
int iwl4965_dump_nic_event_log(struct iwl_priv *priv,
bool full_log, char **buf, bool display);
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUG
void iwl_legacy_print_rx_config_cmd(struct iwl_priv *priv,
struct iwl_rxon_context *ctx);
Expand Down
97 changes: 0 additions & 97 deletions drivers/net/wireless/iwlegacy/iwl-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,48 +391,6 @@ static ssize_t iwl_legacy_dbgfs_nvm_read(struct file *file,
return ret;
}

static ssize_t iwl_legacy_dbgfs_log_event_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_priv *priv = file->private_data;
char *buf;
int pos = 0;
ssize_t ret = -ENOMEM;

ret = pos = priv->cfg->ops->lib->dump_nic_event_log(
priv, true, &buf, true);
if (buf) {
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
kfree(buf);
}
return ret;
}

static ssize_t iwl_legacy_dbgfs_log_event_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_priv *priv = file->private_data;
u32 event_log_flag;
char buf[8];
int buf_size;

memset(buf, 0, sizeof(buf));
buf_size = min(count, sizeof(buf) - 1);
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
if (sscanf(buf, "%d", &event_log_flag) != 1)
return -EFAULT;
if (event_log_flag == 1)
priv->cfg->ops->lib->dump_nic_event_log(priv, true,
NULL, false);

return count;
}



static ssize_t
iwl_legacy_dbgfs_channels_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
Expand Down Expand Up @@ -706,7 +664,6 @@ static ssize_t iwl_legacy_dbgfs_disable_ht40_read(struct file *file,
}

DEBUGFS_READ_WRITE_FILE_OPS(sram);
DEBUGFS_READ_WRITE_FILE_OPS(log_event);
DEBUGFS_READ_FILE_OPS(nvm);
DEBUGFS_READ_FILE_OPS(stations);
DEBUGFS_READ_FILE_OPS(channels);
Expand Down Expand Up @@ -1098,56 +1055,6 @@ static ssize_t iwl_legacy_dbgfs_clear_ucode_statistics_write(struct file *file,
return count;
}

static ssize_t iwl_legacy_dbgfs_ucode_tracing_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos) {

struct iwl_priv *priv = file->private_data;
int pos = 0;
char buf[128];
const size_t bufsz = sizeof(buf);

pos += scnprintf(buf + pos, bufsz - pos, "ucode trace timer is %s\n",
priv->event_log.ucode_trace ? "On" : "Off");
pos += scnprintf(buf + pos, bufsz - pos, "non_wraps_count:\t\t %u\n",
priv->event_log.non_wraps_count);
pos += scnprintf(buf + pos, bufsz - pos, "wraps_once_count:\t\t %u\n",
priv->event_log.wraps_once_count);
pos += scnprintf(buf + pos, bufsz - pos, "wraps_more_count:\t\t %u\n",
priv->event_log.wraps_more_count);

return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}

static ssize_t iwl_legacy_dbgfs_ucode_tracing_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct iwl_priv *priv = file->private_data;
char buf[8];
int buf_size;
int trace;

memset(buf, 0, sizeof(buf));
buf_size = min(count, sizeof(buf) - 1);
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
if (sscanf(buf, "%d", &trace) != 1)
return -EFAULT;

if (trace) {
priv->event_log.ucode_trace = true;
/* schedule the ucode timer to occur in UCODE_TRACE_PERIOD */
mod_timer(&priv->ucode_trace,
jiffies + msecs_to_jiffies(UCODE_TRACE_PERIOD));
} else {
priv->event_log.ucode_trace = false;
del_timer_sync(&priv->ucode_trace);
}

return count;
}

static ssize_t iwl_legacy_dbgfs_rxon_flags_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos) {
Expand Down Expand Up @@ -1312,7 +1219,6 @@ DEBUGFS_READ_FILE_OPS(chain_noise);
DEBUGFS_READ_FILE_OPS(power_save_status);
DEBUGFS_WRITE_FILE_OPS(clear_ucode_statistics);
DEBUGFS_WRITE_FILE_OPS(clear_traffic_statistics);
DEBUGFS_READ_WRITE_FILE_OPS(ucode_tracing);
DEBUGFS_READ_FILE_OPS(fh_reg);
DEBUGFS_READ_WRITE_FILE_OPS(missed_beacon);
DEBUGFS_READ_WRITE_FILE_OPS(force_reset);
Expand Down Expand Up @@ -1347,7 +1253,6 @@ int iwl_legacy_dbgfs_register(struct iwl_priv *priv, const char *name)

DEBUGFS_ADD_FILE(nvm, dir_data, S_IRUSR);
DEBUGFS_ADD_FILE(sram, dir_data, S_IWUSR | S_IRUSR);
DEBUGFS_ADD_FILE(log_event, dir_data, S_IWUSR | S_IRUSR);
DEBUGFS_ADD_FILE(stations, dir_data, S_IRUSR);
DEBUGFS_ADD_FILE(channels, dir_data, S_IRUSR);
DEBUGFS_ADD_FILE(status, dir_data, S_IRUSR);
Expand All @@ -1373,8 +1278,6 @@ int iwl_legacy_dbgfs_register(struct iwl_priv *priv, const char *name)
DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR);
if (priv->cfg->base_params->chain_noise_calib_by_driver)
DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR);
if (priv->cfg->base_params->ucode_tracing)
DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR);
DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR);
Expand Down
29 changes: 0 additions & 29 deletions drivers/net/wireless/iwlegacy/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -854,32 +854,6 @@ struct traffic_stats {
#endif
};

/*
* schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds
* to perform continuous uCode event logging operation if enabled
*/
#define UCODE_TRACE_PERIOD (100)

/*
* iwl_event_log: current uCode event log position
*
* @ucode_trace: enable/disable ucode continuous trace timer
* @num_wraps: how many times the event buffer wraps
* @next_entry: the entry just before the next one that uCode would fill
* @non_wraps_count: counter for no wrap detected when dump ucode events
* @wraps_once_count: counter for wrap once detected when dump ucode events
* @wraps_more_count: counter for wrap more than once detected
* when dump ucode events
*/
struct iwl_event_log {
bool ucode_trace;
u32 num_wraps;
u32 next_entry;
int non_wraps_count;
int wraps_once_count;
int wraps_more_count;
};

/*
* host interrupt timeout value
* used with setting interrupt coalescing timer
Expand Down Expand Up @@ -1270,12 +1244,9 @@ struct iwl_priv {
u32 disable_tx_power_cal;
struct work_struct run_time_calib_work;
struct timer_list statistics_periodic;
struct timer_list ucode_trace;
struct timer_list watchdog;
bool hw_ready;

struct iwl_event_log event_log;

struct led_classdev led;
unsigned long blink_on, blink_off;
bool led_registered;
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/iwlegacy/iwl-devtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@ EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_ioread32);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_iowrite32);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_rx);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_tx);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_ucode_event);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_ucode_error);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_ucode_cont_event);
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_legacy_dev_ucode_wrap_event);
#endif
60 changes: 0 additions & 60 deletions drivers/net/wireless/iwlegacy/iwl-devtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,47 +96,6 @@ TRACE_EVENT(iwlwifi_legacy_dev_iowrite32,
#undef TRACE_SYSTEM
#define TRACE_SYSTEM iwlwifi_legacy_ucode

TRACE_EVENT(iwlwifi_legacy_dev_ucode_cont_event,
TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
TP_ARGS(priv, time, data, ev),
TP_STRUCT__entry(
PRIV_ENTRY

__field(u32, time)
__field(u32, data)
__field(u32, ev)
),
TP_fast_assign(
PRIV_ASSIGN;
__entry->time = time;
__entry->data = data;
__entry->ev = ev;
),
TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u",
__entry->priv, __entry->time, __entry->data, __entry->ev)
);

TRACE_EVENT(iwlwifi_legacy_dev_ucode_wrap_event,
TP_PROTO(struct iwl_priv *priv, u32 wraps, u32 n_entry, u32 p_entry),
TP_ARGS(priv, wraps, n_entry, p_entry),
TP_STRUCT__entry(
PRIV_ENTRY

__field(u32, wraps)
__field(u32, n_entry)
__field(u32, p_entry)
),
TP_fast_assign(
PRIV_ASSIGN;
__entry->wraps = wraps;
__entry->n_entry = n_entry;
__entry->p_entry = p_entry;
),
TP_printk("[%p] wraps=#%02d n=0x%X p=0x%X",
__entry->priv, __entry->wraps, __entry->n_entry,
__entry->p_entry)
);

#undef TRACE_SYSTEM
#define TRACE_SYSTEM iwlwifi

Expand Down Expand Up @@ -242,25 +201,6 @@ TRACE_EVENT(iwlwifi_legacy_dev_ucode_error,
__entry->blink2, __entry->ilink1, __entry->ilink2)
);

TRACE_EVENT(iwlwifi_legacy_dev_ucode_event,
TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
TP_ARGS(priv, time, data, ev),
TP_STRUCT__entry(
PRIV_ENTRY

__field(u32, time)
__field(u32, data)
__field(u32, ev)
),
TP_fast_assign(
PRIV_ASSIGN;
__entry->time = time;
__entry->data = data;
__entry->ev = ev;
),
TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u",
__entry->priv, __entry->time, __entry->data, __entry->ev)
);
#endif /* __IWLWIFI_DEVICE_TRACE */

#undef TRACE_INCLUDE_PATH
Expand Down
Loading

0 comments on commit 1ba2f12

Please sign in to comment.