summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@intel.com>2013-11-16 10:00:44 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-12-05 23:13:01 -0800
commitcd92e72f2d0a5b576f025f693cfd306cebd8b84a (patch)
tree659c2cae4e2a6d22624b829bbe6108db0bc6a5f4 /drivers/net/ethernet/intel/i40e/i40e_ethtool.c
parent2759997b0c84e5483482d5486df780da7935086b (diff)
downloadlwn-cd92e72f2d0a5b576f025f693cfd306cebd8b84a.tar.gz
lwn-cd92e72f2d0a5b576f025f693cfd306cebd8b84a.zip
i40e: add interrupt test
Add a quick ethtool test for interrupts using the SW interrupt. Also, change the loopback test (for now) to not report failure. Change-Id: Id8ef154b82475e3163087a8d1df01dfec4d529fc Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 1b86138fa9e1..8f5d538c11c3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -734,14 +734,20 @@ static int i40e_eeprom_test(struct i40e_pf *pf, u64 *data)
static int i40e_intr_test(struct i40e_pf *pf, u64 *data)
{
- *data = -ENOSYS;
+ u16 swc_old = pf->sw_int_count;
+
+ wr32(&pf->hw, I40E_PFINT_DYN_CTL0,
+ (I40E_PFINT_DYN_CTL0_INTENA_MASK |
+ I40E_PFINT_DYN_CTL0_SWINT_TRIG_MASK));
+ usleep_range(1000, 2000);
+ *data = (swc_old == pf->sw_int_count);
return *data;
}
static int i40e_loopback_test(struct i40e_pf *pf, u64 *data)
{
- *data = -ENOSYS;
+ *data = 0;
return *data;
}