From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Alexander Bondar <alexander.bondar@intel.com>,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 02/29] iwlwifi: mvm: Add debugfs entry to generate NMI to NIC
Date: Sun, 24 Nov 2013 22:06:19 +0200 [thread overview]
Message-ID: <1385323606-3603-2-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <52925BE7.4050406@gmail.com>
From: Alexander Bondar <alexander.bondar@intel.com>
Writting to fw_nmi entry will set DEVICE_SET_NMI_REG (0x00a01c30)
generating NMI that halts NIC CPU.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-prph.h | 3 +++
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
index a70c7b9..f6412da 100644
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -102,6 +102,9 @@
/* Device system time */
#define DEVICE_SYSTEM_TIME_REG 0xA0206C
+/* Device NMI register */
+#define DEVICE_SET_NMI_REG 0x00a01c30
+
/*****************************************************************************
* 7000/3000 series SHR DTS addresses *
*****************************************************************************/
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 9864d71..4b31d06 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -63,6 +63,7 @@
#include "mvm.h"
#include "sta.h"
#include "iwl-io.h"
+#include "iwl-prph.h"
struct iwl_dbgfs_mvm_ctx {
struct iwl_mvm *mvm;
@@ -800,6 +801,17 @@ static ssize_t iwl_dbgfs_fw_restart_write(struct file *file,
return count;
}
+static ssize_t iwl_dbgfs_fw_nmi_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct iwl_mvm *mvm = file->private_data;
+
+ iwl_write_prph(mvm->trans, DEVICE_SET_NMI_REG, 1);
+
+ return count;
+}
+
static ssize_t
iwl_dbgfs_scan_ant_rxchain_read(struct file *file,
char __user *user_buf,
@@ -1164,6 +1176,7 @@ MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(disable_power_off);
MVM_DEBUGFS_READ_FILE_OPS(fw_rx_stats);
MVM_DEBUGFS_WRITE_FILE_OPS(fw_restart);
+MVM_DEBUGFS_WRITE_FILE_OPS(fw_nmi);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain);
#ifdef CONFIG_PM_SLEEP
@@ -1192,6 +1205,7 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
S_IRUSR | S_IWUSR);
MVM_DEBUGFS_ADD_FILE(fw_rx_stats, mvm->debugfs_dir, S_IRUSR);
MVM_DEBUGFS_ADD_FILE(fw_restart, mvm->debugfs_dir, S_IWUSR);
+ MVM_DEBUGFS_ADD_FILE(fw_nmi, mvm->debugfs_dir, S_IWUSR);
MVM_DEBUGFS_ADD_FILE(scan_ant_rxchain, mvm->debugfs_dir,
S_IWUSR | S_IRUSR);
#ifdef CONFIG_PM_SLEEP
--
1.7.9.5
next prev parent reply other threads:[~2013-11-24 20:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 20:04 pull request: iwlwifi-next 2013_11_24 Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 01/29] iwlwifi: remove TX_CMD id from transport layer Emmanuel Grumbach
2013-11-24 20:06 ` Emmanuel Grumbach [this message]
2013-11-24 20:06 ` [PATCH 03/29] iwlwifi: pcie: remove useless condition test Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 04/29] iwlwifi: mvm: fix and improve printing of rate scale table Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 05/29] iwlwifi: mvm: simplify iwl_mvm_send_lq_cmd Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 06/29] iwlwifi: mvm: refactor iwl_mvm_rs_rate_init Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 07/29] iwlwifi: mvm: enable d3_test even if d3_test_pme_ptr is not available Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 08/29] iwlwifi: mvm: disconnect on disconnection wakeup event Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 09/29] iwlwifi: mvm: implement rate_update hook in rs Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 10/29] iwlwifi: mvm: allow keeping connections in d3_test Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 11/29] iwlwifi: mvm: fix ht protection flags Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 12/29] iwlwifi: mvm: small debugfs cleanups Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 13/29] iwlwifi: mvm: move interface-specific debugfs to a new file Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 14/29] iwlwifi: mvm: don't use void pointers in debugfs Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 15/29] iwlwifi: mvm: refactor debugfs copy_from_user() Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 16/29] iwlwifi: mvm: add LQ flags definitions Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 17/29] iwlwifi: mvm: BT Coex - fine tune the aggregation size Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 18/29] iwlwifi: mvm: a few more SKUs for 7260 and 3160 Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 19/29] iwlwifi: pcie: remove minor dead code Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 20/29] iwlwifi: fix check for a single rx antenna Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 21/29] iwlwifi: mvm: add iwl_mvm_sta_from_mac80211 Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 22/29] iwlwifi: mvm: don't restart HW if suspending fails before D3 image is loaded Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 23/29] iwlwifi: mvm: dump NVM from debugfs Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 24/29] iwlwifi: mvm: fix scan offloading flag definition Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 25/29] iwlwifi: mvm: Implement low-priority scan Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 26/29] iwlwifi: mvm: quota command max_duration should be zero Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 27/29] iwlwifi: mvm: stop using MIMO in case BT doesn't allow it Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 28/29] iwlwifi: mvm: don't enable VHT MCS9 in 20Mhz Emmanuel Grumbach
2013-11-24 20:06 ` [PATCH 29/29] iwlwifi: mvm: don't configure mimo rates if nss is limited to 1 Emmanuel Grumbach
2013-12-02 18:40 ` pull request: iwlwifi-next 2013_11_24 John W. Linville
2013-12-02 19:23 ` John W. Linville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385323606-3603-2-git-send-email-egrumbach@gmail.com \
--to=egrumbach@gmail.com \
--cc=alexander.bondar@intel.com \
--cc=emmanuel.grumbach@intel.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).