RDMA/nes: Generate IB_EVENT_PORT_ERR/PORT_ACTIVE events
authorMaciej Sosnowski <maciej.sosnowski@intel.com>
Wed, 24 Nov 2010 17:29:38 +0000 (17:29 +0000)
committerRoland Dreier <rolandd@cisco.com>
Sun, 16 Jan 2011 21:23:34 +0000 (13:23 -0800)
commitea623455b736d82f476460647e8b5fe5dc36f4f2
treec1e2343adc9b2e8f7e11d58dc561370905d60bb8
parent2a4c97ead4b375a64063523210939b87ad225b85
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>
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_hw.h
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/hw/nes/nes_verbs.c