summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_hw.h
diff options
context:
space:
mode:
authorMaciej Sosnowski <maciej.sosnowski@intel.com>2010-11-24 17:29:38 +0000
committerRoland Dreier <rolandd@cisco.com>2011-01-16 13:23:34 -0800
commitea623455b736d82f476460647e8b5fe5dc36f4f2 (patch)
treec1e2343adc9b2e8f7e11d58dc561370905d60bb8 /drivers/infiniband/hw/nes/nes_hw.h
parent2a4c97ead4b375a64063523210939b87ad225b85 (diff)
downloadop-kernel-dev-ea623455b736d82f476460647e8b5fe5dc36f4f2.zip
op-kernel-dev-ea623455b736d82f476460647e8b5fe5dc36f4f2.tar.gz
RDMA/nes: Generate IB_EVENT_PORT_ERR/PORT_ACTIVE events
Depending on link state change, IB_EVENT_PORT_ERR or IB_EVENT_PORT_ACTIVE should be generated when handling MAC interrupts. Plugging in a cable happens to result in series of interrupts changing driver's link state a number of times before finally staying at link up (e.g. link up, link down, link up, link down, ..., link up). To prevent sending series of redundant IB_EVENT_PORT_ACTIVE and IB_EVENT_PORT_ERR events, we use a timer to debounce them in nes_port_ibevent(). Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_hw.h')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.h b/drivers/infiniband/hw/nes/nes_hw.h
index 1204c34..8a9ea9a 100644
--- a/drivers/infiniband/hw/nes/nes_hw.h
+++ b/drivers/infiniband/hw/nes/nes_hw.h
@@ -1193,6 +1193,8 @@ struct nes_listener {
struct nes_ib_device;
+#define NES_EVENT_DELAY msecs_to_jiffies(100)
+
struct nes_vnic {
struct nes_ib_device *nesibdev;
u64 sq_full;
@@ -1247,6 +1249,10 @@ struct nes_vnic {
u32 lro_max_aggr;
struct net_lro_mgr lro_mgr;
struct net_lro_desc lro_desc[NES_MAX_LRO_DESCRIPTORS];
+ struct timer_list event_timer;
+ enum ib_event_type delayed_event;
+ enum ib_event_type last_dispatched_event;
+ spinlock_t port_ibevent_lock;
};
struct nes_ib_device {
OpenPOWER on IntegriCloud